psi-rking / optking

optking: A molecular geometry optimization program
BSD 3-Clause "New" or "Revised" License
20 stars 14 forks source link

Double Check IRC Initial Displacement Formula #19

Closed JonathonMisiewicz closed 5 years ago

JonathonMisiewicz commented 6 years ago

When trying to use an IRC to follow a particularly shallow imaginary mode (~52i) with C-OptKing, I repeatedly saw the initial displacement increasing the energy. The displacement in cartesians didn't align with my normal mode, either. The C-OptKing way seems to get its initial displacement by taking the lowest eigenvector from the internal hessian. This will not be the normal mode.

I was able to get my energy to decrease along the C-OptKing IRC by getting the lowest eigenvector from the massweighted internal hessian and operating with G^-1/2. (This seems unusual, as all the other transformations from mass weighted to non-mass-weighted coordinates use G+^1/2. Using G^+1/2 still led to an increase in energy.)

Could you double-check that part of the IRC algorithm when adapting to Python?

JonathonMisiewicz commented 5 years ago

Note: There's nothing unusual about needing to operate with G^-1/2 on the gradient. G^+1/2 is correct when you're operating on displacements. The gradient transforms covariantly instead of contravariantly, so it transforms as the inverse transpose of G^+1/2. As G is symmetric, the correct gradient transformation rule is G^-1/2... exactly as I found numerically.

psi-rking commented 5 years ago

As of now, the IRC code is working. I made sure that the initial step does follow mass-weighted Hessian. If the initial Hessian is a stupid diagonal guess, it turns out this makes no difference (which might be part of the reason we didn't catch the problem earlier. My testing for HOOH showed no detectable change in the converged reaction path points obtained. If the energy is increasing, it may be the step size is simply too large.