quemb.molbe.helper.get_frag_energy_u

quemb.molbe.helper.get_frag_energy_u(mo_coeffs, nsocc, nfsites, efac, TA, h1, hf_veff, rdm1, rdm2s, dname, eri_file='eri_file.h5', gcores=None, frozen=False, veff0=None)

Compute the fragment energy for unrestricted calculations

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 (tuple of ndarray) – Molecular orbital coefficients.

  • nsocc (tuple of int) – Number of occupied orbitals.

  • nfsites (tuple of int) – Number of fragment sites.

  • efac (tuple of list) – List containing energy scaling factors and indices.

  • TA (tuple of ndarray) – Transformation matrix.

  • h1 (tuple of ndarray) – One-electron Hamiltonian.

  • hf_veff (tuple of ndarray) – Hartree-Fock effective potential.

  • rdm1 (tuple of ndarray) – One-particle density matrix.

  • rdm2s (tuple of ndarray) – Two-particle density matrix.

  • dname (list) – Dataset name in the HDF5 file.

  • eri_file (str, optional) – Filename of the HDF5 file containing the electron repulsion integrals. Defaults to ‘eri_file.h5’.

  • gcores

  • frozen (bool, optional) – Indicate frozen core. Default is False

Returns:

List containing the energy contributions: [e1_tmp, e2_tmp, ec_tmp].

Return type:

list