pyscf.pbc.symm package#
Submodules#
pyscf.pbc.symm.basis module#
Symmetry adapted crystalline Gaussian orbitals for symmorphic space groups
pyscf.pbc.symm.geom module#
- pyscf.pbc.symm.geom.search_space_group_ops(cell, rotations=None, tol=1e-06)[source]#
Search for the allowed space group operations for a specific cell.
- Notes:
The current implementation treats the cell with the spins on all atoms flipped as the same as the original cell. If this is not desired, then one can use different names for the two sets of atoms and set their magnetic moment to 0.
pyscf.pbc.symm.group module#
- class pyscf.pbc.symm.group.FiniteGroup(elements, from_hash=False)[source]#
Bases:
ABC
The class for finite groups.
- Attributes:
- elementslist
Group elements.
- orderint
Group order.
- character_table(return_full_table=False, recompute=False)[source]#
Character table of the group.
- Args:
- return_full_tablebool
If True, return the characters for all elements.
- recomputebool
Whether to recompute the character table. Default is False, meaning to use the cached table if possible.
- Returns:
- chartabarray
Character table for classes.
- chartab_fullarray, optional
Character table for all elements.
- conjugacy_classes()[source]#
Compute conjugacy classes.
- Returns:
- classes(n_irrep,n) boolean array
The indices of True correspond to the indices of elements in this class.
- representatives(n_irrep,) array of ints
Representive elements’ indices in each class.
- inverse(n,) array of ints
The indices to reconstruct conjugacy_mask from classes.
- property conjugacy_mask#
Boolean mask array indicating whether two elements are conjugate with each other.
- property conjugacy_table#
conjugacy_table[index_g, index_x] returns the index of element h, where \(h = x * g * x^{-1}\).
- property hash_table#
Hash table for group elements: {hash : index}.
- property inverse_table#
Table for inverse of the group elements.
- Return(n,) array of ints
The indices of elements.
- property multiplication_table#
Multiplication table of the group.
- Return(n, n) array of ints
The indices of elements.
- property order#
- class pyscf.pbc.symm.group.PGElement(matrix)[source]#
Bases:
GroupElement
The class for crystallographic point group elements. The group elements are rotation matrices represented in lattice translation vector basis.
- Attributes:
- matrix(d,d) array of ints
Rotation matrix in lattice translation vector basis.
- dimensionint
Dimension of the space: d.
- property matrix#
- property rot#
- class pyscf.pbc.symm.group.PointGroup(elements, from_hash=False)[source]#
Bases:
FiniteGroup
The class for crystallographic point groups.
- property group_index#
pyscf.pbc.symm.pyscf_spglib module#
pyscf.pbc.symm.space_group module#
- class pyscf.pbc.symm.space_group.SPGElement(rot=array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=int32), trans=array([0., 0., 0.]), dimension=3)[source]#
Bases:
object
Matrix representation of space group operations
- Attributes:
- rot(d,d) array
Rotation operator.
- trans(d,) array
Translation operator.
- dimensionint
Dimension of the space: d.
- property is_eye#
Whether self is identity operation.
- property is_inversion#
Whether self is inversion operation.
- property rot_is_eye#
- property rot_is_inversion#
- property trans_is_zero#
- class pyscf.pbc.symm.space_group.SpaceGroup(cell, symprec=1e-06)[source]#
Bases:
StreamObject
Determines the space group of a lattice.
- Attributes:
cell :
Cell
object- symprecfloat
Numerical tolerance for determining the space group. Default value is 1e-6 in the unit of length.
- verboseint
Print level. Default value equals to cell.verbose.
- backend: str
Choose which backend to use for symmetry detection. Default is pyscf and other choices are spglib.
- opslist of
SPGElement
objects Matrix representation of the space group operations (in direct lattice system).
- nopint
Order of the space group.
- groupnamedict
Standard symbols for symmetry groups. groupname[‘point_group_symbol’]: point group symbol groupname[‘international_symbol’]: space group symbol groupname[‘international_number’]: space group number
- pyscf.pbc.symm.space_group.transform_rot(op, a, b, allow_non_integer=False)[source]#
Transform rotation operator from \(\mathbf{a}\) basis system to \(\mathbf{b}\) basis system.
- Note:
This function raises error when the point-group symmetries of the two basis systems are different.
- Arguments:
- op(3,3) array
Rotation operator in \(\mathbf{a}\) basis system.
- a(3,3) array
Basis vectors of \(\mathbf{a}\) basis system (row-major).
- b(3,3) array
Basis vectors of \(\mathbf{b}\) basis system (row-major).
- allow_non_integerbool
Whether to allow non-integer rotation matrix in the new basis system. Defualt value is False.
- Returns:
- A (3,3) array
Rotation operator in \(\mathbf{b}\) basis system.
- pyscf.pbc.symm.space_group.transform_trans(op, a, b)[source]#
Transform translation operator from \(\mathbf{a}\) basis system to \(\mathbf{b}\) basis system.
- Arguments:
- op(3,) array
Translation operator in \(\mathbf{a}\) basis system.
- a(3,3) array
Basis vectors of \(\mathbf{a}\) basis system (row-major).
- b(3,3) array
Basis vectors of \(\mathbf{b}\) basis system (row-major).
- Returns:
- A (3,) array
Translation operator in \(\mathbf{b}\) basis system.
pyscf.pbc.symm.symmetry module#
- class pyscf.pbc.symm.symmetry.Symmetry(cell)[source]#
Bases:
object
Symmetry info of a crystal.
- Attributes:
cell :
Cell
objectspacegroup :
SpaceGroup
object- symmorphicbool
Whether space group is symmorphic
- has_inversionbool
Whether space group contains inversion operation
- opslist of
SPGElement
object Symmetry operators (may be a subset of the operators in the space group)
- nopint
Length of ops.
- Dmatslist of 2d arrays
Wigner D-matrices
- l_maxint
Maximum angular momentum considered in Dmats
- pyscf.pbc.symm.symmetry.check_mesh_symmetry(cell, ops, mesh=None, tol=1e-06, return_mesh=False)[source]#
- pyscf.pbc.symm.symmetry.get_Dmat(op, l)[source]#
Get Wigner D-matrix
- Args:
- op(3,3) ndarray
rotation operator in (x,y,z) system
- lint
angular momentum
- pyscf.pbc.symm.symmetry.transform_1e_operator(cell, kpt_scaled, fock, op, Dmats)[source]#
Get 1-electron operator for a symmetry-related k-point
- pyscf.pbc.symm.symmetry.transform_dm(cell, kpt_scaled, dm, op, Dmats)[source]#
Get density matrix for a symmetry-related k-point
- pyscf.pbc.symm.symmetry.transform_mo_coeff(cell, kpt_scaled, mo_coeff, op, Dmats)[source]#
Get MO coefficients at a symmetry-related k-point
- Args:
cell :
Cell
object- kpt_scaled(3,) array
scaled k-point
- mo_coeff(nao, nmo) array
MO coefficients at the input k-point
- op
SPGElement
object Space group operation that connects the two k-points
- Dmats: list of arrays
Wigner D-matrices for op
- Returns:
MO coefficients at the symmetry-related k-point
pyscf.pbc.symm.tables module#
Module contents#
Space group symmetry for PBC calculations