quemb.molbe.helper.get_frag_energy¶
- quemb.molbe.helper.get_frag_energy(mo_coeffs, nsocc, nfsites, efac, TA, h1, rdm1, rdm2s, dname, veff0=None, veff=None, use_cumulant=True, eri_file='eri_file.h5')¶
Compute the fragment energy.
This function calculates the energy contribution of a fragment within a larger molecular system using the provided molecular orbital coefficients, density matrices, and effective potentials.
- Parameters:
mo_coeffs (ndarray) – Molecular orbital coefficients.
nsocc (int) – Number of occupied orbitals.
nfsites (int) – Number of fragment sites.
efac (list) – List containing energy scaling factors and indices.
TA (ndarray) – Transformation matrix.
h1 (ndarray) – One-electron Hamiltonian.
rdm1 (ndarray) – One-particle density matrix.
rdm2s (ndarray) – Two-particle density matrix.
dname (str) – Dataset name in the HDF5 file.
veff0 (ndarray) – veff0 matrix, the original hf_veff in the fragment Schmidt space
veff (ndarray) – veff for non-cumulant energy expression
use_cumulant (bool) – Whether to return cumulant energy, by default True
eri_file (str, optional) – Filename of the HDF5 file containing the electron repulsion integrals. Defaults to ‘eri_file.h5’.
- Returns:
List containing the energy contributions: [e1_tmp, e2_tmp, ec_tmp].
- Return type: