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 object type yielded by the readers io.CifReader
and
io.CSDReader
. The PeriodicSet
can be passed as the first argument
to calculate.AMD()
or calculate.PDD()
to calculate its invariants.
- class amd.periodicset.PeriodicSet(motif: numpy.ndarray, cell: numpy.ndarray, name: Optional[str] = None, asymmetric_unit: Optional[numpy.ndarray] = None, wyckoff_multiplicities: Optional[numpy.ndarray] = None, types: Optional[numpy.ndarray] = None)¶
Bases:
object
A periodic set is the mathematical representation of a crystal by putting a single point in the center of every atom. It is defined by a basis (unit cell) and collection of points (motif) which repeats according to the basis.
PeriodicSet
s are returned by the readers in theio
module. Instances of this object can be passed tocalculate.AMD()
orcalculate.PDD()
to calculate the invariant.- 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). Use
utils.cellpar_to_cell()
to convert 6 cell parameters to an orthogonal square matrix.name (str, optional) – Name of the periodic set.
asymmetric_unit (numpy.ndarray, optional) – Indices for the asymmetric unit, pointing to the motif.
wyckoff_multiplicities (numpy.ndarray, optional) – Wyckoff multiplicities of each atom in the asymmetric unit (number of unique sites generated under all symmetries).
types (numpy.ndarray, optional) – Array of atomic numbers of motif points.