SpacegroupInfo
- class ase2sprkkr.bindings.spglib.SpacegroupInfo(atoms, spacegroup, dataset=None, equivalent_sites=None)[source]
Class, that carry information about spacegroup and symmetry of a structure
Class hierarchy
Constructor
- Parameters:
atoms (sprkkr_atoms.SPRKKRAtoms) –
spacegroup (Optional[Spacegroup]) –
dataset (Optional[Dict]) –
equivalent_sites (Optional[UniqueValuesMapping]) –
- __init__(atoms, spacegroup, dataset=None, equivalent_sites=None)[source]
- Parameters:
atoms (SPRKKRAtoms) – ASE atoms object desribed by the SpacegroupInfo
spacegroup (Spacegroup | None) – ASE spacegroup object. If None, there is no symmetry in the crystal.
dataset (Dict | None) – SPGLib dataset - a dictionary, containing many informations about the symmetry and spacegroup of the structure. If it is not provided, and
spacegroup
is notNone
the spacegroup is recomputed to obtain the dataset, if the dataset is requested.equivalent_sites (UniqueValuesMapping | None) – Object, that provides equivalence classes for the atoms. If it is not provided, and
spacegroup
is notNone
, the spacegroup is recomputed to obtain the equivalence equivalent_sites, if the equivalent_sites is requested.
- number()[source]
- Returns:
Spacegroup number or None, if there is no spacegroup.
- Return type:
spacegroup
- property dataset: Dict | None
- property equivalent_sites: UniqueValuesMapping
Object, that provide equivalence classes for the atoms. If it is not provided, and
spacegroup
is notNone
, the spacegroup is recomputed to obtain the equivalent_sites, if the equivalent_sites is requested.
- recompute(allow_change=True)[source]
Recompute spacegroup, dataset and equivalent_sites.
- allow_change
If False, the resulting spacegroup have to be the same as the old one. Used, if the spacegroup info have been constructed using a spacegroup without providing spglib dataset.
- Parameters:
allow_change (bool) –
- static compute_spacegroup_info(atoms, atomic_numbers=None, consider_old=False, precision=1e-05, angular_precision=1.0)[source]
Return the values needed to create (or update)
Spacegroup
that suits to the atoms’ cell structure.For the parameters description, see the ‘
from_atoms()
method.- Returns:
spacegroup – ASE Spacegroup object, describing the spacegroup
dataset – Dataset, describing symmetry- and spacegroup-related information about the structure, see the Spglib documentation <https://spglib.github.io/spglib/dataset.html#spglib-dataset> for the documentation of the members of the dataset and the `documentation of the C-to-python Spglib binding <https://spglib.github.io/spglib/python-spglib.html> for the names of the members (which slightly differ from the names in the C structure)
equivalent_sites – The map of equivalent atoms.
- Parameters:
atoms (Atoms) –
atomic_numbers (List) –
consider_old (bool) –
precision (float) –
angular_precision (float) –
- Return type:
Tuple[Spacegroup, Dict, UniqueValuesMapping]
- static from_atoms(atoms, atomic_numbers=None, consider_old=False, precision=1e-05, angular_precision=1.0)[source]
Create
SpacegroupInfo
for given ASEAtoms
object.- Parameters:
atoms (Atoms) – ASE atoms structure
atomic_numbers (List) – The atomic numbers can be overriden, e.g. to force (partialy) break the symmetry. The atomic numbers have not to be the real ones, they can be (and are treated) just the labels of equivalence classes.
consider_old (bool) –
precision (float) – The tolerated unprecision
angular_precision (float) – The tolerated unprecision in angular coordinate
- Return type: