amd.periodicset module¶
Implements the PeriodicSet class representing a periodic
set, defined by a motif (collection of points) and unit cell (basis).
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[Any, numpy.dtype[numpy.floating]], cell: numpy.ndarray[Any, numpy.dtype[numpy.floating]], name: Optional[str] = None, asym_unit: Optional[numpy.ndarray[Any, numpy.dtype[numpy.integer]]] = None, multiplicities: Optional[numpy.ndarray[Any, numpy.dtype[numpy.floating]]] = None, types: Optional[numpy.ndarray[Any, numpy.dtype[numpy.integer]]] = None)¶
Bases:
objectA periodic set is a collection of points (motif) which periodically repeats according to a lattice (unit cell), often representing a crystal.
PeriodicSets are returned by the readers in theiomodule (amd.CifReaderandamd.CSDReader). They can be passed toamd.AMD()oramd.PDD()to calculate their invariants.- Parameters
motif (
numpy.ndarray) – Collection of motif points in Cartesian (orthogonal) coordinates, shape (no points,dims).cell (
numpy.ndarray) – Square array representing the unit cell in Cartesian (orthogonal) coordinates, shape (dims,dims). Useamd.cellpar_to_cellto convert a vector of 6 conventional cell parameters a,b,c,α,β,γ to a 3x3 matrix.name (str, optional) – Name of the periodic set.
asym_unit (
numpy.ndarray, optional) – Indices of motif points constituting an asymmetric unit, so thatmotif[asym_unit]are points in an asymmetric unit. Used in AMD/PDD calculation.multiplicities (
numpy.ndarray, optional) – Wyckoff multiplicities of points in the asymmetric unit (the number of unique sites generated under symmetries). Used in AMD/PDD calculation.types (
numpy.ndarray, optional) – Atomic numbers of motif points.
- property ndim: int¶
- static cubic(scale: float = 1.0, dims: int = 3) amd.periodicset.PeriodicSet¶
Return a
PeriodicSetrepresenting a cubic lattice.
- static hexagonal(scale: float = 1.0, dims: int = 3) amd.periodicset.PeriodicSet¶
Return a
PeriodicSetrepresenting a hexagonal lattice. Implemented for dimensions 2 and 3 only.