green_mbtools.mint¶
green_mbtools.mint.common_utils¶
- green_mbtools.mint.common_utils.add_common_params(parser)[source]¶
Define common command line arguments for Green python module
- green_mbtools.mint.common_utils.add_pbc_params(parser)[source]¶
Define PBC-specific command line arguments for Green python module
- green_mbtools.mint.common_utils.check_high_symmetry_path(args)[source]¶
Check that selected high-symmetry path is correct for the chosen simulation parameters
- Parameters:
args (map) – simulation parameters
- green_mbtools.mint.common_utils.compute_df_int_dca(args, mycell, kmesh, lattice_kmesh, nao, X_k)[source]¶
Generate density-fitting integrals for correlated methods using q-averaging over the super-lattice points to compensate finite-size error
- Parameters:
args (map) – simulation parameters
mycell (pyscf.pbc.Cell or pyscf.Mol) – unit cell object
kmesh (numpy.ndarray) – reciprocal space grid
lattice_kmesh (numpy.ndarray) – super-lattice k-points
nao (int) – number of atomic orbitals in the unit cell
X_k (numpy.ndarray) – trasformation matrix for projection onto an orthogonal space
- green_mbtools.mint.common_utils.compute_ewald_correction(args, cell, kmesh, filename, X_k=None)[source]¶
- green_mbtools.mint.common_utils.construct_gdf(args, mycell, kmesh=None)[source]¶
Construct Gaussian Density Fitting obejct for a given parameters and unit cell. We make sure to disable range-separeting implementation
- green_mbtools.mint.common_utils.construct_mol_gdf(args, mycell)[source]¶
Construct Gaussian Density Fitting obejct for a given parameters and unit cell. We make sure to disable range-separeting implementation
- green_mbtools.mint.common_utils.extract_ase_data(a, atoms)[source]¶
For a given data in XYZ format generate parameters in ASE format
- Parameters:
a (str) – string containing lattice vectros in XYZ format
atoms (str) – string containin atoms positions in XYZ format
- Returns:
numpy array of lattice vectors, list of atom symbols, and list of atom coordinates
- Return type:
tuple
- green_mbtools.mint.common_utils.fold_back_to_1stBZ(kpts)[source]¶
Map each k-point from a given list of scaled k-points into the first Brillouin zone
- Parameters:
kpts (numpy.ndarray) – list of k-points
- Returns:
k-points folded into 1st Brillouin-zone
- Return type:
numpy.ndarray
- green_mbtools.mint.common_utils.high_symmetry_path(cell, args)[source]¶
Compute high-symmetry k-path
- Parameters:
cell (pyscf.pbc.Cell) – unit-cell object
args (map) – simulation parameters
- Returns:
k-points on the chosen high-symmetry path; corresponding non-interacting Hamiltonian and overlap matrix, and linear k-point axis and labels (used in band structure plots)
- Return type:
tuple
- green_mbtools.mint.common_utils.init_k_mesh(args, mycell)[source]¶
init k-points mesh for GDF
- Parameters:
args (map) – simulation parameters
mycell (pyscf.pbc.Cell) – unit cell for simulation
- Returns:
numpy.ndarray – k-mesh for the Brillouin Zone
numpy.ndarray – k-mesh with unique k-points, forming the irreducible k-mesh
numpy.ndarray – indices of irreducible k-points in the input k-list
numpy.ndarray – truth table for whether a k-point has an irreducible time-reversal equivalent
numpy.ndarray – weights for each irreducible k-point (degeneracy)
numpy.ndarray – inverse index, associating each k-point with its unique equivalent
int – number of irreducible k-points
- green_mbtools.mint.common_utils.init_mol_params(params=None)[source]¶
Initialize argparse.ArgumentParser for Green/WeakCoupling python module and return a prased parameters map with parameters specific for molecular calculations
- green_mbtools.mint.common_utils.init_pbc_params(params=None)[source]¶
Initialize argparse.ArgumentParser for Green/WeakCoupling python module and return a prased parameters map with parameters specific for periodic calculations
- green_mbtools.mint.common_utils.init_q_mesh(args, mycell, k_mesh, save_data=True)[source]¶
Initialize q-mesh for GDF
- Parameters:
mycell (pyscf.pbc.Cell) – unit cell for simulation
k_mesh (numpy.ndarray) – k-mesh for the Brillouin Zone
- Returns:
q-mesh struct for the Brillouin Zone
- Return type:
pyscf.pbc.lib.kpts.KPoints
- green_mbtools.mint.common_utils.inversion_sym(kmesh_scaled)[source]¶
For a given list of the scaled k-points in the full Brillouin zone select k-points that are equivalent by the time-reversal symmetry and return them and their corresponding weight and index
- Parameters:
kpts (numpy.ndarray) – list of scaled k-points
- Returns:
numpy.ndarray – indices of irreducible k-points in the input k-list
numpy.ndarray – inverse index, associating each k-point with its unique equivalent
numpy.ndarray – weights for each irreducible k-point (degeneracy)
numpy.ndarray – truth table for whether a k-point has an irreducible time-reversal equivalent
- green_mbtools.mint.common_utils.mol_cell(args)[source]¶
Initialize PySCF unit cell object for a given system
- green_mbtools.mint.common_utils.orthogonalize(mydf, orth, X_k, X_inv_k, F, T, hf_dm, S, mf=None)[source]¶
Transform Fock-matrix, non-interacting Hamiltonian, density matrix and overlap matrix into an orthogonal basis.
orthselects the per-k transformation:“none” : identity (AO basis preserved)
“lowdin” : symmetric S^{-1/2} orthogonalization
“mo” : canonical molecular orbitals from
mf.mo_coeff“natural” : natural orbitals from the mean-field density matrix
mfis required for “mo”; “natural” useshf_dm. Per-k basis construction is delegated toortho_utils.{lowdin,mo,natural}_per_k.
- green_mbtools.mint.common_utils.parse_basis(basis_list)[source]¶
Parse information about chosen basis sets
- Parameters:
basis_list (str) – basis-set information
- Returns:
basis-set information usable in initialization of pyscf Cell object
- Return type:
list
- green_mbtools.mint.common_utils.pbc_cell(args)[source]¶
Initialize PySCF unit cell object for a given system
- green_mbtools.mint.common_utils.print_high_symmetry_points(args)[source]¶
For given simulation parameters, generate and print list of lattice special points
- Parameters:
args (map) – simulation parameters
- green_mbtools.mint.common_utils.read_dm(dm0, dm_file)[source]¶
Read density matrix from smaller kmesh
- green_mbtools.mint.common_utils.save_data(args, mycell, mf, kmesh, ind, weight, num_ik, ir_list, conj_list, Nk, nk, NQ, F, S, T, hf_dm, madelung, Zs, last_ao)[source]¶
Save data in Green/WeakCoupling format into a hdf5 file
- green_mbtools.mint.common_utils.solve_mean_field(args, mydf, mycell)[source]¶
Obtain pySCF mean-field solution for a given parameters, unit-cell object and density-fitting object
- green_mbtools.mint.common_utils.solve_mol_mean_field(args, mydf, mycell)[source]¶
Obtain pySCF mean-field solution for a given parameters, unit-cell object and density-fitting object
- green_mbtools.mint.common_utils.store_auxcell_kstruct_ops_info(args, auxcell, kmesh)[source]¶
Store symmetry operation information for k-points into hdf5 file in Green’WeakCoupling format for auxcell only case
- Parameters:
args (map) – simulation parameters
auxcell (pyscf.pbc.gto.Cell) – auxiliary unit cell for density-fitting
kmesh (numpy.ndarray) – k-mesh for the Brillouin Zone
aux_kstruct (pyscf.pbc.symm.KPointsSymmetry) – k-point symmetry structure for aux-basis
- green_mbtools.mint.common_utils.store_k_grid(args, mycell, kmesh, k_ibz, ir_list, conj_list, weight, ind, num_ik, kstruct=None)[source]¶
Store reciprocal space information into a hdf5 file in Green’WeakCoupling format
- green_mbtools.mint.common_utils.store_kstruct_ops_info(args, mycell, kmesh, kstruct, X_k=None, X_inv_k=None)[source]¶
Store symmetry operation information for k-points into a hdf5 file in Green’WeakCoupling format
- Parameters:
args (map) – simulation parameters
mycell (pyscf.pbc.Cell) – unit cell for simulation
kmesh (numpy.ndarray) – k-mesh for the Brillouin Zone
kstruct (pyscf.pbc.symm.KPointsSymmetry) – k-point symmetry structure
X_k (numpy.ndarray, optional) – Orthogonalization matrices in the full BZ, shape
(nk, nao, nao)(or spin-orbital analog). Required together withX_inv_kwhenargs.orth != "none"to rotate AO-space symmetry operators into the orthogonalized basis.X_inv_k (numpy.ndarray, optional) – Inverse orthogonalization matrices on irreducible k-points, indexed by
kstruct.bz2ibzrepresentatives. Used asX_k[k] @ U_ao[k] @ X_inv_k[k_ir].
Notes
The function writes/updates the following datasets under
/symmetry/kinargs.output_path:n_stars: number of k-point stars.stars/<i>: indices of BZ points in stari.k_sym_transform_ao: one AO-space symmetry transform per BZ k-point, mapping each point to its representative irreducible k-point.
For
args.x2c < 2,k_sym_transform_aois built fromget_representation. Forargs.x2c == 2, the full double-group spinor representation \(D^{1/2}(R^{-1}) \otimes U_\text{orbital}(R^{-1})\) is stored viaget_spinor_representation().- Returns:
Data is written directly to the HDF5 file.
- Return type:
None
- green_mbtools.mint.common_utils.store_mol_symmetry_info(args, mycell, auxcell, kmesh=None)[source]¶
Store trivial symmetry information for molecular calculations.
Molecular cases use a single Gamma-point only, so the k- and q-mesh symmetry datasets are all one-point identity mappings.
- green_mbtools.mint.common_utils.transform(Z, X, X_inv)[source]¶
Transform Z into X basis
- Parameters:
Z (numpy.ndarray) – Object to be transformed
X (numpy.ndarray) – Transformation matrix
X_inv (numpy.ndarray) – Inverse transformation matrix
- Returns:
Z in new basis
- Return type:
numpy.ndarray
green_mbtools.mint.gdf_s_metric¶
- green_mbtools.mint.gdf_s_metric.compute_j2c_sqrt(uniq_kptji_id, j2c, linear_dep_threshold=1e-09)[source]¶
- green_mbtools.mint.gdf_s_metric.make_j2c_sqrt(mydf, cell, space_symm=True, tr_symm=True, rsgdf=False)[source]¶
- green_mbtools.mint.gdf_s_metric.make_j3c(mydf, cell, j2c_sqrt=True, exx=False, space_symm=False, tr_symm=True)[source]¶
The inefficient incore version of make_j3c
green_mbtools.mint.integral_utils¶
- class green_mbtools.mint.integral_utils.GreenGDF(cell, kpts=array([[0., 0., 0.]]))[source]¶
Bases:
GDF
- green_mbtools.mint.integral_utils.cholesky_decomposed_metric(j2c_k, cell, inv=False)[source]¶
Calculate the Cholesky decomposition of the j2c metric for a given k-point, or its inverse if requested.
- Parameters:
j2c_k (_type_) – j2c metric for a specific k-point.
cell (_type_) – information about the unit cell, used for error handling and potential adjustments based on dimensionality.
inv (bool, optional) – Whether to return the inverse of the Cholesky decomposition, by default False
- Returns:
j2c_sqrt_k or j2c_sqrt_inv_k (ndarray) – Cholesky decomposition of the j2c metric (lower triangular matrix L such that j2c_k = L @ L†) or its inverse (L⁻¹), depending on the value of inv.
j2c_negative (ndarray or None) – If the j2c metric has negative eigenvalues (which can occur in 2D systems with certain Fourier transform conventions), this will contain the corresponding eigenvectors. Otherwise, it will be None.
- green_mbtools.mint.integral_utils.compute_ewald_correction(args, maindf, kmesh, nao, filename='df_ewald.h5', X_k=None)[source]¶
- green_mbtools.mint.integral_utils.compute_integrals(args, mycell, mydf, kmesh, nao, X_k=None, basename='df_int', cderi_name='cderi.h5', keep=True, keep_after=False, cderi_name2='cderi_ewald.h5')[source]¶
- green_mbtools.mint.integral_utils.get_coarsegrained_coulG(lattice_kmesh, cell, k=array([0., 0., 0.]), exx=False, mf=None, mesh=None, Gv=None, wrap_around=True, omega=None, **kwargs)[source]¶
Calculate the coarse-grained Coulomb kernel for all G-vectors, handling G=0 and exchange. This routine overrides get_coulG to perform interaction coarse-graining.
green_mbtools.mint.kpt_utils¶
- green_mbtools.mint.kpt_utils.build_q_struct(mycell, k_mesh, space_symm=False, tr_symm=True)[source]¶
Initialize q-mesh for GDF
- Parameters:
mycell (pyscf.pbc.Cell) – unit cell for simulation
k_mesh (numpy.ndarray) – k-mesh for the Brillouin Zone
space_symm (bool) – utilize space group symmetry for qmesh reduction
tr_symm (bool) – utilize time-reversal symmetry for qmesh reduction
- Returns:
q-mesh struct for the Brillouin Zone
- Return type:
pyscf.pbc.lib.kpts.KPoints
green_mbtools.mint.namespace¶
green_mbtools.mint.ortho_utils¶
- green_mbtools.mint.ortho_utils.build_X_kspace(mode, kstruct, mycell, S_ibz, *, F_ibz=None, dm_ibz=None, mo_coeff_ibz=None, spinor=False, tol_sing=1e-09, tol_degen=1e-08)[source]¶
Build orthogonalization matrices
(X_k, X_inv_k)over the full BZ.Xis constructed only at IBZ k-points using one of the per-k primitives, then propagated to every star member via the space-group + time-reversal representations carried bykstruct. See_propagate_X_to_starfor the convention.- Parameters:
mode ({"lowdin", "symmetric_lowdin", "mo", "natural"}) – IBZ primitive to use.
kstruct (pyscf.pbc.lib.kpts.KPoints) – Same object the rest of mbtools uses (e.g. from
kpt_utils.build_q_struct(mycell, kmesh, space_symm=True, tr_symm=True)).mycell (pyscf.pbc.gto.Cell) – Required for the AO-space representations.
S_ibz ((n_ibz, n, n) ndarray) – Overlap at IBZ k-points, in the order
kstruct.kpts_scaled[kstruct.ibz2bz].F_ibz ((n_ibz, n, n) ndarray, optional) – Fock at IBZ. Required for
mode="natural"(degeneracy tie-breaking) and formode="mo"whenmo_coeff_ibzis not provided (spin-averaged Fock is used to derive MOs).dm_ibz ((n_ibz, n, n) ndarray, optional) – Spin-averaged / total density matrix at IBZ. Required for
mode="natural".mo_coeff_ibz ((n_ibz, n, n_mo) ndarray, optional) – MO coefficients at IBZ. Preferred input for
mode="mo".spinor (bool, default False) – If True, use the double-group spinor representation (
get_spinor_representation). Currently only supported withmode="lowdin".tol_sing (float) – Threshold for discarding small eigenvalues of
Sin the Löwdin primitive.tol_degen (float) – Tolerance used by the natural-mode Fock tie-breaker to detect degenerate occupation blocks.
- Returns:
X_k ((nk, n_ortho, n) complex128 ndarray)
X_inv_k ((nk, n, n_ortho) complex128 ndarray)
- green_mbtools.mint.ortho_utils.build_X_kspace_from_ao_reps(mode, S_ibz, ibz2bz, bz2ibz, k_sym_transform_ao, *, tr_conj=None, F_ibz=None, dm_ibz=None, mo_coeff_ibz=None, tol_sing=1e-09, tol_degen=1e-08)[source]¶
Build
(X_k, X_inv_k)from precomputed AO-space rotations.Identical to
build_X_kspacebut consumes the symmetry information thatcommon_utils.store_kstruct_ops_infoalready writes intoinput.h5under/symmetry/k—ibz2bz(n_ibz,) BZ indices of IBZ repsbz2ibz(nk,) IBZ index for each BZ pointk_sym_transform_ao(nk, n, n) stored AO rotation U(k)tr_conj(nk,) bool TR partner flags
— instead of (kstruct, mycell). Designed for callers like the SEET pre-processor which read these arrays from h5 and do not carry a PySCF
KPointsobject.For non-TR points,
M(k) = U M(k_ir) U†; for TR points the storedUalready incorporates the conjugation factor (e.g. for X2C double group,(U_spinor @ Θ).conj()) and the reconstruction isM(k) = (U M(k_ir) U†).conj(). The function applies the matching rule for X automatically — callers do not need to special-case TR.Parameters mirror
build_X_kspace;modesemantics are identical.spinoris implicit in the basis size ofS_ibz/k_sym_transform_ao(both arenso × nsofor X2C).- Returns:
X_k ((nk, n_ortho, n) complex128 ndarray)
X_inv_k ((nk, n, n_ortho) complex128 ndarray)
- green_mbtools.mint.ortho_utils.lowdin_per_k(Sk, tol=1e-09)[source]¶
Symmetric (Löwdin) S^{-1/2} orthogonalization for a single k-point.
Returns
(X, X_inv)in the convention used bycommon_utils.transform(i.e. transforms apply asX Z X†):X = S^{-1/2} (shape (n_ortho, nao)) X_inv = S^{+1/2} (shape (nao, n_ortho))
Eigenvalues of
Skbelowtolare discarded.
- green_mbtools.mint.ortho_utils.mo_per_k(Sk, C_k)[source]¶
Canonical-MO basis for a single k-point from MO coefficients
C_ksatisfyingC† S C = I.Returns
(X = C†, X_inv = S C)in theX Z X†convention.
- green_mbtools.mint.ortho_utils.natural_per_k(Sk, dmk)[source]¶
Natural-orbital basis at one k-point from density matrix
dmk.Diagonalises
S^{-1/2} dm S^{-1/2}to obtain S-orthonormal natural orbitalsC_NO = S^{-1/2} u(columns) withC_NO† S C_NO = IandC_NO† dm C_NO = diag(occ). Returns(X, X_inv)in the sameX Z X†convention asmo_per_k:X = C_NO† (shape (n_ortho, nao)) X_inv = S @ C_NO (shape (nao, n_ortho))
- green_mbtools.mint.ortho_utils.symmetric_lowdin_per_k(Sk, tol=1e-09)[source]¶
Symmetric (Hermitian) Löwdin orthogonalization for a single k-point.
Returns
(X = S^{-1/2}, X_inv = S^{+1/2})— both Hermitian(nao, nao)matrices — in theX Z X†convention. Distinguished fromlowdin_per_k(canonical Löwdin) by being Hermitian rather than rectangular.Eigenvalues of
Skbelowtolare treated pseudo-inversely: their contribution is zeroed in bothXandX_inv, the same conventionLA.pinvapplies (seepesto/orth.py). The output stays Hermitian and square, but in the rank-deficient caseX @ X_invreduces to the projector onto the kept subspace rather than the identity (Hermitian symmetric Löwdin cannot simultaneously be a strict left inverse on a rank-deficient basis). When linear dependencies are present and a strictX @ X_inv = Icontract is required, uselowdin_per_k(canonical, rectangular).
green_mbtools.mint.pyscf_init¶
- class green_mbtools.mint.pyscf_init.pyscf_init(args)[source]¶
Bases:
objectInitialization class for Green project
- args¶
simulation parameters
- Type:
map
- cell¶
unit cell object
- Type:
pyscf.pbc.cell
- kmesh¶
Monkhorst-Pack reciprocal space grid
- Type:
numpy.ndarray
- class green_mbtools.mint.pyscf_init.pyscf_mol_init(args=None)[source]¶
Bases:
pyscf_initInitialization class for molecular systems in the Green project
- class green_mbtools.mint.pyscf_init.pyscf_pbc_init(args=None)[source]¶
Bases:
pyscf_initInitialization class for periodic / solid-state systems for the Green project
- compute_df_int(nao, X_k)[source]¶
Generate density-fitting (DF) three-center Coulomb integrals for correlated methods.
This routine always produces the mean-field DF integral set written to
args.hf_int_path. A second, correlated DF integral set written toargs.int_pathis generated here only for theewaldfinite-size correction path.Mean-field integrals (written to
args.hf_int_path): Standard DF integrals L^Q_{pq}(k_i, k_j) for all symmetry- irreducible k-point pairs, computed with the bare Coulomb kernel. These are used in the mean-field and Hartree-Fock steps.Finite-size correction handling:
gf2/gw/gw_s: delegates tocompute_twobody_finitesize_correction(), which uses the GF2 Ewald subtraction scheme or the GW plane-wave transformation respectively, then returns early. In these branches,compute_integrals(..., basename=args.int_path, ...)is not called by this function.ewald(default): builds a second set of three-center integrals with the Ewald Coulomb kernel viagreen_igen.df._make_j3cand passes them tocompute_integralsascderi_name2; the diagonal pairs in the output are then replaced by the Ewald-corrected values and written toargs.int_path.
- Parameters:
nao (int) – Number of non-relativistic atomic orbitals per k-point. Always
cell.nao_nr()regardless of the X2C level, because the Coulomb integrals are non-relativistic.X_k (list of ndarray) –
Per-k-point orthogonalisation matrices X(k). The specific form depends on
args.orth:"lowdin"— canonical Löwdin,X(k) = Lambda^{-1/2} V†(rectangular when small eigenvalues of S are dropped)."symmetric_lowdin"— Hermitian Löwdin,X(k) = S(k)^{-1/2}(square; treats sub-tol eigenvalues pseudo-inversely)."mo"— canonical MOs,X(k) = C(k)†withX_inv = S(k) @ C(k)."natural"— natural orbitals,X(k) = C_NO(k)†withX_inv = S(k) @ C_NO(k)andC_NOthe S-orthonormal eigenvectors ofS^{-1/2} dm S^{-1/2}.
When orthogonalisation is disabled (
args.orth == "none"),X_kcontains identity transforms for each k-point rather than an empty list.
green_mbtools.mint.seet_init¶
green_mbtools.mint.symmetry_utils¶
- green_mbtools.mint.symmetry_utils.check_kspace_symmetry_breaking(inp_file, datasets)[source]¶
Report symmetry reconstruction residuals for k-resolved matrix quantities.
- Parameters:
inp_file (string) – Path to input.h5 file that contains all the output from initialization
datasets (list) – List of datasets in the input file, for which symmetry checks need to be performed
- green_mbtools.mint.symmetry_utils.fold_to_unit_cell(r_cart_scaled)[source]¶
Fold a scaled (fractional) coordinate into the primary unit cell.
- Parameters:
r_cart_scaled (array_like) – Scaled/fractional coordinate to be folded, shape (3,). This should be in the same convention as
Cell.get_scaled_atom_coords()(i.e. expressed in units of the lattice vectors, not in Cartesian units). The parameter name is historical and does not imply Cartesian coordinates.mycell (pyscf.pbc.gto.cell.Cell) – The unit cell object from PySCF.
- Returns:
frac (ndarray) – The folded scaled/fractional coordinate within the unit cell, shape (3,). Each component is wrapped into the interval [-0.5, 0.5) to match the atom coordinate convention used elsewhere in this module.
Fold a Cartesian coordinate into the primary unit cell.
Parameters
———–
r_cart_scaled (array_like) – Scaled cartesian coordinate to be folded (3,).
mycell (pyscf.pbc.gto.cell.Cell) – The unit cell object from PySCF.
Returns
———–
r_rel (ndarray) – The folded Cartesian coordinate within the unit cell (3,).
- green_mbtools.mint.symmetry_utils.generate_permutation_info(mycell, symm_op, tol=1e-08, verbose=False)[source]¶
Generate permutation info for given symmetry operation on the atoms of unit cell.
- Parameters:
mycell (pyscf.pbc.gto.cell.Cell) – The unit cell object from PySCF.
symm_op (pyscf.pbc.symm.space_group.SPGElement) – The symmetry operation element from PySCF.
tol (float, optional) – Tolerance for numerical comparisons, by default 1e-10
verbose (bool, optional) – If True, print detailed information, by default False
- Returns:
partner_idx (int) – Index of the atom that is the partner under the symmetry operation.
pos_diff (ndarray) – The positional difference vector due to folding into the unit cell (3,).
- green_mbtools.mint.symmetry_utils.get_orbital_index(atom_idx, n_, L_, mycell)[source]¶
Get the starting and ending index of orbitals for a given atom and angular momentum.
- Parameters:
atom_idx (int) – Index of the atom in the unit cell.
n_ – Principal quantum number.
L_ – Angular momentum quantum number.
mycell (pyscf.pbc.gto.cell.Cell) – The unit cell object from PySCF.
- Returns:
orb_start (int) – Starting index of the orbitals.
orb_end (int) – Ending index of the orbitals.
- green_mbtools.mint.symmetry_utils.get_representation(bz_idx, symm_op_idx, mycell, kstruct, tol=1e-05, verbose=False)[source]¶
Get the representation matrix for given symmetry operation on the atoms of unit cell.
- Parameters:
bz_idx (int) – Index of the k-point in the Brillouin zone.
symm_op_idx (int) – Index of the symmetry operation element from PySCF.
mycell (pyscf.pbc.gto.cell.Cell) – The unit cell object from PySCF.
kstruct (pyscf.pbc.symm.KPointsSymmetry) – k-point symmetry structure for aux-basis
tol (float, optional) – Tolerance for atom-position matching in generate_permutation_info. Default is 1e-5, matching generate_permutation_info’s own default. Note: PySCF stores fractional translations with ~6 decimal places (e.g. 0.666667 instead of 2/3), introducing ~3e-7 residuals after applying the operation. A tighter tol (e.g. 1e-10) would therefore fail for any lattice whose space-group translations are not integers.
verbose (bool, optional) – If True, print detailed information, by default False
- Returns:
repr_matrix – The representation matrix for the symmetry operation (nao, nao).
- Return type:
ndarray
- green_mbtools.mint.symmetry_utils.get_spinor_representation(bz_idx, symm_op_idx, mycell, kstruct, tol=1e-05, verbose=False)[source]¶
Double-group spinor AO representation \(D^{1/2}(R^{-1}) \otimes U_\text{orbital}(R^{-1})\).
Reads the rotation directly from
kstruct.ops[symm_op_idx], converts it to a Cartesian rotation, lifts it to SU(2) viarotation_matrix_to_su2(), and combines it with the orbital representation fromget_representation().PySCF’s
Dmatsuse the passive (inverse) convention \(D^L(R^{-1})\), soget_representation()returns \(U_\text{orbital}(R^{-1})\). The matching SU(2) factor is therefore \(D^{1/2}(R^{-1}) = D^{1/2}(R)^\dagger\), i.e. the conjugate transpose of the direct lift.- Parameters:
bz_idx (int) – Index of the BZ k-point.
symm_op_idx (int) – Index of the symmetry operation in
kstruct.ops.mycell (pyscf.pbc.gto.Cell) – PySCF unit cell.
kstruct (pyscf.pbc.lib.kpts.KPoints) – k-point symmetry structure from
mycell.make_kpts(...).tol (float, optional) – Tolerance passed to get_representation for atom-position matching. Default 1e-5 matches generate_permutation_info’s own default and accommodates PySCF’s ~6 decimal-place translation precision (~3e-7 residuals). See get_representation for full discussion.
- Returns:
u_spinor – Full spinor AO representation,
nso = 2 * nao.- Return type:
(nso, nso) complex ndarray
- green_mbtools.mint.symmetry_utils.rotation_matrix_to_su2(R_cart)[source]¶
Return the SU(2) representative of a proper 3D Cartesian rotation matrix.
For a rotation by angle \(\varphi\) about unit axis \(\hat{n}\):
\[D^{1/2}(R) = \cos(\varphi/2)\,I_2 + i\sin(\varphi/2)\,(\hat{n}\cdot\boldsymbol{\sigma})\]- Parameters:
R_cart ((3, 3) float ndarray) – Proper rotation matrix (
det = +1) in Cartesian coordinates.- Returns:
su2
- Return type:
(2, 2) complex ndarray