Draft: ResHF Hessian (part 2)
As preliminary step to calculating the inverse Hessian via a Krylov space algorithm, I am building a function that will apply a Hessian matrix onto a vector.
(Merged back into master prematurely due to The Big Rename from qtensor
to qleve
happening midway through development. Couldn't figure out how to reopen the original merge request, so this is a duplicate/pick-up of where I left off.)
Goal #1: Implement an explicitly built Hessian to be able to verify my Hessian derivation
-
Sketch out approach to explicit Hessian builder -
Set up src/resmf/reshf.cpp
to generate input for Hessian builder-
Relabel variables and access functions so that the determinant of S_AB_
is distinct from the actual overlap matrixS_AB_
-
Compute and store (vir, occ) (occ, vir) and (vir, vir) blocks for S_AB_
in addition to the current (occ, occ) block -
Store condensed inverse matrix results from SVD (occ,occ block of S_AB only!) and send it to Hessian builder -
Separate and store 1 electron and 2 electron components of the energy expectation value between two Slater determinants ( H_AB_1e
andH_AB_2e
)
-
-
Build Hessian matrix explicitly in src/resmf/hessian.cpp
-
Modify sdets_
in order to account for orthonormal generic MO basis in Hessian derivation -
Set up loop(s) to iterate through all second derivatives -
Compartmentalize portions of Hessian equations to minimize repetitive calculations
-
-
Multiply Hessian matrix with step
input vector insrc/resmf/hessian.cpp
-
Decide how to treat gradient
output vector and whetherstep
should be a constant or not
-
-
Troubleshoot to make sure equations to build Hessian matrix are correct
Goal #2: Implement an on-the-fly version of the Hessian, for the sake of memory demands