horton.symmetry – Geometric symmetries¶
The symmetry tools in HORTON are just meant to provide optional additional information on top of a System instance.
Symmetry(name, generators, fracs, numbers, cell, labels=None)¶
- Whatever name you want to give to this symmetry. This is converted to a string.
- A list of (3,4) matrices where the first three columns contain the linear transformation matrix and the last column is a translation vector. These transformations act on the fractional (or reduced) coordinates.
- The fractional coordinates of a primitive cell/unit.
- The corresponding element numbers of the primitive cell/unit
- A Cell object. Even for isolated systems a cell object must be provided with nvec=0.
- A list of unique labels for each atom in the primitive unit. These are generated from the numbers array when not given.
Construct a Symmetry object from a HDF5 group
Apply the generators to the primitive unit to obtain a full molecule.
- When, after transformation with the generators, two (or more) symmetry atoms overlap within this threshold, they will be merged into one. The distance is measured in Cartesian coordinates.
- Cartesian coordinates for all atoms.
- Atomic numbers for all atoms.
- An array of indexes to connect each atom back with an atom in the primitive cell (first column) and a generator (second column).
identify(coordinates, cell, threshold=0.1)¶
Connect atoms in the primitive unit with atoms in the full molecule
- An (N, 3) array of atomic coordinates that adhere (with some minor deviation) to this symmetry.
- A Cell instance describing the periodic boundary conditions
- The maximum allowed distance between the ideal atom position and the actual atom position
If an atom in the full molecule can not be linked with an atom in the primitive unit, a SymmetryError is raised. If the full molecule contains less atoms than the perfect crystal (e.g. a vacancy), this method will not complain.
Write a symmetry object to an HDF5 group
The number of atoms in the primitive unit