quemb.molbe.be_parallel.be_func_parallel

quemb.molbe.be_parallel.be_func_parallel(pot, Fobjs, Nocc, solver, enuc, scratch_dir, solver_args, nproc=1, ompnum=4, only_chem=False, relax_density=False, use_cumulant=True, eeval=False, return_vec=False, writeh1=False)

Embarrassingly Parallel High-Level Computation

Performs high-level bootstrap embedding (BE) computation for each fragment. Computes 1-RDMs and 2-RDMs for each fragment. It also computes error vectors in BE density match. For selected CI solvers, this function exposes thresholds used in selected CI calculations (hci_cutoff, ci_coeff_cutoff, select_cutoff).

Parameters:
  • pot (list[float] | None) – Potentials (local & global) that are added to the 1-electron Hamiltonian component. The last element in the list is the chemical potential.

  • Fobjs (list[Frags] | list[Frags]) – Fragment definitions.

  • Nocc (int) – Number of occupied orbitals for the full system.

  • solver (str) – High-level solver in bootstrap embedding. Supported values are ‘MP2’, ‘CCSD’, ‘FCI’, ‘HCI’, ‘SHCI’, and ‘SCI’.

  • enuc (float) – Nuclear component of the energy.

  • nproc (int) – Total number of processors assigned for the optimization. Defaults to 1. When nproc > 1, Python multithreading is invoked.

  • ompnum (int) – If nproc > 1, sets the number of cores for OpenMP parallelization. Defaults to 4.

  • only_chem (bool) – Whether to perform chemical potential optimization only. Refer to bootstrap embedding literature. Defaults to False.

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

  • scratch_dir (WorkDir) – Scratch directory root

  • use_cumulant (bool) – Use cumulant energy expression. Defaults to True

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

  • writeh1 (bool) – Whether to write the one-electron integrals. Defaults to False.

Returns:

Depending on the parameters, returns the error norm or a tuple containing the error norm, error vector, and the computed energy.

Return type:

float or tuple