Skip to content
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

Getting infinite forces when using the GFN0-xTB calculator for periodic system #80

Open
ShaunHan opened this issue Jul 3, 2022 · 0 comments
Labels
unconfirmed This report has not yet been confirmed by the developers

Comments

@ShaunHan
Copy link

ShaunHan commented Jul 3, 2022

I am using the GFN0-xTB calculator for geometry optimization of a periodic system. However, the optimization always terminates at a certain step where some of the forces become infinite (or negative infinite). I am using xtb-python version 20.1, and running on Linux.

I attach below a zip file that contains two very similar structures, test1.traj and test2.traj. The energy is normal for test1.traj, but the forces become infinite. For test2.traj both energy and forces are normal.
structures.zip

Below is the code that should reproduce the behaviour:

from ase.io import read, write
from xtb.ase.calculator import XTB

# Read structure data
atoms = read('test1.traj') # test2.traj works fine

# Create the calculator for GFN0-xTB under periodic boundary conditions
calc = XTB(method='GFN0-xTB')
atoms.calc = calc

# Get the single point energy and forces
e = atoms.get_potential_energy()
f = atoms.get_forces()
print(e)
print(f)

Output:

-4523.6795731769935
[[-inf  inf -inf]
 [-inf  inf -inf]
 [-inf -inf -inf]
 [ inf -inf -inf]
 [ inf  inf -inf]
 [ inf  inf -inf]
 [-inf  inf -inf]
 [-inf  inf -inf]
 [-inf -inf -inf]
 [ inf -inf -inf]
 [ inf  inf -inf]
 [-inf  inf -inf]
 [ inf  inf  inf]
 [ inf  inf  inf]
 [ inf -inf  inf]
 [-inf -inf  inf]
 [-inf  inf  inf]
 [-inf -inf  inf]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [  0.   0.   0.]
 [-inf -inf -inf]]
@ShaunHan ShaunHan added the unconfirmed This report has not yet been confirmed by the developers label Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed This report has not yet been confirmed by the developers
Projects
None yet
Development

No branches or pull requests

1 participant