All Projects → arosen93 → ptable_trends

arosen93 / ptable_trends

Licence: other
Python script to plot periodic trends as a heat map over the periodic table of elements

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ptable trends

chemistry-opencmis
Mirror of Apache Chemistry OpenCMIS
Stars: ✭ 47 (+34.29%)
Mutual labels:  chemistry
mzLib
Library for mass spectrometry projects
Stars: ✭ 19 (-45.71%)
Mutual labels:  chemistry
periodic-table
Interactive Periodic Table which I made with React.js and CSS Grid. I was trying to memorize all the elements and thought, hey can I make this peculiar layout with my current CSS skills? I finally did
Stars: ✭ 92 (+162.86%)
Mutual labels:  chemistry
bioicons
A library of free open source icons for science illustrations in biology and chemistry
Stars: ✭ 665 (+1800%)
Mutual labels:  chemistry
graph-nvp
GraphNVP: An Invertible Flow Model for Generating Molecular Graphs
Stars: ✭ 69 (+97.14%)
Mutual labels:  chemistry
molml
A library to interface molecules and machine learning.
Stars: ✭ 57 (+62.86%)
Mutual labels:  chemistry
DLBFoam-1.0
DLBFoam: An open-source dynamic load balancing model for fast reacting flow simulations in OpenFOAM. https://doi.org/10.1016/j.cpc.2021.108073
Stars: ✭ 29 (-17.14%)
Mutual labels:  chemistry
Atomic-Periodic-Table.Android
Atomic - Periodic Table
Stars: ✭ 33 (-5.71%)
Mutual labels:  chemistry
ChemistryFeaturization.jl
Interface package for featurizing atomic structures
Stars: ✭ 35 (+0%)
Mutual labels:  chemistry
AMPL
The ATOM Modeling PipeLine (AMPL) is an open-source, modular, extensible software pipeline for building and sharing models to advance in silico drug discovery.
Stars: ✭ 85 (+142.86%)
Mutual labels:  chemistry
SciCompforChemists
Scientific Computing for Chemists text for teaching basic computing skills to chemistry students using Python, Jupyter notebooks, and the SciPy stack. This text makes use of a variety of packages including NumPy, SciPy, matplotlib, pandas, seaborn, NMRglue, SymPy, scikit-image, and scikit-learn.
Stars: ✭ 65 (+85.71%)
Mutual labels:  chemistry
mendeleev
A python package for accessing various properties of elements, ions and isotopes in the periodic table of elements.
Stars: ✭ 107 (+205.71%)
Mutual labels:  chemistry
AutoForce
Sparse Gaussian Process Potentials
Stars: ✭ 17 (-51.43%)
Mutual labels:  chemistry
molassembler
Chemoinformatics toolkit with support for inorganic molecules
Stars: ✭ 18 (-48.57%)
Mutual labels:  chemistry
ReactionMechanismSimulator.jl
The amazing Reaction Mechanism Simulator for simulating large chemical kinetic mechanisms
Stars: ✭ 39 (+11.43%)
Mutual labels:  chemistry
qp2
Quantum Package : a programming environment for wave function methods
Stars: ✭ 37 (+5.71%)
Mutual labels:  chemistry
chemlib
🧪 A comprehensive chemistry library for Python.
Stars: ✭ 26 (-25.71%)
Mutual labels:  chemistry
pytopomat
Python Topological Materials (pytopomat) is a code for easy, high-throughput analysis of topological materials.
Stars: ✭ 19 (-45.71%)
Mutual labels:  chemistry
jchempaint
Chemical 2D structure editor application/applet based on the Chemistry Development Kit
Stars: ✭ 84 (+140%)
Mutual labels:  chemistry
opem
OPEM (Open Source PEM Fuel Cell Simulation Tool)
Stars: ✭ 107 (+205.71%)
Mutual labels:  chemistry

Periodic Trend Plotter

Python script to plot periodic trends as a heat map over the periodic table of elements.

Usage

This Python script (ptable_trends.py) can be used to plot a heat map over an image of the periodic table of elements for easy and automated visualization of periodic trends.

A minimal example is as follows:

from ptable_trends import ptable_plotter
ptable_plotter("ionization_energies.csv")

plot1

The only required argument to ptable_plotter() is a single positional argument for the full filepath/name (with extension) of the data file containing your periodic trend data. The data file must be in a comma-separated value (.csv) format with the first entry in each row being the atom symbol and the second entry being the value you wish to plot. An example .csv file is included in this repository for testing purposes under the name ionization_energies.csv. After the ptable_trends.py script is run, it will show the plot in your web browser. To save the image, simply click the save icon that appears in the web browser figure.

There are numerous optional arguments, which can be used to modify the appearance of the figure. The full argument list is below:

def ptable_plotter(
filename: str,
show: bool = True,
output_filename: str = None,
width: int = 1050,
cmap: str = "plasma",
alpha: float = 0.65,
extended: bool = True,
periods_remove: List[int] = None,
groups_remove: List[int] = None,
log_scale: bool = False,
cbar_height: float = None,
cbar_standoff: int = 12,
cbar_fontsize: int = 14,
blank_color: str = "#c4c4c4",
under_value: float = None,
under_color: str = "#140F0E",
over_value: float = None,
over_color: str = "#140F0E",
special_elements: List[str] = None,
special_color: str = "#6F3023",
) -> figure:
"""
Plot a heatmap over the periodic table of elements.
Parameters
----------
filename : str
Path to the .csv file containing the data to be plotted.
show : str
If True, the plot will be shown.
output_filename : str
If not None, the plot will be saved to the specified (.html) file.
width : float
Width of the plot.
cmap : str
plasma, infnerno, viridis, or magma
alpha : float
Alpha value (transparency).
extended : bool
If True, the lanthanoids and actinoids will be shown.
periods_remove : List[int]
Period numbers to be removed from the plot.
groups_remove : List[int]
Group numbers to be removed from the plot.
log_scale : bool
If True, the colorbar will be logarithmic.
cbar_height : int
Height of the colorbar.
cbar_standoff : int
Distance between the colorbar and the plot.
cbar_fontsize : int
Fontsize of the colorbar label.
blank_color : str
Hexadecimal color of the elements without data.
under_value : float
Values <= under_value will be colored with under_color.
under_color : str
Hexadecimal color to be used for the lower bound color.
over_value : float
Values >= over_value will be colored with over_color.
under_color : str
Hexadecial color to be used for the upper bound color.
special_elements: List[str]
List of elements to be colored with special_color.
special_color: str
Hexadecimal color to be used for the special elements.
Returns
-------
figure
Bokeh figure object.
"""

A couple of examples using various optional keyword arguments are as follows:

from ptable_trends import ptable_plotter
ptable_plotter("ionization_energies.csv", log_scale=True)

plot2

from ptable_trends import ptable_plotter
ptable_plotter("ionization_energies.csv", cmap="viridis", alpha=0.7, extended=False, periods_remove=[1])

plot3

Dependencies

The script requires the following dependencies:

These packages can be installed using pip via pip install -r requirements.txt in the ptable_trends base directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].