wulfric.get_spglib_types#
- wulfric.get_spglib_types(atoms)[source]#
Constructs spglib_types for the given atoms.
First satisfied rule is applied
"spglib_types" in atoms
Return
atoms["spglib_types"]."species" in atoms.
spglib_typesare deduced fromatoms["species"]. If two atoms have the same species, then they will have the same integer assigned to them inspglib_types."names" in
atomsSpecies are automatically deduced based on atom's names (via
wulfric.crystal.get_atom_species()), and then the second rule is applied.
- Parameters:
- atomsdict
Dictionary with N atoms. At least one of the following keys is expected
"names" : (N, ) list of str, optional
"species" : (N, ) list of str, optional
"spglib_types" : (N, ) list of int, optional
- Returns:
- spglib_types(N, ) list of int
List of integer indices ready to be passed to spglib.