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

TypeError when calling geomeTRIC from pyscf #84

Closed
xptree opened this issue Apr 17, 2019 · 4 comments
Closed

TypeError when calling geomeTRIC from pyscf #84

xptree opened this issue Apr 17, 2019 · 4 comments

Comments

@xptree
Copy link

xptree commented Apr 17, 2019

When calling geomeTRIC from pyscf, I meet the following TypeError. I am not sure if it is caused by geomeTRIC itself, or pyscf calls geomeTRIC in an improper way. @sunqm

  File "/root/pyscf/pyscf/geomopt/geometric_solver.py", line 171, in kernel
    maxsteps=self.max_cycle, **self.params)
  File "/root/pyscf/pyscf/geomopt/geometric_solver.py", line 119, in kernel
    constraints=constraints, **kwargs)
  File "/root/anaconda3/lib/python3.7/site-packages/geometric-0.9.5.1+33.g0007fbf-py3.7.egg/geometric/optimize.py", line 1755, in run_optimizer
    progress = Optimize(coords, M, IC, engine, dirname, params, xyzout)
  File "/root/anaconda3/lib/python3.7/site-packages/geometric-0.9.5.1+33.g0007fbf-py3.7.egg/geometric/optimize.py", line 1312, in Optimize
    return optimizer.optimizeGeometry()
  File "/root/anaconda3/lib/python3.7/site-packages/geometric-0.9.5.1+33.g0007fbf-py3.7.egg/geometric/optimize.py", line 1271, in optimizeGeometry
    self.calcEnergyForce()
  File "/root/anaconda3/lib/python3.7/site-packages/geometric-0.9.5.1+33.g0007fbf-py3.7.egg/geometric/optimize.py", line 983, in calcEnergyForce
    self.E = spcalc['energy']
TypeError: tuple indices must be integers or slices, not str

The bug appears at 0007fbf, but everything works well if I revert to ed832c5.

My pyscf is at pyscf/pyscf@98a0bca.

@leeping
Copy link
Owner

leeping commented Apr 17, 2019

This is related to #82 which changed the internal API for Engine objects. It should be fixable with changing a single line in PySCF's Engine implementation. I'll cut a release this morning as well.

@leeping
Copy link
Owner

leeping commented Apr 17, 2019

I made a PR to pyscf that should resolve the issue here: pyscf/pyscf#309

@leeping
Copy link
Owner

leeping commented Apr 17, 2019

Now that the PR is merged (thanks @sunqm ), could you check out the latest commit of both codes and try again?

@xptree
Copy link
Author

xptree commented Apr 18, 2019

It works. Thanks!

@xptree xptree closed this as completed Apr 18, 2019
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

2 participants