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

option to pass in initial hessian #13

Open
jordangarside opened this issue May 31, 2018 · 6 comments
Open

option to pass in initial hessian #13

jordangarside opened this issue May 31, 2018 · 6 comments

Comments

@jordangarside
Copy link

Could you possibly add an option to allow for an initial hessian to be passed in?

@jhrmnn
Copy link
Owner

jhrmnn commented May 31, 2018

In Cartesian or the generated internal coordinates? The former would be relatively difficult, because the Cartesian Hessian would first need to be transformed to the internal one, which would require calculating second derivatives of the internal coordinates w.r.t. the Cartesian ones (the derivative of the B matrix). The latter is easy.

@jordangarside
Copy link
Author

jordangarside commented May 31, 2018

Yeah I was thinking Cartesian. With a program like TensorMol hessians can be computed semi-cheaply.

pyberny works well as-is with TensorMol, the approximate hessian just becomes too expensive for 100s of atoms. In TensorMol the real hessian would be computed in tensorflow directly on the GPU (assuming there's enough RAM).

Seems like too much work for now though.

@jhrmnn
Copy link
Owner

jhrmnn commented May 31, 2018

Being able to calculate the Hessian relatively cheaply at each step opens a whole new world of possibilities regarding geometry optimization. For instance, the advantage of internal over Cartesian coordinates becomes smaller—the main goal of internal coordinates is to work in a space where the Hessian is mostly diagonal and hence easy to approximate. If you actually know the Hessian, I would assume that working directly in Cartesian space would be good enough, and possibly better than internal coordinates with approximate Hessian.

@jhrmnn
Copy link
Owner

jhrmnn commented May 31, 2018

I'll leave this open for now.

@jordangarside
Copy link
Author

Yeah I'll get back to you on this when all of it's easy to test/work with.

@jparkhill
Copy link

A trivial idea would be to compute an approximate partial hessian (which is also easy in TF)... Ie: only blocks of the hessian which are within a cutoff, and feed that into pyberny. In this way linear scaling could be achieved and thousands of atoms could be addressed.

Usually an optimizer is only weakly dependent on the quality of the hessian. But still if PyBerny didn't do a sparse matrix-vector product for the H**-1 . G operation, we wouldn't get the maximum possible scope.

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

No branches or pull requests

3 participants