amd.periodicset module¶
Implements the PeriodicSet
class representing a periodic
set, defined by a motif and unit cell. This models a crystal with a
point at the center of each atom.
This is the type yielded by amd.CifReader
and
amd.CSDReader
. A PeriodicSet
can be
passed as the first argument to amd.AMD()
or
amd.PDD()
to calculate its invariants.
- class amd.periodicset.PeriodicSet(motif: numpy.ndarray, cell: numpy.ndarray, name: Optional[str] = None, asym_unit: Optional[numpy.ndarray] = None, multiplicities: Optional[numpy.ndarray] = None, types: Optional[numpy.ndarray] = None)¶
Bases:
object
A periodic set is a collection of points (motif) which periodically repeats according to a lattice (unit cell), often representing a crystal.
PeriodicSet
s are returned by the readers in theio
module. They can be passed toamd.AMD()
oramd.PDD()
to calculate their invariants.- Parameters
motif (
numpy.ndarray
) – Cartesian (orthogonal) coordinates of the motif, shape (no points, dims).cell (
numpy.ndarray
) – Cartesian (orthogonal) square array representing the unit cell, shape (dims, dims). Useamd.cellpar_to_cell
to convert 6 cell parameters to an orthogonal square matrix.name (str, optional) – Name of the periodic set.
asym_unit (
numpy.ndarray
, optional) – Indices for the asymmetric unit, pointing to the motif. Used in calculating AMD and PDD.multiplicities (
numpy.ndarray
, optional) – Wyckoff multiplicities of points in the asymmetric unit, number of unique sites generated under symmetries.types (
numpy.ndarray
, optional) – Array of atomic numbers of motif points.
- property ndim: int¶
- static cubic(scale: float = 1.0, dims: int = 3) amd.periodicset.PeriodicSet ¶
Returns a
PeriodicSet
representing a cubic lattice.
- static hexagonal(scale: float = 1.0, dims: int = 3) amd.periodicset.PeriodicSet ¶
Return a
PeriodicSet
representing a hexagonal lattice. Dimensions 2 and 3 only.