Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permit Hessian computation through Engine? #183

Open
corinwagen opened this issue Nov 13, 2023 · 5 comments
Open

permit Hessian computation through Engine? #183

corinwagen opened this issue Nov 13, 2023 · 5 comments

Comments

@corinwagen
Copy link

Hello, thanks for the lovely and clean package!

I'm curious if you've considered adding a calc_hessian call to Engine(), so that analytic Hessians might be employed where possible? I know DLFIND takes Hessian callbacks, and since most quantum chemistry programs already have default machinery for computing Hessians it might be nice to offload some of the work (unless there's some special finite difference tricks you're employing here).

corin

@leeping
Copy link
Owner

leeping commented Nov 13, 2023

Yes, that's something I'd like to do in a few months' time. (While we're at it, I would like to add an energy call as well.) I think at the most basic level one could modify the "job type" option in the quantum chemistry input file to request a Hessian or an energy instead of a gradient and then parse the result.

There are no special tricks for the current code for computing the Hessian, but it could be faster than the analytic Hessian in terms of wall time due to the capability of distributing the gradient calculations to many processors / nodes via Work Queue.

@annulen
Copy link

annulen commented Feb 18, 2024

This feature could also be used to compute semiempirical (e.g., GFN2-xTB) Hessian instead of using model one. In particular, I've discovered that GFN2-xTB with --bhess mode of xtb (aka "Single-Point Hessian") produces very good starting Hessians (difference of --bhess vs normal Hessian is that the former creates artificial minimum at given geometry, therefore resulting Hessian doesn't have negative eigenvalues)

@corinwagen
Copy link
Author

Right, we've been thinking about that as well - initial guess Hessian can make a big difference, cf. recent Merz work. Even a cheap semiempirical/ML Hessian probably beats a Schlegel-type guess...

@leeping
Copy link
Owner

leeping commented Feb 19, 2024

It is possible to provide an initial Hessian at the start of the TS calculation by passing a file containing a square matrix in text format. The assumption is you could compute that Hessian separately using any method or software you like.

I am interested in supporting QM codes' native Hessians in a more integrated way; however, the run parameters are likely to be quite different from the gradient calculations given all of the approximations that could be used. Perhaps by adding two new command line arguments --hessian_engine and --hessian_input to specify the QM engine for the Hessian calculation and the associated input file, that could take care of most cases?

@corinwagen
Copy link
Author

I've only used the API interface, so I don't have a strong opinion about CLI arguments, but that seems reasonable. I suppose Hessian engine could default to the regular (gradient) engine unless otherwise specified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants