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

optimizer crash #126

Open
mkrompiec opened this issue Mar 22, 2021 · 4 comments
Open

optimizer crash #126

mkrompiec opened this issue Mar 22, 2021 · 4 comments

Comments

@mkrompiec
Copy link

For certain molecules, we are getting this error reproducibly:
Unknown Error:
Traceback (most recent call last):
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/geometric/optimize.py", line 1893, in main
run_optimizer(**vars(args))
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/geometric/optimize.py", line 1821, in run_optimizer
progress = Optimize(coords, M, IC, engine, dirname, params)
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/geometric/optimize.py", line 1331, in Optimize
return optimizer.optimizeGeometry()
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/geometric/optimize.py", line 1299, in optimizeGeometry
self.evaluateStep()
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/geometric/optimize.py", line 1277, in evaluateStep
Eig1 = np.linalg.eigh(self.H)[0]
File "<array_function internals>", line 5, in eigh
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/numpy/linalg/linalg.py", line 1470, in eigh
w, vt = gufunc(a, signature=signature, extobj=extobj)
File "/sw-pmpv/sdk/anaconda-python/2020.07/envs/anaconda-2020/lib/python3.8/site-packages/numpy/linalg/linalg.py", line 94, in _raise_linalgerror_eigenvalues_nonconvergence
raise LinAlgError("Eigenvalues did not converge")
numpy.linalg.LinAlgError: Eigenvalues did not converge

Unfortunately, I can't share any of the offending structures due to their confidential nature. I hope we will find a non-confidential test case soon. Anyway, do you have any hints how to fix this?

@leeping
Copy link
Owner

leeping commented Mar 22, 2021

Hello Michal,

Thanks for sharing, this seems to be a rare error and I don't have any examples here that can reproduce it. For these cases, one possibility is you can change the coordinate system, for example using --coordys dlc on the command line. It would also be good if you could visualize the structure to make sure nothing truly unexpected is happening.

If you could write out the self.H variable to a file, right before the line below is called, and share the matrix with me, I may be able to reproduce the error and let you know if I can come up with a fix. I believe the matrix does not contain any information that would allow someone to deduce the original structure.

Eig1 = np.linalg.eigh(self.H)[0]

You can do this by editing the line indicated in the file above to the following:

try:
    Eig1 = np.linalg.eigh(self.H)[0]
except:
    np.save("not_converged.npy", self.H)
    raise RuntimeError("Eigenvalues did not converge")

Thanks,

  • Lee-Ping

@jthorton
Copy link
Collaborator

jthorton commented Nov 16, 2021

Hi @leeping,

I am also seeing this consistently for molecules when performing 2D torsiondrives. I have attached the json input for an optimisation extracted from the 2D scan run in QCFractal. The job requires xtb-python and can be run via the QCEngine CLI using qcengine run-procedure geometric geo_fail.json. Let me know if there is anything else I can provide to help debug the issue. Note I am using coordsys=dlc.
geo_fail.json.txt

Update: changing the coordsys to tric avoids the issue.

@leeping
Copy link
Owner

leeping commented Dec 8, 2021 via email

@leeping
Copy link
Owner

leeping commented Aug 15, 2023

@jthorton I noticed that this issue has been open for a long time now. Is it still an issue with the latest release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants