momentGW.pbc.ints
Integral helpers with periodic boundary conditions.
Module Contents
- class momentGW.pbc.ints.KIntegrals(with_df, kpts, mo_coeff, mo_occ, compression='ia', compression_tol=1e-10, store_full=False, input_path=None)
Bases:
momentGW.ints.IntegralsContainer for the integrals required for KGW methods.
- Parameters:
with_df (pyscf.pbc.df.DF) – Density fitting object.
mo_coeff (numpy.ndarray) – Molecular orbital coefficients at each k-point.
mo_occ (numpy.ndarray) – Molecular orbital occupations at each k-point.
compression (str, optional) – Compression scheme to use. Default value is ‘ia’. See momentGW.gw for more details.
compression_tol (float, optional) – Compression tolerance. Default value is 1e-10. See momentGW.gw for more details.
store_full (bool, optional) – Store the full MO integrals in memory. Default value is False.
- property madelung
Return the Madelung constant for the lattice.
- property Lai
Get the full uncompressed
(aux, MO, MO)integrals.
- property nmo
Get the number of MOs.
- property nocc
Get the number of occupied MOs.
- property nvir
Get the number of virtual MOs.
- property nmo_g
Get the number of MOs for the Green’s function.
- property nmo_w
Get the number of MOs for the screened Coulomb interaction.
- property nocc_w
Get the number of occupied MOs for the screened Coulomb interaction.
- property nvir_w
Get the number of virtual MOs for the screened Coulomb interaction.
- property naux
Get the number of auxiliary basis functions, after the compression.
- property naux_full
Get the number of auxiliary basis functions, before the compression.
- property Lpq
Get the full uncompressed
(aux, MO, MO)integrals.
- property Lpx
Get the compressed
(aux, MO, G)integrals.
- property Lia
Get the compressed
(aux, W occ, W vir)integrals.
- property mo_coeff_g
Get the MO coefficients for the Green’s function.
- property mo_coeff_w
Get the MO coefficients for the screened Coulomb interaction.
- property mo_occ_w
Get the MO occupation numbers for the screened Coulomb interaction.
- property nao
Get the number of AOs.
- property is_bare
Get a boolean flag indicating whether the integrals have no self-consistencies.
- property dtype
Get the dtype of the integrals.
- get_compression_metric()
Return the compression metric.
- Returns:
rot – Rotation matrix into the compressed auxiliary space.
- Return type:
numpy.ndarray
- transform(do_Lpq=None, do_Lpx=True, do_Lia=True)
Transform the integrals in-place.
- Parameters:
do_Lpq (bool, optional) – Whether to compute the full
(aux, MO, MO)array. Default value is True if store_full is True, False otherwise.do_Lpx (bool, optional) – Whether to compute the compressed
(aux, MO, MO)array. Default value is True.do_Lia (bool, optional) – Whether to compute the compressed
(aux, occ, vir)array. Default value is True.
- get_cderi_from_thc()
Build CDERIs using THC integrals imported from a h5py file. It must contain a ‘collocation_matrix’ and a ‘coulomb_matrix’.
- update_coeffs(mo_coeff_g=None, mo_coeff_w=None, mo_occ_w=None)
Update the MO coefficients in-place for the Green’s function and the screened Coulomb interaction.
- Parameters:
mo_coeff_g (numpy.ndarray, optional) – Coefficients corresponding to the Green’s function at each k-point. Default value is None.
mo_coeff_w (numpy.ndarray, optional) – Coefficients corresponding to the screened Coulomb interaction at each k-point. Default value is None.
mo_occ_w (numpy.ndarray, optional) – Occupations corresponding to the screened Coulomb interaction at each k-point. Default value is None.
Notes
If mo_coeff_g is None, the Green’s function is assumed to remain in the basis in which it was originally defined, and vice-versa for mo_coeff_w and mo_occ_w. At least one of mo_coeff_g and mo_coeff_w must be provided.
- get_j(dm, basis='mo', other=None)
Build the J matrix.
- Parameters:
dm (numpy.ndarray) – Density matrix at each k-point.
basis (str, optional) – Basis in which to build the J matrix. One of (“ao”, “mo”). Default value is “mo”.
other (Integrals, optional) – Integrals object for the ket side. Allows inheritence for mixed-spin evaluations. If None, use self. Default value is None.
- Returns:
vj – J matrix.
- Return type:
numpy.ndarray
Notes
The contraction is J[p, q] = self[p, q] * other[r, s] * dm[r, s], and the bases must reflect shared indices.
- get_k(dm, basis='mo', ewald=False)
Build the K matrix.
- Parameters:
dm (numpy.ndarray) – Density matrix at each k-point.
basis (str, optional) – Basis in which to build the K matrix. One of (“ao”, “mo”). Default value is “mo”.
- Returns:
vk – K matrix at each k-point.
- Return type:
numpy.ndarray
Notes
The contraction is K[p, q] = self[r, q] * self[p, r] * dm[q, s], and the bases must reflect shared indices.
- get_ewald(dm, basis='mo')
Build the Ewald exchange divergence matrix.
- Parameters:
dm (numpy.ndarray) – Density matrix at each k-point.
basis (str, optional) – Basis in which to build the K matrix. One of (“ao”, “mo”). Default value is “mo”.
- Returns:
ew – Ewald exchange divergence matrix at each k-point.
- Return type:
numpy.ndarray
- get_jk(dm, **kwargs)
Build the J and K matrices.
- Returns:
vj (numpy.ndarray) – J matrix at each k-point.
vk (numpy.ndarray) – K matrix at each k-point.
Notes
See get_j and get_k for more information.
- get_veff(dm, j=None, k=None, **kwargs)
Build the effective potential.
- Returns:
veff (numpy.ndarray) – Effective potential at each k-point.
j (numpy.ndarray, optional) – J matrix at each k-point. If None, compute it. Default value is None.
k (numpy.ndarray, optional) – K matrix at each k-point. If None, compute it. Default value is None.
Notes
See get_jk for more information.
- get_fock(dm, h1e, **kwargs)
Build the Fock matrix.
- Parameters:
dm (numpy.ndarray) – Density matrix at each k-point.
h1e (numpy.ndarray) – Core Hamiltonian matrix at each k-point.
**kwargs (dict, optional) – Additional keyword arguments for get_jk.
- Returns:
fock – Fock matrix at each k-point.
- Return type:
numpy.ndarray
Notes
See get_jk for more information. The basis of h1e must be the same as dm.