-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
SOSCF with dm21 in pySCF #479
Comments
Sorry, DM21 doesn't support second-order derivatives required for Newton optimization (and the way NumInt is patched in the PySCF-DM21 interface would require some careful handling even if it did, as your error shows). A quasi-Newton method can be used (e.g. one from scipy). You might also find it useful to start from an initial guess produced by a cheaper functional (e.g. B3LYP, as shown in the README) |
Hi jsspencer |
Did you follow the steps in https://github.com/google-deepmind/deepmind-research/tree/master/density_functional_approximation_dm21#best-practices-for-using-the-neural-functionals (but for a single molecule)? I don't know why you would trigger that AttributeError -- hard to know without code. |
maybe I wrote my code wrong.!? I will review my code carefully. |
Hello, I have tried to apply dm21 to transitional metal systems recently. But even with single atom like V, Cr, Mn, I found they are very hard to converge. I tried to apply SOSCF by
mf = scf.UKS(mol).density_fit()
mf._numint = dm21.NeuralNumInt(dm21.Functional.DM21)
mf = mf.newton()
mf.kernel(mo_init,mocc_init)
which is basically the example code for SOSCF in pySCF example.
but it gave me the error message
Could you please tell me how to apply newton properly with dm21?
The text was updated successfully, but these errors were encountered: