quemb.molbe.be_parallel.run_solver

quemb.molbe.be_parallel.run_solver(h1, dm0, scratch_dir, dname, nao, nocc, nfsites, efac, TA, h1_e, solver='MP2', eri_file='eri_file.h5', veff=None, veff0=None, ompnum=4, writeh1=False, eeval=True, ret_vec=False, use_cumulant=True, relax_density=False, solver_args=None)

Run a quantum chemistry solver to compute the reduced density matrices.

Parameters:
  • h1 (ndarray[Tuple[int, ...], dtype[float64]]) – One-electron Hamiltonian matrix.

  • dm0 (ndarray[Tuple[int, ...], dtype[float64]]) – Initial guess for the density matrix.

  • scratch_dir (WorkDir) – The scratch dir root.

  • dname (str) – Directory name for storing intermediate files. Fragment files will be stored in scratch_dir / dname.

  • scratch_dir – The scratch directory. Fragment files will be stored in scratch_dir / dname.

  • nao (int) – Number of atomic orbitals.

  • nocc (int) – Number of occupied orbitals.

  • nfsites (int) – Number of fragment sites.

  • efac (float) – Scaling factor for the electronic energy.

  • TA (ndarray[Tuple[int, ...], dtype[float64]]) – Transformation matrix for embedding orbitals.

  • h1_e (ndarray[Tuple[int, ...], dtype[float64]]) – One-electron integral matrix.

  • solver (str) – Solver to use for the calculation (‘MP2’, ‘CCSD’, ‘FCI’, ‘HCI’, ‘SHCI’, ‘SCI’). Default is ‘MP2’.

  • eri_file (str) – Filename for the electron repulsion integrals. Default is ‘eri_file.h5’.

  • veff (ndarray[Tuple[int, ...], dtype[float64]] | None) – Veff matrix to be passed to energy, if non-cumulant energy.

  • veff0 (ndarray[Tuple[int, ...], dtype[float64]] | None) – Veff0 matrix, passed to energy, the hf_veff in the fragment Schmidt space

  • ompnum (int) – Number of OpenMP threads. Default is 4.

  • writeh1 (bool) – If True, write the one-electron integrals to a file. Default is False.

  • use_cumulant (bool) – If True, use the cumulant approximation for RDM2. Default is True.

  • eeval (bool) – If True, evaluate the electronic energy. Default is True.

  • ret_vec (bool) – If True, return vector with error and rdms. Default is True.

  • relax_density (bool) – If True, use CCSD relaxed density. Default is False

Returns:

Depending on the input parameters, returns the molecular orbital coefficients, one-particle and two-particle reduced density matrices, and optionally the fragment energy.

Return type:

tuple