momentGW.uhf.ints

Integral helpers with unrestricted reference.

Module Contents

class momentGW.uhf.ints.UIntegrals(with_df, mo_coeff, mo_occ, compression='ia', compression_tol=1e-10, store_full=False)

Bases: momentGW.ints.Integrals

Container for the density-fitted integrals required for UGW methods.

Parameters:
  • with_df (pyscf.df.DF) – Density fitting object.

  • mo_coeff (numpy.ndarray) – Molecular orbital coefficients for each spin channel.

  • mo_occ (numpy.ndarray) – Molecular orbital occupations for each spin channel.

  • 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 Lpq

Get the full uncompressed (aux, MO, MO) integrals.

property Lpx

Get the compressed (aux, MO, MO) integrals.

property Lia

Get the compressed (aux, occ, 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 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 is_bare

Get a boolean flag indicating whether the integrals have no self-consistencies.

property dtype

Get the dtype of the integrals.

property nao

Get the number of AOs.

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.

update_coeffs(mo_coeff_g=None, mo_coeff_w=None, mo_occ_w=None)

Update the MO coefficients for the Green’s function and the screened Coulomb interaction.

Parameters:
  • mo_coeff_g (numpy.ndarray, optional) – Coefficients corresponding to the Green’s function for each spin. Default value is None.

  • mo_coeff_w (numpy.ndarray, optional) – Coefficients corresponding to the screened Coulomb interaction for each spin. Default value is None.

  • mo_occ_w (numpy.ndarray, optional) – Occupations corresponding to the screened Coulomb interaction for each spin. 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')

Build the J matrix.

Parameters:
  • dm (numpy.ndarray) – Density matrix for each spin channel.

  • basis (str, optional) – Basis in which to build the J matrix. One of (“ao”, “mo”). Default value is “mo”.

Returns:

vj – J matrix for each spin channel.

Return type:

numpy.ndarray

get_k(dm, basis='mo')

Build the K matrix.

Parameters:
  • dm (numpy.ndarray) – Density matrix for each spin channel.

  • basis (str, optional) – Basis in which to build the K matrix. One of (“ao”, “mo”). Default value is “mo”.

Returns:

vk – K matrix for each spin channel.

Return type:

numpy.ndarray

get_jk(dm, **kwargs)

Build the J and K matrices.

Returns:

  • vj (numpy.ndarray) – J matrix for each spin channel.

  • vk (numpy.ndarray) – K matrix for each spin channel.

Notes

See get_j and get_k for more information.

get_veff(dm, j=None, k=None, **kwargs)

Build the effective potential.

Parameters:
  • dm (numpy.ndarray) – Density matrix for each spin channel.

  • j (numpy.ndarray, optional) – J matrix for each spin channel. If None, compute it. Default value is None.

  • k (numpy.ndarray, optional) – K matrix for each spin channel. If None, compute it. Default value is None.

  • **kwargs (dict, optional) – Additional keyword arguments for get_jk.

Returns:

veff – Effective potential for each spin channel.

Return type:

numpy.ndarray

Notes

See get_jk for more information.

get_fock(dm, h1e, **kwargs)

Build the Fock matrix.

Parameters:
  • dm (numpy.ndarray) – Density matrix for each spin channel.

  • h1e (numpy.ndarray) – Core Hamiltonian matrix for each spin channel.

  • **kwargs (dict, optional) – Additional keyword arguments for get_jk.

Returns:

fock – Fock matrix for each spin channel.

Return type:

numpy.ndarray

Notes

See get_jk for more information. The basis of h1e must be the same as dm.