Closed jhrmnn closed 6 years ago
Hey, @azag0 do you have a working example with MOPAC or any QM code? I am trying to use pyberny with my ML empirical potential, but could not converge optimization for any molecule. Thanks.
BTW, Down the road ANI-1 could be a choice to run fast tests, because you could also do reactions with it.
Seems working alright with pyscf https://github.com/sunqm/pyscf/blob/master/pyscf/geomopt/berny_solver.py#L60
I've added a pytest test framework in 5033ea4. At the moment, it contains a single basic test using a Mopac2016 driver. There is no documentation, let's see first if it's the right approach.
@isayev See this Jupyter notebook for examples with Mopac2016 and Pyscf. (Pyscf has also its own native interface to pyberny.)
There were some issues with convergence with Mopac. I didn't investigate much, but I believe that the accuracy of the gradients from Mopac might not be enough, which throws off the quadratic step once close to the equilibrium structure. Setting the convergence criteria for the step length larger than the defaults "solves" this. (The gradient criteria are still default and quite tight.)
Thanks a lot, @azag0 ! Those two solver examples are very useful 👍
Having good tests will be crucial for a geometry optimizer, because it's very easy to unconsciously break existing behavior.
For that, there should be a fast, lightweight method (force field?) for getting energies and gradients, that has a Python API and works for both molecules and crystals.