occ
|
Evaluates molecular Hessian matrices (second derivatives of energy) More...
#include <hessians.h>
Public Types | |
enum class | Method { FiniteDifferences , Analytical } |
Method for Hessian calculation. More... | |
Public Member Functions | |
HessianEvaluator (Proc &p) | |
Construct a HessianEvaluator for the given procedure. | |
void | set_method (Method method) |
Set the method for Hessian calculation. | |
void | set_step_size (double h) |
Set the finite differences step size. | |
void | set_use_acoustic_sum_rule (bool use) |
Enable/disable acoustic sum rule optimization. | |
double | step_size () const |
Get the current step size for finite differences. | |
bool | use_acoustic_sum_rule () const |
Check if acoustic sum rule is enabled. | |
Method | method () const |
Get the current calculation method. | |
void | set_scf_convergence_settings (const SCFConvergenceSettings &settings) |
Set the SCF convergence settings for displaced calculations. | |
const SCFConvergenceSettings & | scf_convergence_settings () const |
Get the current SCF convergence settings. | |
HessianMatrix | nuclear_repulsion () const |
Compute the nuclear repulsion contribution to the Hessian. | |
const HessianMatrix & | operator() (const Wavefunction &wfn) |
Compute the full molecular Hessian. | |
Evaluates molecular Hessian matrices (second derivatives of energy)
The HessianEvaluator class computes the Hessian matrix, which contains second derivatives of the energy with respect to nuclear coordinates: H_ij = d2E/dR_i dR_j
Currently supports:
Proc | The quantum chemical procedure type (e.g., HartreeFock, DFT) |
Usage example:
|
inlineexplicit |
Construct a HessianEvaluator for the given procedure.
p | The quantum chemical procedure (HF, DFT, etc.) |
|
inline |
Get the current calculation method.
|
inline |
Compute the nuclear repulsion contribution to the Hessian.
Computes d²V_nn/dR_A dR_B where V_nn is the nuclear-nuclear repulsion. This is the only part of the Hessian that can be computed analytically without significant computational cost.
|
inline |
Compute the full molecular Hessian.
wfn | Wavefunction from converged SCF calculation |
This is the main interface for computing the Hessian. The method used depends on the configuration (set_method, set_step_size, etc.). The wavefunction provides both the molecular orbitals for the reference calculation and the charge/multiplicity for displaced calculations.
|
inline |
Set the method for Hessian calculation.
method | The method to use (currently only FiniteDifferences supported) |
|
inline |
Set the finite differences step size.
h | Step size in Bohr (typical: 0.001 to 0.01) |
Smaller step sizes reduce truncation error but increase numerical error. Default: 0.005 Bohr (matches ORCA default)
|
inline |
Enable/disable acoustic sum rule optimization.
use | If true, use acoustic sum rule to reduce computations |
The acoustic sum rule (translational invariance) reduces the number of required displacements from 3N to 3(N-1), saving some computation for a 3-atom system. Based on: d2E/dR_i dR_j = -Σ_k≠j d2E/dR_i dR_k
|
inline |
Get the current step size for finite differences.
|
inline |
Check if acoustic sum rule is enabled.