vayesta.core.bath
Submodules
vayesta.core.bath.bath
Bath base class.
vayesta.core.bath.bno
- class vayesta.core.bath.bno.BNO_Bath(fragment, dmet_bath, occtype, *args, c_buffer=None, canonicalize=True, **kwargs)[source]
Bases:
Bath
Bath natural orbital (BNO) bath, requires DMET bath.
- property c_cluster_occ
Occupied DMET cluster orbitals.
- property c_cluster_vir
Virtual DMET cluster orbitals.
- property c_env
- property ncluster
- truncate_bno(coeff, occup, bno_threshold=None, verbose=True)[source]
Split natural orbitals (NO) into bath and rest.
- property base
- property c_frag
- property log
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
- class vayesta.core.bath.bno.BNO_Bath_UHF(fragment, dmet_bath, occtype, *args, c_buffer=None, canonicalize=True, **kwargs)[source]
Bases:
BNO_Bath
- property ncluster
- truncate_bno(coeff, occup, *args, **kwargs)[source]
Split natural orbitals (NO) into bath and rest.
- property base
- property c_cluster_occ
Occupied DMET cluster orbitals.
- property c_cluster_vir
Virtual DMET cluster orbitals.
- property c_env
- property c_frag
- get_active_space(c_active=None)
- get_bath(bno_threshold=None, **kwargs)
- get_finite_bath_correction(c_active, c_frozen)
- kernel()
- property log
- make_bno_coeff(*args, **kwargs)
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
- class vayesta.core.bath.bno.MP2_BNO_Bath(*args, project_dmet_order=0, project_dmet_mode='full', project_dmet=None, **kwargs)[source]
Bases:
BNO_Bath
- make_bno_coeff(eris=None)[source]
Construct MP2 bath natural orbital coefficients and occupation numbers.
This routine works for both for spin-restricted and unrestricted.
- Parameters:
eris (mp2._ChemistERIs) –
- Returns:
c_bno ((n(AO), n(BNO)) array) – Bath natural orbital coefficients.
n_bno ((n(BNO)) array) – Bath natural orbital occupation numbers.
- property base
- property c_cluster_occ
Occupied DMET cluster orbitals.
- property c_cluster_vir
Virtual DMET cluster orbitals.
- property c_env
- property c_frag
- get_active_space(c_active=None)
- get_bath(bno_threshold=None, **kwargs)
- get_finite_bath_correction(c_active, c_frozen)
- kernel()
- property log
- log_histogram(n_bno)
- property mf
- property mol
- property ncluster
- property spin_restricted
- property spin_unrestricted
- property spinsym
- truncate_bno(coeff, occup, bno_threshold=None, verbose=True)
Split natural orbitals (NO) into bath and rest.
- class vayesta.core.bath.bno.UMP2_BNO_Bath(*args, project_dmet_order=0, project_dmet_mode='full', project_dmet=None, **kwargs)[source]
Bases:
MP2_BNO_Bath
,BNO_Bath_UHF
- property base
- property c_cluster_occ
Occupied DMET cluster orbitals.
- property c_cluster_vir
Virtual DMET cluster orbitals.
- property c_env
- property c_frag
- get_active_space(c_active=None)
- get_bath(bno_threshold=None, **kwargs)
- get_eris_or_cderi(actspace)
- get_finite_bath_correction(c_active, c_frozen)
- kernel()
- property log
- log_histogram(n_bno)
- make_bno_coeff(eris=None)
Construct MP2 bath natural orbital coefficients and occupation numbers.
This routine works for both for spin-restricted and unrestricted.
- Parameters:
eris (mp2._ChemistERIs) –
- Returns:
c_bno ((n(AO), n(BNO)) array) – Bath natural orbital coefficients.
n_bno ((n(BNO)) array) – Bath natural orbital occupation numbers.
- property mf
- property mol
- property ncluster
- property spin_restricted
- property spin_unrestricted
- property spinsym
- truncate_bno(coeff, occup, *args, **kwargs)
Split natural orbitals (NO) into bath and rest.
vayesta.core.bath.dmet
- class vayesta.core.bath.dmet.DMET_Bath_RHF(fragment, dmet_threshold=1e-06)[source]
Bases:
Bath
- get_occupied_bath(*args, **kwargs)[source]
Inherited bath classes can overwrite this to return additional occupied bath orbitals.
- get_virtual_bath(*args, **kwargs)[source]
Inherited bath classes can overwrite this to return additional virtual bath orbitals.
- make_dmet_bath(c_env, dm1=None, c_ref=None, nbath=None, verbose=True, reftol=0.8)[source]
Calculate DMET bath, occupied environment and virtual environment orbitals.
If c_ref is not None, complete DMET orbital space using active transformation of reference orbitals.
TODO: * reftol should not be necessary - just determine how many DMET bath orbital N are missing from C_ref and take the N largest eigenvalues over the combined occupied and virtual eigenvalues.
- Parameters:
c_env ((n(AO), n(env)) array) – MO-coefficients of environment orbitals.
dm1 ((n(AO), n(AO)) array, optional) – Mean-field one-particle reduced density matrix in AO representation. If None, self.mf.make_rdm1() is used. Default: None.
c_ref (ndarray, optional) – Reference DMET bath orbitals from previous calculation.
nbath (int, optional) – Number of DMET bath orbitals. If set, the parameter tol is ignored. Default: None.
tol (float, optional) – Tolerance for DMET orbitals in eigendecomposition of density-matrix. Default: 1e-5.
reftol (float, optional) – Tolerance for DMET orbitals in projection of reference orbitals.
- Returns:
c_bath ((n(AO), n(bath)) array) – DMET bath orbitals.
eig (n(bath) array) – DMET orbital occupation numbers (in [0,1]).
c_occenv ((n(AO), n(occ. env)) array) – Occupied environment orbitals.
c_virenv ((n(AO), n(vir. env)) array) – Virtual environment orbitals.
- make_dmet_bath_fast(c_env, dm1=None)[source]
Fast DMET orbitals. from Ref. J. Chem. Phys. 151, 064108 (2019); https://doi.org/10.1063/1.5108818
Problem: How to get C_occenv and C_virenv without N^3 diagonalization?
- property base
- property c_frag
- property log
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
- class vayesta.core.bath.dmet.DMET_Bath_UHF(fragment, dmet_threshold=1e-06)[source]
Bases:
DMET_Bath_RHF
- get_occupied_bath(*args, **kwargs)[source]
Inherited bath classes can overwrite this to return additional occupied bath orbitals.
- get_virtual_bath(*args, **kwargs)[source]
Inherited bath classes can overwrite this to return additional virtual bath orbitals.
- make_dmet_bath(c_env, dm1=None, **kwargs)[source]
Calculate DMET bath, occupied environment and virtual environment orbitals.
If c_ref is not None, complete DMET orbital space using active transformation of reference orbitals.
TODO: * reftol should not be necessary - just determine how many DMET bath orbital N are missing from C_ref and take the N largest eigenvalues over the combined occupied and virtual eigenvalues.
- Parameters:
c_env ((n(AO), n(env)) array) – MO-coefficients of environment orbitals.
dm1 ((n(AO), n(AO)) array, optional) – Mean-field one-particle reduced density matrix in AO representation. If None, self.mf.make_rdm1() is used. Default: None.
c_ref (ndarray, optional) – Reference DMET bath orbitals from previous calculation.
nbath (int, optional) – Number of DMET bath orbitals. If set, the parameter tol is ignored. Default: None.
tol (float, optional) – Tolerance for DMET orbitals in eigendecomposition of density-matrix. Default: 1e-5.
reftol (float, optional) – Tolerance for DMET orbitals in projection of reference orbitals.
- Returns:
c_bath ((n(AO), n(bath)) array) – DMET bath orbitals.
eig (n(bath) array) – DMET orbital occupation numbers (in [0,1]).
c_occenv ((n(AO), n(occ. env)) array) – Occupied environment orbitals.
c_virenv ((n(AO), n(vir. env)) array) – Virtual environment orbitals.
- property base
- property c_frag
- get_environment()
- kernel()
- property log
- log_info(eig, c_env, threshold=1e-10)
- make_dmet_bath_fast(c_env, dm1=None)
Fast DMET orbitals. from Ref. J. Chem. Phys. 151, 064108 (2019); https://doi.org/10.1063/1.5108818
Problem: How to get C_occenv and C_virenv without N^3 diagonalization?
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
- use_ref_orbitals(c_bath, c_occenv, c_virenv, c_ref, reftol=0.8)
Not maintained!
vayesta.core.bath.ewdmet
- class vayesta.core.bath.ewdmet.EwDMET_Bath_RHF(fragment, dmet_bath, occtype, *args, threshold=None, max_order=20, **kwargs)[source]
Bases:
Bath
- property c_env
- property base
- property c_frag
- property log
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
vayesta.core.bath.full
- class vayesta.core.bath.full.Full_Bath_RHF(fragment, dmet_bath, occtype, *args, **kwargs)[source]
Bases:
Bath
- property c_env
- property base
- property c_frag
- property log
- property mf
- property mol
- property spin_restricted
- property spin_unrestricted
- property spinsym
vayesta.core.bath.helper
- vayesta.core.bath.helper.make_histogram(values, bins, labels=None, binwidth=5, height=6, fill=':', show_number=False, invertx=True, rstrip=True)[source]
vayesta.core.bath.r2bath
vayesta.core.bath.rpa
- class vayesta.core.bath.rpa.RPA_BNO_Bath(*args, project_dmet_order=0, project_dmet_mode='full', project_dmet=None, **kwargs)[source]
Bases:
BNO_Bath
- make_bno_coeff(cderis=None)[source]
Construct RPA bath natural orbital coefficients and occupation numbers.
This routine works for both for spin-restricted and unrestricted.
- Parameters:
cderis (cderis in the particle-hole space.) –
- Returns:
c_bno ((n(AO), n(BNO)) array) – Bath natural orbital coefficients.
n_bno ((n(BNO)) array) – Bath natural orbital occupation numbers.
- property base
- property c_cluster_occ
Occupied DMET cluster orbitals.
- property c_cluster_vir
Virtual DMET cluster orbitals.
- property c_env
- property c_frag
- get_active_space(c_active=None)
- get_bath(bno_threshold=None, **kwargs)
- get_finite_bath_correction(c_active, c_frozen)
- kernel()
- property log
- log_histogram(n_bno)
- property mf
- property mol
- property ncluster
- property spin_restricted
- property spin_unrestricted
- property spinsym
- truncate_bno(coeff, occup, bno_threshold=None, verbose=True)
Split natural orbitals (NO) into bath and rest.