qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
92 stars 44 forks source link

An interface script for facilitating Bagel's CASPT2 optimization with Gaussian #234

Closed FreemanTheMaverick closed 2 years ago

FreemanTheMaverick commented 2 years ago

It seems that Bagel's optimization algorithm is not robust enough. In the case of https://github.com/qsimulate-open/bagel/issues/233#issue-1082491487 at the level of CASPT2(6,6), the optimization does not converge within 100 steps, with the structure fluctuating around the equilibrium point. It can be solved by setting the trust radius to as small as 0.1 and fixed, but in that way much time will be spent in vain.

Recently I have written an interface script for Gaussian's external. It gets the energy and gradient of Bagel's force task results and feeds them to Gaussian, which optimizes the molecule based on those information but with its own optimization algorithm. With this strategy, the same case above converges within 17 steps.

I would like to share the script with people, but I will not do that until the problem in https://github.com/qsimulate-open/bagel/issues/233#issue-1082491487, which has been lying in front of me for long, is solved. (:P)

Those familiar with Gaussian's external can write their own script though. The key is Bagel's keyword export under the title force, which is used to export the energy and gradient information to the current path.

shiozaki commented 2 years ago

Generally this is not allowed. orca used to distribute such a script but was forced to stop doing so.

shiozaki commented 2 years ago

Ps: I would imagine that you sharing the script on your account might be tolerated by Gaussian inc. do read the license agreement and make sure that you are not violating the terms. We (QSimulate) is considered a competitor and therefore I cannot take legal risks.

It is true that the optimization code is not the best - I’m aware of it…

I personally use Geometric by Lee Ping Wang (code is BSD and on GitHub). Interfacing (ie writing a custom engine in geometric is trivial)