pub fn initialize_direct_hessian(n: usize) -> DMatrix<f64>Expand description
Initializes the direct Hessian matrix for direct Hessian BFGS optimization.
Matches behavior: Bk = numpy.eye(ncoord) (identity matrix).
The direct Hessian B has units Ha/A² in the Angstrom-based system.
§Arguments
n- Dimension of the matrix (3 × number of atoms)
§Returns
Returns an n×n identity matrix.
§Units
The Hessian diagonal is 1.0 Ha/A² (identity matrix). Newton step: B⁻¹ × g = I × g = g, so initial step equals gradient.