Issue with python OpenMM import

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Christoph Klein
Posts: 3
Joined: Thu May 27, 2010 1:13 pm

Issue with python OpenMM import

Post by Christoph Klein » Fri Apr 20, 2012 9:02 pm

Hello all,

I just installed the 4.0 and I am having an issue importing the package in python. I get the following error message:
import simtk.openmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/__init__.py", line 36, in <module>
from simtk.openmm.openmm import *
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/openmm.py", line 37, in <module>
_openmm = swig_import_helper()
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/openmm.py", line 33, in swig_import_helper
_mod = imp.load_module('_openmm', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/simtk/openmm/_openmm.so: undefined symbol: _ZN6OpenMM30AmoebaGeneralizedKirkwoodForce19setDielectricOffsetEd
Any idea on how to fix this? I installed all non-OpenCL and non-CUDA packages.

Thanks,

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

Re: Issue with python OpenMM import

Post by Peter Eastman » Tue Apr 24, 2012 10:16 am

By any chance have you installed an OpenMM 4.1 beta on that machine? That error message looks like one that was present in the first beta (fixed in the second one). It definitely shouldn't be happening with 4.0.

Peter

User avatar
Christoph Klein
Posts: 3
Joined: Thu May 27, 2010 1:13 pm

Re: Issue with python OpenMM import

Post by Christoph Klein » Thu May 03, 2012 11:40 am

Sorry for the delayed response. This was using 4.0. I have also tried installing the 4.1 beta but I get the same error.

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

Re: Issue with python OpenMM import

Post by Peter Eastman » Thu May 03, 2012 5:36 pm

What do you get if you type

nm -g /usr/local/lib/python2.7/site-packages/simtk/openmm/_openmm.so

That will list all the symbols defined in the library. Also check the creation date of that library. Is it really the version you think it is?

Peter

User avatar
Christoph Klein
Posts: 3
Joined: Thu May 27, 2010 1:13 pm

Re: Issue with python OpenMM import

Post by Christoph Klein » Fri May 04, 2012 3:25 pm

Ah ok that revealed the problem. The library apparently wasn't linked properly to my python 2.7 installation. All is well.

Thank you for the help!

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

Re: Issue with python OpenMM import

Post by Peter Eastman » Mon May 07, 2012 10:16 am

Ok. Glad it turned out to be something simple!

Peter

POST REPLY