openforcefield / openff-toolkit

The Open Forcefield Toolkit provides implementations of the SMIRNOFF format, parameterization engine, and other tools. Documentation available at http://open-forcefield-toolkit.readthedocs.io
http://openforcefield.org
MIT License
311 stars 91 forks source link

AttributeError: module 'openforcefield'has no attribute 'topology' #429

Closed arthuc01 closed 3 years ago

arthuc01 commented 5 years ago

Using VitualBox version of LinuxMint (fresh install). Have installed Anaconda Python. Then followed install instructions .

This does not raise an error import openforcefield as off

But... from openforcefield.topology import Topology gives the error... AttributeError: module 'openforcefield'has no attribute 'topology'

from simtk.openmm import app
from openforcefield.tests.utils import get_data_file_path, get_packmol_pdb_file_path
pdb_filepath = get_packmol_pdb_file_path('cyclohexane_ethanol_0.4_0.6')
monomer_names = ('cyclohexane', 'ethanol')

ModuleNotFoundError: No module names 'openforcefield.test.utils'

jchodera commented 5 years ago

Can you report which version of openforcefield you have installed? e.g.

(base) lski2414:~ choderaj$ conda list openforcefield
# packages in environment at /Users/choderaj/miniconda:
#
# Name                    Version                   Build  Channel
openforcefield            0.5.1                    py37_0    omnia
openforcefields           1.0.0rc1                 py37_2    omnia

With openforcefield 0.5.1, I cannot reproduce this---the import works fine:

>>> import openforcefield as off
>>> from openforcefield.topology import Topology
>>> 
j-wags commented 5 years ago

@arthuc01 I'm back in the office and can take a look into this. Are you still experiencing the problem? If so, could you paste the output of running conda list?

davidlmobley commented 3 years ago

Someone I'm working with just ran into a similar error message, and it turned out the problem was that they had an old version of the toolkit. Ensuring the toolkit version was up-to-date ( the conda-forge one) fixed the problem. Marking this as closed.