Closed subhamoymahajan closed 10 months ago
How did you install the toolkit? You're missing most dependencies, so I doubt you installed the conda package. Here's how we recommend installing a fresh environment, and
$ mamba install openff-toolkit -c conda-forge
usually works into an existing environment.
I was unable to install it using conda, so I used git clone
and python setup.py install
to install openff-toolkit.
I think the problem would still persists because openff.units
is not defined. Is a specific version of openff-toolkit working for you that I can test ?
In openff/toolkit/topology/molecule.py
line 60,
from openff.toolkit.utils.constants import DEFAULT_AROMATICITY_MODEL
. Correspondingly, constants.py
exists at openff/toolkit/utils
. However, for line 54,
from openff.units import Quantity, unit
, openff has no file named units.py. So i feel installing an older version where the file still exists would work.
Please use the documented installation methods I linked above; local installations do not bring in dependencies and is not supported due to the extra, unnecessary dependency management burden that is passed on to users.
Mamba installation worked for me. Thanks.
Describe the bug The package fails to load Molecule class from openff.toolkit.topology
To Reproduce from openff.toolkit.topology import Molecule
Output Traceback (most recent call last): File "/lustre/eaglefs/scratch/subhamoy/FFgen/test.py", line 1, in
from openff.toolkit.topology import Molecule
File "/home/subhamoy/.conda-envs/FFgen/lib/python3.12/site-packages/openff_toolkit-0.14.4+12.g575501a2-py3.12.egg/openff/toolkit/topology/init.py", line 1, in
from openff.toolkit.topology.molecule import (
File "/home/subhamoy/.conda-envs/FFgen/lib/python3.12/site-packages/openff_toolkit-0.14.4+12.g575501a2-py3.12.egg/openff/toolkit/topology/molecule.py", line 54, in
from openff.units import Quantity, unit
ModuleNotFoundError: No module named 'openff.units'
Computing environment (please complete the following information):
conda list
Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge babel 2.13.1 pypi_0 pypi bzip2 1.0.8 hd590300_5 conda-forge ca-certificates 2023.7.22 hbcca054_0 conda-forge contourpy 1.2.0 pypi_0 pypi cycler 0.12.1 pypi_0 pypi fonttools 4.44.0 pypi_0 pypi kiwisolver 1.4.5 pypi_0 pypi ld_impl_linux-64 2.40 h41732ed_0 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 13.2.0 h807b86a_2 conda-forge libgomp 13.2.0 h807b86a_2 conda-forge libnsl 2.0.1 hd590300_0 conda-forge libsqlite 3.44.0 h2797004_0 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libzlib 1.2.13 hd590300_5 conda-forge matplotlib 3.8.1 pypi_0 pypi ncurses 6.4 h59595ed_2 conda-forge networkx 3.2.1 pypi_0 pypi numpy 1.26.1 pypi_0 pypi openff-toolkit 0.14.4+12.g575501a2 pypi_0 pypi openmmforcefields 0.12.0+4.g637d551 pypi_0 pypi openssl 3.1.4 hd590300_0 conda-forge packaging 23.2 pypi_0 pypi pillow 10.1.0 pypi_0 pypi pip 23.3.1 pyhd8ed1ab_0 conda-forge pyparsing 3.1.1 pypi_0 pypi python 3.12.0 hab00c5b_0_cpython conda-forge python-dateutil 2.8.2 pypi_0 pypi readline 8.2 h8228510_1 conda-forge scipy 1.11.3 pypi_0 pypi setuptools 68.2.2 pyhd8ed1ab_0 conda-forge six 1.16.0 pypi_0 pypi tk 8.6.13 noxft_h4845f30_101 conda-forge tzdata 2023c h71feb2d_0 conda-forge wheel 0.41.3 pyhd8ed1ab_0 conda-forge xz 5.2.6 h166bdaf_0 conda-forge
Additional context I have used the main branch.