quemb.molbe.solver.be_func

quemb.molbe.solver.be_func(pot, Fobjs, Nocc, solver, enuc, solver_args, scratch_dir, only_chem=False, nproc=4, eeval=False, relax_density=False, return_vec=False, use_cumulant=True)

Perform bootstrap embedding calculations for each fragment.

This function computes the energy and/or error for each fragment in a molecular system using various quantum chemistry solvers.

Parameters:
  • pot (list[float] | None) – List of potentials.

  • Fobjs (list of fragpart) – List of fragment objects.

  • Nocc (int) – Number of occupied orbitals.

  • solver (str) – Quantum chemistry solver to use (‘MP2’, ‘CCSD’, ‘FCI’, ‘HCI’, ‘SHCI’, ‘SCI’).

  • enuc (float) – Nuclear energy.

  • only_chem (bool) – Whether to only optimize the chemical potential. Defaults to False.

  • nproc (int) – Number of processors. Defaults to 4. This is only neccessary for ‘SHCI’ solver

  • eeval (bool) – Whether to evaluate the energy. Defaults to False.

  • ereturn – Whether to return the energy. Defaults to False.

  • relax_density (bool) – Whether to relax the density. Defaults to False.

  • return_vec (bool) – Whether to return the error vector. Defaults to False.

  • use_cumulant (bool) – Whether to use the cumulant-based energy expression. Defaults to True.

  • eeval – Whether to evaluate the energy. Defaults to False.

  • return_vec – Whether to return the error vector. Defaults to False.

Returns:

Depending on the options, it returns the norm of the error vector, the energy, or a combination of these values.

Return type:

float or tuple