quemb.molbe.opt.BEOPT

class quemb.molbe.opt.BEOPT(pot, Fobjs, Nocc, enuc, scratch_dir, solver='MP2', nproc=1, ompnum=4, only_chem=False, use_cumulant=True, max_space=500, conv_tol=1e-06, relax_density=False, ebe_hf=0.0, iter=0, err=0.0, Ebe=NOTHING, solver_args=None)

Perform BE optimization.

Implements optimization algorithms for bootstrap optimizations, namely, chemical potential optimization and density matching. The main technique used in the optimization is a Quasi-Newton method. It interface to external (adapted version) module originally written by Hong-Zhou Ye.

Parameters:
  • pot (list[float]) – List of initial BE potentials. The last element is for the global chemical potential.

  • Fobjs (list[Frags] | list[Frags]) – Fragment object

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

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

  • scratch_dir (WorkDir) – Scratch directory

  • solver (str) – High-level solver in bootstrap embedding. ‘MP2’, ‘CCSD’, ‘FCI’ are supported. Selected CI versions, ‘HCI’, ‘SHCI’, & ‘SCI’ are also supported. Defaults to ‘MP2’

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

  • 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, ompnum sets the number of cores for OpenMP parallelization. Defaults to 4

  • max_space (int) – Maximum number of bootstrap optimizaiton steps, after which the optimization is called converged.

  • conv_tol (float) – Convergence criteria for optimization. Defaults to 1e-6

  • ebe_hf (float) – Hartree-Fock energy. Defaults to 0.0

Attributes

pot: list[float]
Fobjs: list[Frags] | list[Frags]
Nocc: int
enuc: float
scratch_dir: WorkDir
solver: str
nproc: int
ompnum: int
only_chem: bool
use_cumulant: bool
max_space: int
conv_tol: float
relax_density: bool
ebe_hf: float
iter: int
err: float
Ebe: ndarray[Tuple[int, ...], dtype[float64]]
solver_args: UserSolverArgs | None

Methods

__init__(pot, Fobjs, Nocc, enuc, scratch_dir)

Method generated by attrs for class BEOPT.

objfunc(xk)

Computes error vectors, RMS error, and BE energies.

optimize(method[, J0, trust_region])

Main kernel to perform BE optimization