vayesta.core.screening

Submodules

vayesta.core.screening.screening_crpa

exception vayesta.core.screening.screening_crpa.cRPAError[source]

Bases: RuntimeError

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

vayesta.core.screening.screening_crpa.get_frag_W(mf, fragment, pcoupling=True, only_ov_screened=False, log=None)[source]

Generates screened coulomb interaction due to screening at the level of cRPA. Note that this currently scales as O(N_frag N^6), so is not practical without further refinement.

Parameters:
  • mf (pyscf.scf object) – Mean-field instance.

  • fragment (vayesta.qemb.Fragment subclass) – Fragments for the calculation, used to define local interaction space.

  • log (logging.Logger, optional) – Logger object. If None, the logger of the emb object is used. Default: None.

Returns:

  • freqs (np.array) – Effective bosonic frequencies for cRPA screening.

  • couplings (np.array) – Effective bosonic couplings for cRPA screening.

vayesta.core.screening.screening_crpa.get_frag_deltaW(mf, fragment, pcoupling=True, only_ov_screened=False, log=None)[source]

Generates change in coulomb interaction due to screening at the level of static limit of cRPA. Note that this currently scales as O(N_frag N^6), so is not practical without further refinement.

Parameters:
  • mf (pyscf.scf object) – Mean-field instance.

  • fragment (vayesta.qemb.Fragment subclass) – Fragments for the calculation, used to define local interaction space.

  • log (logging.Logger, optional) – Logger object. If None, the logger of the emb object is used. Default: None.

Returns:

deltaW – Change in cluster local coulomb interaction due to cRPA screening.

Return type:

np.array

vayesta.core.screening.screening_crpa.set_up_W_crpa(mf, fragment, pcoupling=True, only_ov_screened=False, log=None)[source]
vayesta.core.screening.screening_crpa.get_crpa(orig_mf, f, log)[source]
vayesta.core.screening.screening_crpa.ao2mo(mf, mo_coeff=None, ijslice=None)[source]

Get MO basis density-fitted integrals.

vayesta.core.screening.screening_moment

vayesta.core.screening.screening_moment.build_screened_eris(emb, fragments=None, cderi_ov=None, store_m0=True, npoints=48, log=None)[source]

Generates renormalised coulomb interactions for use in local cluster calculations. Currently requires unrestricted system.

Parameters:
  • emb (Embedding) – Embedding instance.

  • fragments (list of vayesta.qemb.Fragment subclasses, optional) – List of fragments for the calculation, used to define local interaction spaces. If None, emb.get_fragments(sym_parent=None) is used. Default: None.

  • cderi_ov (np.array or tuple of np.array, optional.) – Cholesky-decomposed ERIs in the particle-hole basis of mf. If mf is unrestricted this should be a list of arrays corresponding to the different spin channels.

  • store_m0 (bool, optional.) – Whether to store the local zeroth moment in the fragment class for use later.

  • npoints (int, optional) – Number of points for numerical integration. Default: 48.

  • log (logging.Logger, optional) – Logger object. If None, the logger of the emb object is used. Default: None.

Returns:

  • seris_ov (list of tuples of np.array) – List of spin-dependent screened (ov|ov), for each fragment provided.

  • erpa (float) – Delta RPA correction computed as difference between full system RPA energy and cluster correlation energies; currently only functional in CAS fragmentations.

vayesta.core.screening.screening_moment.calc_moms_RIRPA(mf, target_rots, ovs_active, log, cderi_ov, npoints)[source]
vayesta.core.screening.screening_moment.calc_moms_RPA(mf, target_rots, ovs_active, log, cderi_ov, npoints)[source]
vayesta.core.screening.screening_moment.get_screened_eris_full(eris, seris_ov, copy=True, log=None)[source]

Build full array of screened ERIs, given the bare ERIs and screening.

vayesta.core.screening.screening_moment.get_screened_eris_ccsd(eris, seris_ov, add_restore_bare=True, log=None)[source]

Module contents