principia_materia.translation_group.crystal_ftg module
- class principia_materia.translation_group.crystal_ftg.CrystalFTG(vec, atoms, supa=None, orbitals=None, lattice_coordinate=True, pg=None, tol=1e-06)
Bases:
Crystal
A crystal structure with a finite translation group (FTG).
Here we define a finite translation group by mapping the infinite translation group of the crystal with periodic boundary condition. This boundary condition is defined with a supercell.
- Parameters:
vec (array of float, shape(dim, dim)) – The lattice vectors.
atoms (dict of str as keys and array of float as values) – A dictionary of names of atoms and their positions. The positions are in lattice coordinate if lattice_coordinate == True, otherwise they are in cartesian coordinate.
supa (array of int, shape(dim, dim)) – The supercell matrix.
orbitals (str or array of str) – Orbital names to assign to the atoms.
lattice_coordinate (bool, optional, default to True) – If True, the coordinate in input variable atoms is in Cartesian coordinates.
pg (str or a PointGroup object) – The point group of the lattice.
tol (float, optional, default to 1.0E-6) – Tolerance.
- as_primitive()
Return a copy of the object with the current structure as the primitive cell and supa equal to identity.
- Returns:
new – An CrystalFTG object with the current vec, atoms, orbitals, pg and tol, supa set to identity.
- Return type:
- property atoms
A dictionary of atoms and their positions.
- copy()
Return a copy of the object.
- Returns:
new – A copy of the object itself.
- Return type:
- find_atoms(positions)
Find the indices of atoms of that have identical positions within a translation.
If an atom is not found, in return index will be -1.
- Parameters:
positions (array of float, shape (dim, ) or (N, dim)) – Positions of atoms to be found. If input shape is (dim, ), it will be reshaped into (1, dim) and N = 1.
- Returns:
atoms_index (array of int, shape (N, )) – The indices of atoms.
translation (array of int, shape (N, dim)) – The translation that will take the atoms in the crystal to the input atom position.
- classmethod from_primitive(primitive, supa)
Construct CrystalFTG from Crystal and a supercell.
- Parameters:
primitive (Crystal) – The Crystal object of a primitive cell.
supa (array of int, shape(dim, dim)) – The supercell matrix.
- Returns:
new – The produced CrystalFTG object.
- Return type:
- get_basis_at_q(qpoint)
Compute the basis vectors of the primitive cell orbitals at a q-point.
The input q-point has to fit in the supercell.
- Parameters:
qpoint (array of Fraction, shape(dim, )) – A q-point.
- Returns:
basis – The dictionary of the basis vectors of the primitive cell orbitals.
- Return type:
dict with tuple(int, str) as keys and array of complex, shape(natoms, dim) as values
- get_wigner_seitz_cell(center)
Find atoms in the Wigner Seitz (WS) cell at a given center.
- Parameters:
center (array of float, shape(self.dim)) – The coordinate of the center of the WS cell in lattice coordinate.
- Returns:
ws_cell_translation (array of int, shape(N, self.dim)) – The primitive translation vector of the WS atom.
N
is the total number of the atoms in the WS cell.ws_cell_atoms (array of int, shape(N)) – The index of the WS atom in the primitive cell.
ws_cell_weights (array of float, shape(N)) – The weight of the WS atom.
- property invsupa
The inverse of the supercell matrix.
- property orbitals
A list of all orbitals of atoms in the cluster.
- rotate(rotation)
Rotate atoms (in place).
- Parameters:
rotation (arrat of floats, shape(dim, dim)) – The rotation matrix in column convention.
- shift_atom(atom_index, shift)
Shift an atom.
- Parameters:
atom_index (int) – Index of the atom to shift.
shift (float or array of float, shape(dim, )) – The shift amount.
- property species_names
A list of names of species.
- property supa
The supercell matrix.
- property supa_atoms_map
The atom indices of the supercell atoms with respect to their corresponding atoms in primitive cell.
- property supa_translations
The translation vectors of the supercell atoms with respect to their corresponding atoms in primitive cell.
- to_dict()
Return a dictionary containing key information about the CrystalFTG object.
- property tol
Error tolerance.
- principia_materia.translation_group.crystal_ftg.get_crystal_ftg_io_wrapper(title='CrystalFTG')
YAML data wrapper for CrystalFTG class.