SymmetryAnalyzer Class
A base class for getting symmetry related properties of unit cells.
__init__
def __init__(system=None, symmetry_tol=None, min_2d_thickness=1)
Arguments:
system(ASE.Atoms)
- The system to inspect.symmetry_tol(float)
- The tolerance for the symmetry detection.min_2d_thickness(float)
- The minimum thickness in angstroms for the conventional cell that is returned for 2D systems.
set_system
def set_system(system)
Sets a new system for analysis.
reset
def reset()
Used to reset all the cached values.
get_material_id
def get_material_id()
Returns a 28-character identifier for this material. The identifier is calculated by hashing a set of the symmetry properties found in the material, including:
- Space group number
- Wyckoff position letters and the species occupied in them
get_space_group_number
def get_space_group_number()
Returns:
int
- The space group number.
get_space_group_international_short
def get_space_group_international_short()
Returns:
str
- The international space group short symbol.
get_hall_symbol
def get_hall_symbol()
Returns:
str
- The Hall symbol.
get_hall_number
def get_hall_number()
Returns:
int
- The Hall number.
get_point_group
def get_point_group()
Symbol of the crystallographic point group in the Hermann-Mauguin notation.
Returns:
str
- point group symbol
get_is_chiral
def get_is_chiral()
Returns a boolean value that tells if this object is chiral or not (achiral). A chiral object has symmetry operations that are all proper, i.e. their determinant is +1.
Returns:
bool
- is the object chiral.
get_has_free_wyckoff_parameters
def get_has_free_wyckoff_parameters()
Tells whether this system has Wyckoff positions with free variables.
Returns:
bool
- Indicates the presence of Wyckoff positions with free variables.
get_crystal_system
def get_crystal_system()
Get the crystal system based on the space group number. There are seven different crystal systems:
- Triclinic
- Monoclinic
- Orthorhombic
- Tetragonal
- Trigonal
- Hexagonal
- Cubic
Returns:
str
- The name of the crystal system.
get_bravais_lattice
def get_bravais_lattice()
Return Bravais lattice in the Pearson notation, where the first lowercase letter indicates the crystal system, and the second uppercase letter indicates the centring type.
Crystal system letters:
- a = triclinic
- m = monoclinic
- o = orthorhombic
- t = tetragonal
- h = hexagonal and trigonal
- c = cubic
Lattice type letters:
- P = Primitive
- S (= A or B or C) = One side/face centred
- I = Body centered
- R = Rhombohedral centring
- F = All faces centred
:param crystal_system: The crystal system :param space_group: The space group number. :type crystal_system: str :type space_group: int
:return: The Bravais lattice in the Pearson notation. :rtype: str
get_primitive_system
def get_primitive_system()
Returns a primitive description for this system.
This description uses a primitive lattice where positions of the atoms, and the cell basis vectors are idealized to follow the symmetries that were found with the given precision. This means that e.g. the volume, density, angles between basis vectors and basis vector lengths may have small deviations from the original system.
Returns:
ASE.Atoms
- The primitive system.
get_conventional_system
def get_conventional_system()
Used to get the conventional representation of this system.
This description uses a conventional lattice where positions of the atoms, and the cell basis vectors are idealized to follow the symmetries that were found with the given precision. This means that e.g. the volume, density, angles between basis vectors and basis vector lengths may have small deviations from the original system.
get_rotations
def get_rotations()
Get the rotational parts of the Seitz matrices that are associated with this space group. Each rotational matrix is accompanied by a translation with the same index.
Returns:
np.ndarray
- Rotation matrices.
get_translations
def get_translations()
Get the translational parts of the Seitz matrices that are associated with this space group. Each translation is accompanied by a rotational matrix with the same index.
Returns:
np.ndarray
- Translation vectors.
get_choice
def get_choice()
Returns:
str
- A string specifying the centring, origin and basis vector settings.
get_wyckoff_letters_original
def get_wyckoff_letters_original()
Returns:
list of str: Wyckoff letters for the atoms in the original system.
get_equivalent_atoms_original
def get_equivalent_atoms_original()
The equivalent atoms are the same as what spglib already outputs, as changes in the wyckoff letters will not afect the equivalence:
Returns:
list of int: A list that maps each atom into a symmetry equivalent set.
get_wyckoff_letters_conventional
def get_wyckoff_letters_conventional()
Get the Wyckoff letters of the atoms in the conventional system.
Returns:
list of str: Wyckoff letters.
get_wyckoff_sets_conventional
def get_wyckoff_sets_conventional(return_parameters=True)
Get a list of Wyckoff sets for this system. Wyckoff sets combine information about the atoms and their positions at specific Wyckoff positions.
Arguments:
return_parameters
bool - Whether to return the value of possible free Wyckoff parameters. Set to false if they are not needed, as their determination can take some time.
Returns:
list of WyckoffSets: A list of :class:.WyckoffSet
objects for the
conventional system.
get_equivalent_atoms_conventional
def get_equivalent_atoms_conventional()
List of equivalent atoms in the idealized system.
Returns:
list of int: A list that maps each atom into a symmetry equivalent set.
get_wyckoff_letters_primitive
def get_wyckoff_letters_primitive()
Get the Wyckoff letters of the atoms in the primitive system.
Returns:
list of str: Wyckoff letters.
get_equivalent_atoms_primitive
def get_equivalent_atoms_primitive()
List of equivalent atoms in the primitive system.
Returns:
list of int: A list that maps each atom into a symmetry equivalent set.
get_symmetry_dataset
def get_symmetry_dataset()
Calculates the symmetry dataset with spglib for the given system.
get_symmetry_operations
def get_symmetry_operations()
The symmetry operations of the original structure as rotations and translations.
Returns:
Dictionary containing an entry for rotations containing a np.array with 3x3 matrices for each symmetry operation and an entry "translations" containing np.array of translations for each symmetry operation. 3*1 np.ndarray: The shift of the origin as a vector.