amd.periodicset module

Implements the class PeriodicSet representing a periodic set, defined by a motif and unit cell.

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. They can be written to a file with io.SetWriter which can be read with io.SetReader.

class amd.periodicset.PeriodicSet(motif: numpy.ndarray, cell: numpy.ndarray, name: Optional[str] = None, **kwargs)

Bases: object

Represents a periodic set (which mathematically represents a crystal).

Has attributes motif, cell and name (which can be None). PeriodicSet objects are returned by the readers in the io module.

astype(dtype)

Returns copy of the PeriodicSet with .motif and .cell casted to dtype.

to_dict() dict

Return dict with scalar data in the tags of the PeriodicSet.

Format of returned dict is for example:

{
    'density': 1.231,
    'family': 'CBMZPN',
    ...
}