-
Notifications
You must be signed in to change notification settings - Fork 152
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
Bug in gradient calculation #986
Comments
There is a much smaller structure with the same bug
|
And then for...
Printout:
|
Even water molecule is affected :| So, Water number 1:
And gradients difference:
And let's rotate this water to Water number 2:
And gradients difference:
The problem happens somewhere in xtb hamiltonian. But it seems to me that The problematic code where I stopped: Lines 702 to 705 in 0da2327
P.S.: numbers may slightly be different for you since I've already disabled some terms both for grads and energies. |
GFN0, GFNFF works fine. |
I caught it :) |
#1208 seems to have fixed most of the problems. Only the rotated water example still seems to be wrong:
Here it is strangely only the x-component. tblite gets this and the other cases right (the remaining differences are numerical settings and can be converged):
So I think this is a further small bug. From looking a bit, I don't quite see the problem. The good thing is that it appears to be a very special case and tblite fixes it (so by moving to tblite for the Hamiltonians in 7.0.0 should fix this). |
Describe the bug
There is a bug in the gradient calculation in XTB. Enabling the debug numerical differentiation code confirms it. Bizarrely, the error seems to be in the Z component of only 2 of the carbons (!!). This bug has been sitting with me for a while, but after procrastinating the bug hunting for too long I decided to file it instead.
To Reproduce
Run XTB against the structure provided. The gradient norm should be around 0.0059248, instead XTB calculates it as 0.0065176. Enable the debug numerical differentiation in order to confirm it. I attach the output with the debug code enabled.
output.log
NEW2-vstrict-valinomycin-xtb.xyz.log
The text was updated successfully, but these errors were encountered: