aiida_crystal17.symmetry package¶
Submodules¶
aiida_crystal17.symmetry.symmetry module¶
A module for computing the symmetry of an AiiDA StructureData object.
When computing symmetry, atomic sites with the same Kind are treated as symmetrically equivalent (rather than just the atomic elements).
Currently only 3D structures are considered.
NB: this module is not specific to CRYSTAL, and may be move to a separate package at a later date
-
aiida_crystal17.symmetry.symmetry.
affine_to_operation
(affine_matrix)[source]¶ create a flattened symmetry operation, from a 4x4 affine transformation matrix
-
aiida_crystal17.symmetry.symmetry.
cartesian_to_frac
(lattice, ccoords)[source]¶ convert cartesian coordinates to fractional coordinates
-
aiida_crystal17.symmetry.symmetry.
compute_symmetry_dataset
(structure, symprec, angle_tolerance, use_kinds=True)[source]¶ compute the symmetry of a Structure, with periodic boundary conditions in all axes, using spglib.
When computing symmetry, atomic sites with the same Kind are treated as symmetrically equivalent (rather than just the atomic elements).
- Parameters
structure (aiida.StructureData) –
symprec (float) – Symmetry search tolerance in the unit of length.
angle_tolerance (float or None) – Symmetry search tolerance in the unit of angle degrees. If the value is negative or None, an internally optimized routine is used to judge symmetry.
use_kinds (bool) – if True use kind names to define inequivalent sites, else use symbols
- Returns
dataset – spglib symmetry dataset
- Return type
-
aiida_crystal17.symmetry.symmetry.
compute_symmetry_dict
(structure, symprec, angle_tolerance, use_kinds=True)[source]¶ compute the symmetry of a Structure, with periodic boundary conditions in all axes, using spglib
When computing symmetry, atomic sites with the same Kind are treated as symmetrically equivalent (rather than just the atomic elements).
- Parameters
structure (aiida.StructureData) –
symprec (float) – Symmetry search tolerance in the unit of length.
angle_tolerance (float or None) – Symmetry search tolerance in the unit of angle degrees. If the value is negative or None, an internally optimized routine is used to judge symmetry.
use_kinds (bool) – if True use kind names to define inequivalent sites, else use symbols
- Returns
data required to create an AiiDA SymmetryData object
- Return type
-
aiida_crystal17.symmetry.symmetry.
convert_structure
(structure, out_type)[source]¶ convert an AiiDA, ASE or dict object to another type
- Parameters
structure (aiida.StructureData or dict or ase.Atoms) –
out_type (str) – one of: ‘dict’, ‘ase’ or ‘aiida
-
aiida_crystal17.symmetry.symmetry.
find_primitive
(structure, symprec, angle_tolerance)[source]¶ compute the primitive cell for an AiiDA structure
When computing symmetry, atomic sites with the same Kind are treated as symmetrically equivalent (rather than just the atomic elements).
- Parameters
structure (aiida.StructureData) –
symprec (float) – Symmetry search tolerance in the unit of length.
angle_tolerance (float or None) – Symmetry search tolerance in the unit of angle degrees. If the value is negative, an internally optimized routine is used to judge symmetry.
- Returns
- Return type
-
aiida_crystal17.symmetry.symmetry.
frac_to_cartesian
(lattice, fcoords)[source]¶ convert fractional coordinates to cartesian coordinates
-
aiida_crystal17.symmetry.symmetry.
get_crystal_system_name
(sg_number)[source]¶ Get the crystal system for the structure from the space group number
-
aiida_crystal17.symmetry.symmetry.
get_hall_number_from_symmetry
(operations, basis='fractional', lattice=None, symprec=1e-05)[source]¶ obtain the Hall number from the symmetry operations
-
aiida_crystal17.symmetry.symmetry.
get_lattice_type_name
(sg_number)[source]¶ Get the lattice type for the structure from the space group
This is the same as crystal system name, with the exception of the trigonal -> hexagonal or rhombohedral
-
aiida_crystal17.symmetry.symmetry.
operation_cart_to_frac
(lattice, rotation, translation)[source]¶ convert a single symmetry operation from cartesian to fractional
-
aiida_crystal17.symmetry.symmetry.
operation_frac_to_cart
(lattice, rotation, translation)[source]¶ convert a single symmetry operation from fractional to cartesian
-
aiida_crystal17.symmetry.symmetry.
operation_to_affine
(operation)[source]¶ create a 4x4 affine transformation matrix, from a flattened symmetry operation
-
aiida_crystal17.symmetry.symmetry.
operations_cart_to_frac
(operations, lattice)[source]¶ convert a list of cartesian symmetry operations to fractional
-
aiida_crystal17.symmetry.symmetry.
operations_frac_to_cart
(operations, lattice)[source]¶ convert a list of fractional symmetry operations to cartesian
-
aiida_crystal17.symmetry.symmetry.
prepare_for_spglib
(structure, use_kinds=True)[source]¶ prepare an AiiDa Structure for parsing to spglib, labelling sites with the same Kind as equivalent
- Parameters
structure (aiida.StructureData) –
use_kinds (bool) – if True use kind names to define inequivalent sites, else use symbols
- Returns
tuple (cell) – (lattice, fcoords, inequivalent)
dict (int2kind_map) – maps integer values in inequivalent list to AiiDa Kind objects
-
aiida_crystal17.symmetry.symmetry.
print_structure
(structure, max_srows=None, round_dp=4)[source]¶ print a formatted string, with information about a StructureData cell and sites
- Parameters
structure (aiida.StructureData) –
max_srows (None or int) – limit the number of site lines returned
round_dp (int) – round numbers to n decimal places
-
aiida_crystal17.symmetry.symmetry.
reset_kind_names
(structure, kind_names)[source]¶ reset the kind names (per site) of a StructureData node
- Parameters
structure (aiida.StructureData) –
kind_names (list[str]) – a name for each site of the structure
- Returns
a cloned node
- Return type
- Raises
AssertionError – if the kind_names are not compatible with the current sites
-
aiida_crystal17.symmetry.symmetry.
standardize_cell
(structure, symprec, angle_tolerance, to_primitive=False, no_idealize=False)[source]¶ compute the standardised cell for an AiiDA structure
When computing symmetry, atomic sites with the same Kind are treated as symmetrically equivalent (rather than just the atomic elements).
- Parameters
structure (aiida.StructureData) –
to_primitive (bool) – If True, the standardized primitive cell is created.
no_idealize (bool) – If True, it is disabled to idealize lengths and angles of basis vectors and positions of atoms according to crystal symmetry.
symprec (float) – Symmetry search tolerance in the unit of length.
angle_tolerance (float or None) – Symmetry search tolerance in the unit of angle degrees. If the value is negative or None, an internally optimized routine is used to judge symmetry.
- Returns
- Return type
-
aiida_crystal17.symmetry.symmetry.
structure_info
(structure, max_srows=None, round_dp=4)[source]¶ get a formatted string, with information about a StructureData cell and sites
- Parameters
structure (aiida.StructureData) –
max_srows (None or int) – limit the number of site lines returned
round_dp (int) – round numbers to n decimal places
- Returns
- Return type
-
aiida_crystal17.symmetry.symmetry.
structure_to_dict
(structure)[source]¶ create a dictionary of structure properties per atom
- Parameters
structure (aiida.StructureData) – the input structure
- Returns
dictionary containing; lattice, atomic_numbers, ccoords, pbc, kinds, equivalent
- Return type