pyiron_atomistics.atomistics.structure.structurestorage.StructurePlots#
- class pyiron_atomistics.atomistics.structure.structurestorage.StructurePlots(store: StructureStorage)[source]#
Bases:
objectSimple interface to plot various properties of structures.
- __init__(store: StructureStorage)[source]#
Methods
__init__(store)atoms()Plot a histogram of the number of atoms in each structure.
cell([angle_in_degrees])Plot histograms of cell parameters.
concentration([elements])Plot histograms of the concentrations in each structure.
coordination([num_shells, log, num_neighbors])Plot histogram of coordination in neighbor shells.
distances([bins, num_neighbors, normalize])Plot a histogram of the neighbor distances.
shell_distances([num_shells, num_neighbors])Plot a violin plot of the neighbor distances in shells up to num_shells.
spacegroups([symprec])Plot histograms of space groups and crystal systems.
- cell(angle_in_degrees=True)[source]#
Plot histograms of cell parameters.
Plotted are atomic volume, density, cell vector lengths and cell vector angles in separate subplots all on a log-scale.
- Parameters:
angle_in_degrees (bool) – whether unit for angles is degree or radians
- Returns:
- contains the plotted information in the columns:
a: length of first vector
b: length of second vector
c: length of third vector
alpha: angle between first and second vector
beta: angle between second and third vector
gamma: angle between third and first vector
V: volume of the cell
N: number of atoms in the cell
- Return type:
DataFrame
- concentration(elements: List[str] = None, **kwargs) DataFrame[source]#
Plot histograms of the concentrations in each structure.
- Parameters:
elements (list of str) – elements to plot the histograms for; default is for all elements in the container
**kwargs – passed through to seaborn.histplot
- Returns:
table of concentrations in each structure; column headers are the element names
- Return type:
pandas.DataFrame
- coordination(num_shells=4, log=True, num_neighbors=None)[source]#
Plot histogram of coordination in neighbor shells.
Computes one histogram of the number of neighbors in each neighbor shell up to num_shells and then plots them together.
If the underlying
StructureStoragehas a ‘shells’ array defined it is used, if not it is calculated on the fly.- Parameters:
num_shells (int) – maximum shell to plot
num_neighbors (int) – maximum number of neighbors to calculate, when ‘shells’ is not defined in storage, default is the value from the previous call or 36
log (float) – plot histogram values on a log scale
- distances(bins: int = 50, num_neighbors: int = None, normalize: bool = False)[source]#
Plot a histogram of the neighbor distances.
Setting normalize plots the radial distribution function.
- Parameters:
bins (int) – number of bins
num_neighbors (int) – maximum number of neighbors to calculate, when ‘shells’ or ‘distances’ are not defined in storage default is the value from the previous call or 36
normalize (bool) – normalize the distribution by the surface area of the radial bin, 4pi r^2
- shell_distances(num_shells=4, num_neighbors=None)[source]#
Plot a violin plot of the neighbor distances in shells up to num_shells.
- Parameters:
num_shells (int) – maximum shell to plot
num_neighbors (int) – maximum number of neighbors to calculate, when ‘shells’ or ‘distances’ are not defined in storage default is the value from the previous call or 36
- spacegroups(symprec=0.001)[source]#
Plot histograms of space groups and crystal systems.
Spacegroups and crystal systems are plotted in separate subplots.
- Parameters:
symprec (float) – precision of the symmetry search (passed to spglib)
- Returns:
- contains two columns “space_group”, “crystal_system”
for each structure
- Return type:
DataFrame