assyst.plot¶
Helper plotting functions.
- assyst.plot.aspect_ratio_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot histogram of cell aspect ratios (max / min lattice parameter).
- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()
- assyst.plot.concentration_histogram(structures: list[Atoms], elements: Iterable[str] | None = None, **kwargs)[source]¶
Plot histogram of concentrations.
- assyst.plot.distance_histogram(structures: list[Atoms], rmax: float = 6.0, reduce: Literal['min', 'mean'] | Callable[[Iterable[float]], float] | None = 'min', **kwargs)[source]¶
Plot histogram of per-atom volumes.
- Parameters:
structures (list of
ase.Atoms) – structures to plotrmax (float) – maximum cutoff to consider neighborhood
reduce (callable from array of floats to float) – applied to the neighbor distances per structure, and should reduce a single scalar that is binned; if None plot all atomic distances concatenated
**kwargs – passed through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()
- assyst.plot.energy_distance(structures: list[Atoms], rmax: float = 6.0, reduce: Literal['min', 'mean'] | Callable[[Iterable[float]], float] = 'min', **kwargs)[source]¶
Plot energy per atom versus neighbor distance.
Requires that
ase.calculators.singlepoint.SinglePointCalculatorare attached to the atoms, either from a relaxation for final training set calculation.- Parameters:
structures (list of
ase.Atoms) – structures to plotrmax (float) – maximum cutoff to consider neighborhood
reduce (callable from array of floats to float) – applied to the neighbor distances per structure to reduce them to a single scalar;
"min"and"mean"are recognized as shortcuts; structures with no neighbors within rmax are silently skipped**kwargs – passed through to
matplotlib.pyplot.scatter()ormatplotlib.pyplot.hexbin()
- assyst.plot.energy_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot energy per atom histogram.
Requires that
ase.calculators.singlepoint.SinglePointCalculatorare attached to the atoms, either from a relaxation for final training set calculation.- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – pass through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()
- assyst.plot.energy_volume(structures: list[Atoms], **kwargs)[source]¶
Plot energy per atom versus volume per atom.
Requires that
ase.calculators.singlepoint.SinglePointCalculatorare attached to the atoms, either from a relaxation for final training set calculation.- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
matplotlib.pyplot.scatter()ormatplotlib.pyplot.hexbin()
- assyst.plot.lattice_angle_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot histogram of lattice angles alpha, beta, and gamma.
- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
seaborn.histplot()
- assyst.plot.lattice_parameter_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot histogram of lattice parameters a, b, and c.
- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
seaborn.histplot()
- assyst.plot.radial_distribution(structures: list[Atoms], rmax: float = 6.0, **kwargs)[source]¶
Plot radial distribution of neighbors in training set.
Calculates all neighbors in all structures and histograms them together. Bins are weighted by 1/(4 pi r^2), but because the density in each structure can be different, the plot does not yield something that can be directly compared to a Radial Distribution Function. It can be used to locate prefered bonding distances or sampling of the radial neighborhood in a training set given suitable data.
- Parameters:
structures (list of
ase.Atoms) – structures to plotrmax (float) – maximum cutoff to consider neighborhood
**kwargs – pass through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()
- assyst.plot.size_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot histogram of number of atoms.
- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()
- assyst.plot.volume_histogram(structures: list[Atoms], **kwargs)[source]¶
Plot histogram of per-atom volumes.
- Parameters:
structures (list of
ase.Atoms) – structures to plot**kwargs – passed through to
matplotlib.pyplot.hist()
- Returns:
Return value of
matplotlib.pyplot.hist()