vayesta.core.symmetry
Submodules
vayesta.core.symmetry.group
- class vayesta.core.symmetry.group.SymmetryGroup(mol, xtol=1e-08, check_basis=True, check_label=False)[source]
Bases:
object
Detect symmetry group automatically (use spglib?).
- property natom
- property nao
- property dimension
- compare_atoms(atom1, atom2, check_basis=None, check_label=None)[source]
Compare atom symbol and (optionally) basis between atom1 and atom2.
vayesta.core.symmetry.operation
- class vayesta.core.symmetry.operation.SymmetryOperation(group)[source]
Bases:
object
- property mol
- property xtol
- property natom
- property nao
- call_wrapper(a, *args, axis=0, **kwargs)[source]
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- class vayesta.core.symmetry.operation.SymmetryIdentity(group)[source]
Bases:
SymmetryOperation
- get_atom_reorder()[source]
Reordering of atoms for a given rotation.
- Returns:
reorder (list)
inverse (list)
- call_kernel(*args, **kwargs)
- call_wrapper(a, *args, axis=0, **kwargs)
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- get_ao_reorder(atom_reorder)
- property mol
- property nao
- property natom
- rotate_angular_orbitals(a, rotmats)
Rotate between orbitals in p,d,f,… shells.
- property xtol
- class vayesta.core.symmetry.operation.SymmetryInversion(group, center=(0, 0, 0))[source]
Bases:
SymmetryOperation
- call_wrapper(a, *args, axis=0, **kwargs)
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- get_ao_reorder(atom_reorder)
- get_atom_reorder()
Reordering of atoms for a given rotation.
- Returns:
reorder (list)
inverse (list)
- property mol
- property nao
- property natom
- rotate_angular_orbitals(a, rotmats)
Rotate between orbitals in p,d,f,… shells.
- property xtol
- class vayesta.core.symmetry.operation.SymmetryReflection(group, axis, center=(0, 0, 0))[source]
Bases:
SymmetryOperation
- call_wrapper(a, *args, axis=0, **kwargs)
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- get_ao_reorder(atom_reorder)
- get_atom_reorder()
Reordering of atoms for a given rotation.
- Returns:
reorder (list)
inverse (list)
- property mol
- property nao
- property natom
- rotate_angular_orbitals(a, rotmats)
Rotate between orbitals in p,d,f,… shells.
- property xtol
- class vayesta.core.symmetry.operation.SymmetryRotation(group, rotvec, center=(0, 0, 0))[source]
Bases:
SymmetryOperation
- call_wrapper(a, *args, axis=0, **kwargs)
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- get_ao_reorder(atom_reorder)
- get_atom_reorder()
Reordering of atoms for a given rotation.
- Returns:
reorder (list)
inverse (list)
- property mol
- property nao
- property natom
- rotate_angular_orbitals(a, rotmats)
Rotate between orbitals in p,d,f,… shells.
- property xtol
- class vayesta.core.symmetry.operation.SymmetryTranslation(group, vector, boundary=None, atom_reorder=None, ao_reorder=None)[source]
Bases:
SymmetryOperation
- property lattice_vectors
- property inv_lattice_vectors
- property boundary_phases
- property vector_xyz
Translation vector in real-space coordinates (unit = Bohr).
- property inverse_atom_reorder
- apply_to_point(r0)
- call_wrapper(a, *args, axis=0, **kwargs)
Common pre- and post-processing for all symmetries.
Symmetry specific processing is performed in call_kernel.
- get_atom_reorder()[source]
Reordering of atoms for a given translation.
- Returns:
reorder (list)
inverse (list)
phases (list)
- property mol
- property nao
- property natom
- rotate_angular_orbitals(a, rotmats)
Rotate between orbitals in p,d,f,… shells.
- property xtol
vayesta.core.symmetry.symmetry
- vayesta.core.symmetry.symmetry.angle_between(v1, v2)[source]
Returns the angle in radians between vectors ‘v1’ and ‘v2’:
>>> angle_between((1, 0, 0), (0, 1, 0))
1.5707963267948966 >>> angle_between((1, 0, 0), (1, 0, 0)) 0.0 >>> angle_between((1, 0, 0), (-1, 0, 0)) 3.141592653589793
- class vayesta.core.symmetry.symmetry.Symmetry(mf, log=<Logger vayesta.core.symmetry.symmetry (INFO)>)[source]
Bases:
object
- property mol
- property cell
- property natom
- property natom_unique
- property pbcndims
0 = No PBC, 1 = 1D 2 = 2D, 3 = 3D.
- Type:
Number of periodic boundary conditions
- property has_pbc
- compare_atoms(atom1, atom2, respect_labels=False, respect_basis=True)[source]
Compare atom symbol and (optionally) basis between atom1 and atom2.
- find_subcells(respect_basis=True, respect_labels=False, respect_dm1=None, r_tol=1e-05, dm1_tol=1e-06)[source]
Find subcells within cell, with unit cell vectors parallel to the supercell.
- Parameters:
respect_basis (bool, optional) – If True, the basis functions are considered when determining the symmetry. Default: True.
respect_labels (bool, optional) – If True, the labels of atoms (such as “H1” or “C*”) are considered when determining the symmetry. Default: False.
respect_dm1 (array or None, optional) – If a (tuple of) density-matrix is passed, it is considered when determining the symmetry. Default: None.
r_tol (float, optional) – Real space tolerance to determine if two atoms are symmetry equivalent. Default: 1e-5.
dm1_tol (float, optional) – Density-matrix tolerance to determine the symmetry. Default: 1e-6.
- Returns:
nsubcells – Number of primitive subcells in (a0, a1, a2) direction.
- Return type:
tuple(3)
vayesta.core.symmetry.tsymmetry
Translational symmetry module.
- vayesta.core.symmetry.tsymmetry.tsymmetric_atoms(cell, rvecs, xtol=1e-08, unit='Ang', check_element=True, check_basis=True)[source]
Get indices of translationally symmetric atoms.
- Parameters:
cell (pyscf.pbc.gto.Cell) – Unit cell.
rvecs ((3, 3) array) – The rows contain the real space translation vectors.
xtol (float, optional) – Tolerance to identify equivalent atom positions. Default: 1e-8
unit (['Ang', 'Bohr']) – Unit of rvecs and xtol. Default: ‘Ang’.
- Returns:
indices – List with length cell.natm. Each element represents the lowest atom index of a translationally symmetry equivalent atom.
- Return type:
list