quemb.molbe.numerical_jac.compute_numerical_jacobian

quemb.molbe.numerical_jac.compute_numerical_jacobian(beobj, solver, only_chem, nproc, step_size=1e-06)

Compute the numerical Jacobian for the BE optimization.

This function computes the numerical Jacobian by perturbing the potentials of the fragments that contain the edges or edges connected to the perturbed fragment’s origin. The Jacobian is computed using first-order central differences.

Parameters:
  • beobj – The BE object.

  • solver (Literal['MP2', 'CCSD', 'FCI', 'HCI', 'SHCI', 'SCI', 'DMRG']) – The solver to use for the computation.

  • only_chem (bool) – Whether to compute only the chemical potential part of the Jacobian.

  • nproc (int) – Number of processors to use for parallel computation.

Returns:

The computed numerical Jacobian matrix.

Return type:

ndarray