jeffminlin / vmcnet

Flexible, general-purpose VMC framework, built on JAX.
https://jeffminlin.github.io/vmcnet/
MIT License
24 stars 2 forks source link

Fix gradient clipping #123

Closed ggoldsh closed 1 year ago

ggoldsh commented 1 year ago

It turns out the reason that we had to turn gradient clipping off to make H4 work was not because gradient clipping is bad, but because I broke the gradient clipping a month or so ago when I refactored the energy gradient code.

Fix is simple - just need to use local_energies instead of local_energies_noclip in line 231 of physics/core.py. Now things work as expected again.

PTAL @tkayq @nilin