pyscf.pbc.symm package

Submodules

pyscf.pbc.symm.basis module

Symmetry adapted crystalline Gaussian orbitals for symmorphic space groups

pyscf.pbc.symm.basis.symm_adapted_basis(cell, kpts, tol=1e-09)[source]

pyscf.pbc.symm.geom module

pyscf.pbc.symm.geom.get_crystal_class(cell, ops=None, tol=1e-06)[source]
pyscf.pbc.symm.geom.search_point_group_ops(cell, tol=1e-06)[source]
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}\).

abstract static elements_from_hash(hashes, **kwargs)[source]
get_elements_map(other)[source]
get_irrep_chi(ir)[source]
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.

issubset(other)[source]
property multiplication_table

Multiplication table of the group.

Return(n, n) array of ints

The indices of elements.

property order
project_chi(chi, other)[source]

Project characters to another group.

class pyscf.pbc.symm.group.GroupElement[source]

Bases: ABC

The abstract class for group elements.

abstract inv()[source]

Inverse of the group element.

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.

static decrypt_hash(h, dimension=3)[source]
inv()[source]

Inverse of the group element.

property matrix
property rot
class pyscf.pbc.symm.group.PointGroup(elements, from_hash=False)[source]

Bases: FiniteGroup

The class for crystallographic point groups.

static elements_from_hash(hashes, dimension=3)[source]
property group_index
group_name(notation='international')[source]
class pyscf.pbc.symm.group.Representation(group, rep=None, chi=None)[source]

Bases: object

Helper class for representation reductions. Only characters are stored at the moment.

property chi
chi_to_rep(chi)[source]
property rep
rep_to_chi(rep)[source]

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.

a2b(cell)[source]

Transform from direct lattice system to reciprocal lattice system.

a2r(cell)[source]

Transform from direct lattice system to Cartesian coordinate system.

b2a(cell)[source]

Transform from reciprocal lattice system to direct lattice system.

b2r(cell)[source]

Transform from reciprocal lattice system to Cartesian coordinate system.

dot(r_or_op)[source]

Operates on a point or multiplication of two operators

dot_rot(r)[source]

Rotate a point (without translation)

inv()[source]

Inverse of self

property is_eye

Whether self is identity operation.

property is_inversion

Whether self is inversion operation.

r2a(cell)[source]

Transform from Cartesian coordinate system to direct lattice system.

r2b(cell)[source]

Transform from Cartesian coordinate system to reciprocal lattice system.

property rot_is_eye
property rot_is_inversion
property trans_is_zero
transform(a, b, allow_non_integer=False)[source]

Transform from \(\mathbf{a}\) basis system to \(\mathbf{b}\) basis system.

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

build(dump_info=True)[source]
dump_info(ops=None)[source]
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 object

spacegroup : 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-matries

l_maxint

Maximum angular momentum considered in Dmats

build(space_group_symmetry=True, symmorphic=True, check_mesh_symmetry=True, *args, **kwargs)[source]
check_mesh_symmetry(cell=None, ops=None, mesh=None, tol=1e-06, return_mesh=False)[source]
dump_info()[source]
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.get_Dmat_cart(op, l_max)[source]
pyscf.pbc.symm.symmetry.is_eye(op)[source]
pyscf.pbc.symm.symmetry.is_inversion(op)[source]
pyscf.pbc.symm.symmetry.make_Dmats(cell, ops, l_max=None)[source]

Computes < m | R | m’ >

pyscf.pbc.symm.symmetry.make_rot_loc(l_max, key)[source]
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

opSPGElement 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