shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
185 stars 53 forks source link

Issue with parmed.utils.six #377

Closed samuele-giannini closed 2 years ago

samuele-giannini commented 3 years ago

Hi All, sorry to disturb. I have a problem running InterMol: python convert.py --des_in validation/inputs/Desmond/UnitTest/frag_opls2001/frag_opls2001.cms --gromacs --odir test_output -e Traceback (most recent call last): File "convert.py", line 10, in from parmed.utils.six import string_types ModuleNotFoundError: No module named 'parmed.utils.six'

I did a bit of googling but cannot find a way to install parmed.utils.six. Any help would be appreciated. Sam

mattwthompson commented 3 years ago

What version of everything are you using? conda list or pip freeze

samuele-giannini commented 3 years ago

Hi, thanks for the answer. I was trying to install InterMol within a conda environment (with python 3.6), because I managed to install ParmEd in that way. However for the installation of InterMol I followed your guidelines: pip install .

In the following you can see the list you requested:

packages in environment at /home/samuele/anaconda2/envs/p36:

#

Name Version Build Channel

_anaconda_depends 2019.03 py36_0 _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 0_gnu conda-forge alabaster 0.7.12 py_0 conda-forge anaconda custom py36_1 anaconda-client 1.7.2 py_0 conda-forge anaconda-project 0.8.3 py_0 conda-forge asn1crypto 1.3.0 py36_0 conda-forge astroid 2.3.3 py36_1 conda-forge astropy 4.0 py36h516909a_1 conda-forge atomicwrites 1.3.0 py_0 conda-forge attrs 19.3.0 py_0 conda-forge babel 2.8.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge backports 1.0 py_2 conda-forge backports.os 0.1.1 py36_1001 conda-forge backports.shutil_get_terminal_size 1.0.0 py_3 conda-forge beautifulsoup4 4.8.2 py36_0 conda-forge biopython 1.78 bitarray 1.2.1 py36h516909a_0 conda-forge bkcharts 0.2 py36_0 conda-forge blas 2.14 openblas conda-forge bleach 3.1.0 py_0 conda-forge blosc 1.17.1 he1b5a44_0 conda-forge bokeh 1.4.0 py36_0 conda-forge boto 2.49.0 py_0 conda-forge bottleneck 1.3.1 py36hc1659b7_0 conda-forge bzip2 1.0.8 h516909a_2 conda-forge ca-certificates 2019.11.28 hecc5488_0 conda-forge cairo 1.16.0 hfb77d84_1002 conda-forge certifi 2019.11.28 py36_0 conda-forge cffi 1.13.2 py36h8022711_0 conda-forge chardet 3.0.4 py36_1003 conda-forge click 7.0 py_0 conda-forge cloudpickle 1.2.2 py_1 conda-forge clyent 1.2.2 py_1 conda-forge colorama 0.4.3 py_0 conda-forge contextlib2 0.6.0.post1 py_0 conda-forge cryptography 2.8 py36h72c5cf5_1 conda-forge curl 7.65.3 hf8cf82a_0 conda-forge cycler 0.10.0 py_2 conda-forge cython 0.29.14 py36he1b5a44_0 conda-forge cytoolz 0.10.1 py36h516909a_0 conda-forge dask 2.9.2 py_0 conda-forge dask-core 2.9.2 py_0 conda-forge dbus 1.13.6 he372182_0 conda-forge decorator 4.4.1 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge distributed 2.9.3 py_0 conda-forge docutils 0.16 py36_0 conda-forge entrypoints 0.3 py36_1000 conda-forge et_xmlfile 1.0.1 py_1001 conda-forge expat 2.2.9 he1b5a44_0 conda-forge fastcache 1.1.0 py36h516909a_0 conda-forge flask 1.1.1 py_1 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.0 he983fc9_1 conda-forge fribidi 1.0.5 h516909a_1002 conda-forge fsspec 0.6.2 py_0 conda-forge funcsigs 1.0.2 get_terminal_size 1.0.0 haa9412d_0 gettext 0.19.8.1 hc5be6a0_1002 conda-forge gevent 1.4.0 py36h516909a_0 conda-forge glib 2.58.3 py36h6f030ca_1002 conda-forge gmp 6.2.0 he1b5a44_0 conda-forge gmpy2 2.1.0b1 py36h04dde30_0 conda-forge graphite2 1.3.13 hf484d3e_1000 conda-forge greenlet 0.4.15 py36h516909a_0 conda-forge GridDataFormats 0.5.0 gsd 2.4.2 gst-plugins-base 1.14.5 h0935bb2_1 conda-forge gstreamer 1.14.5 h36ae1b5_1 conda-forge h5py 2.10.0 nompi_py36h513d04c_101 conda-forge harfbuzz 2.4.0 h9f30f68_3 conda-forge hdf5 1.10.5 nompi_h3c11f04_1104 conda-forge heapdict 1.0.1 py_0 conda-forge html5lib 1.0.1 py_0 conda-forge hypothesis 5.3.1 py_0 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.8 py36_1000 conda-forge imageio 2.6.1 py36_0 conda-forge imagesize 1.2.0 py_0 conda-forge importlib_metadata 1.4.0 py36_0 conda-forge inflect 4.0.0 py36_1 conda-forge intel-openmp 2019.4 243 intermol 0.1.0 ipykernel 5.1.4 py36h5ca1d4c_0 conda-forge ipython 7.11.1 py36h5ca1d4c_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.5.1 py_0 conda-forge isort 4.3.21 py36_0 conda-forge itsdangerous 1.1.0 py_0 conda-forge jaraco.itertools 5.0.0 py_0 conda-forge jbig 2.1 h14c3975_2001 conda-forge jdcal 1.4.1 py_0 conda-forge jedi 0.16.0 py36_0 conda-forge jeepney 0.4.2 py_0 conda-forge jinja2 2.10.3 py_0 conda-forge joblib 0.14.1 py_0 conda-forge jpeg 9c h14c3975_1001 conda-forge json5 0.8.5 py_0 conda-forge jsonschema 3.2.0 py36_0 conda-forge jupyter 1.0.0 py_2 conda-forge jupyter_client 5.3.4 py36_1 conda-forge jupyter_console 5.1.0 py36_0 conda-forge jupyter_core 4.6.1 py36_0 conda-forge jupyterlab 1.2.6 py_0 conda-forge jupyterlab_server 1.0.6 py_0 conda-forge keyring 21.1.0 py36_0 conda-forge kiwisolver 1.1.0 py36hc9558a2_0 conda-forge krb5 1.16.4 h2fd8d38_0 conda-forge lazy-object-proxy 1.4.3 py36h516909a_1 conda-forge libblas 3.8.0 14_openblas conda-forge libcblas 3.8.0 14_openblas conda-forge libclang 9.0.1 default_hde54327_0 conda-forge libcurl 7.65.3 hda55be3_0 conda-forge libedit 3.1.20170329 hf8c457e_1001 conda-forge libffi 3.2.1 he1b5a44_1006 conda-forge libgcc-ng 9.2.0 h24d8f2e_2 conda-forge libgfortran-ng 7.3.0 hdf63c60_4 conda-forge libgomp 9.2.0 h24d8f2e_2 conda-forge libiconv 1.15 h516909a_1005 conda-forge liblapack 3.8.0 14_openblas conda-forge liblapacke 3.8.0 14_openblas conda-forge libllvm8 8.0.1 hc9558a2_0 conda-forge libllvm9 9.0.1 hc9558a2_0 conda-forge libopenblas 0.3.7 h5ec1e0e_6 conda-forge libpng 1.6.37 hed695b0_0 conda-forge libsodium 1.0.17 h516909a_0 conda-forge libssh2 1.8.2 h22169c7_2 conda-forge libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge libtiff 4.1.0 hc3755c2_3 conda-forge libtool 2.4.6 h14c3975_1002 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxkbcommon 0.9.1 hebb1f50_0 conda-forge libxml2 2.9.10 hee79883_0 conda-forge libxslt 1.1.33 h31b3aaa_0 conda-forge llvmlite 0.31.0 py36h8b12597_0 conda-forge locket 0.2.0 py_2 conda-forge lxml 4.4.2 py36h7ec2d77_0 conda-forge lz4-c 1.8.3 he1b5a44_1001 conda-forge lzo 2.10 h14c3975_1000 conda-forge markupsafe 1.1.1 py36h516909a_0 conda-forge matplotlib 3.1.2 py36_1 conda-forge matplotlib-base 3.1.2 py36h250f245_1 conda-forge mccabe 0.6.1 py_1 conda-forge MDAnalysis 1.1.1 mistune 0.8.4 py36h516909a_1000 conda-forge mkl 2019.4 243 mkl-service 2.3.0 py36h516909a_0 conda-forge mkl_fft 1.1.0 py36hc1659b7_1 conda-forge mkl_random 1.1.0 py36hb3f55d8_0 conda-forge mmtf-python 1.1.2 mock 3.0.5 py36_0 conda-forge more-itertools 8.1.0 py_0 conda-forge mpc 1.1.0 h04dde30_1006 conda-forge mpfr 4.0.2 he80fd80_0 conda-forge mpmath 1.1.0 py_0 conda-forge msgpack-python 0.6.2 py36hc9558a2_0 conda-forge multipledispatch 0.6.0 py_0 conda-forge nbconvert 5.6.1 py36_0 conda-forge nbformat 5.0.4 py_0 conda-forge ncurses 6.1 hf484d3e_1002 conda-forge networkx 2.4 py_0 conda-forge nltk 3.4.4 py_0 conda-forge nose 1.3.7 py36_1003 conda-forge notebook 6.0.3 py36_0 conda-forge nspr 4.24 he1b5a44_0 conda-forge nss 3.47 he751ad9_0 conda-forge numba 0.48.0 py36hb3f55d8_0 conda-forge numexpr 2.7.1 py36hb3f55d8_0 conda-forge numpy 1.19.5 numpy 1.17.5 py36h95a1406_0 conda-forge numpy-base 1.18.1 py36h2f8d375_1 numpydoc 0.9.2 py_0 conda-forge olefile 0.46 py_0 conda-forge openpyxl 3.0.3 py_0 conda-forge openssl 1.1.1d h516909a_0 conda-forge packaging 20.1 py_0 conda-forge pandas 0.25.3 py36hb3f55d8_0 conda-forge pandoc 2.9.1.1 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge pango 1.42.4 ha030887_1 conda-forge ParmEd 3.4.0+19.g8ac72ce parso 0.6.0 py_0 conda-forge partd 1.1.0 py_0 conda-forge path 13.1.0 py36_0 conda-forge path.py 12.4.0 0 conda-forge pathlib2 2.3.5 py36_0 conda-forge patsy 0.5.1 py_0 conda-forge pcre 8.43 he1b5a44_0 conda-forge pep8 1.7.1 py_0 conda-forge pexpect 4.8.0 py36_0 conda-forge pickleshare 0.7.5 py36_1000 conda-forge pillow 7.0.0 py36hefe7db6_0 conda-forge pip 20.0.2 py36_0 conda-forge pixman 0.38.0 h516909a_1003 conda-forge pluggy 0.12.0 py_0 conda-forge ply 3.11 py_1 conda-forge prometheus_client 0.7.1 py_0 conda-forge prompt_toolkit 3.0.2 py_0 conda-forge psutil 5.6.7 py36h516909a_0 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge py 1.8.1 py_0 conda-forge pycodestyle 2.5.0 py_0 conda-forge pycosat 0.6.3 py36h516909a_1002 conda-forge pycparser 2.19 py36_1 conda-forge pycrypto 2.6.1 py36h516909a_1003 conda-forge pycurl 7.43.0.4 py36h16ce93b_0 conda-forge pyflakes 2.1.1 py_0 conda-forge pygments 2.5.2 py_0 conda-forge pylint 2.4.4 py36_0 conda-forge pyodbc 4.0.28 py36he1b5a44_0 conda-forge pyopenssl 19.1.0 py36_0 conda-forge pyparsing 2.4.6 py_0 conda-forge pyqt 5.12.3 py36hcca6a23_1 conda-forge pyrsistent 0.15.7 py36h516909a_0 conda-forge pysocks 1.7.1 py36_0 conda-forge pytables 3.6.1 py36h9f153d1_1 conda-forge pytest 5.3.4 py36_0 conda-forge pytest-arraydiff 0.3 py_0 conda-forge pytest-astropy 0.7.0 py_0 conda-forge pytest-astropy-header 0.1.2 py_0 conda-forge pytest-doctestplus 0.4.0 py_0 conda-forge pytest-openfiles 0.4.0 py_0 conda-forge pytest-remotedata 0.3.1 py_0 conda-forge python 3.6.7 h357f687_1006 conda-forge python-dateutil 2.8.1 py_0 conda-forge pytz 2019.3 py_0 conda-forge pywavelets 1.1.1 py36hc1659b7_0 conda-forge pyyaml 5.3 py36h516909a_0 conda-forge pyzmq 18.1.1 py36h1768529_0 conda-forge qt 5.12.5 hd8c4c69_1 conda-forge qtawesome 0.6.1 py_0 conda-forge qtconsole 4.6.0 py_0 conda-forge qtpy 1.9.0 py_0 conda-forge RDF 1.0 rdkit-pypi 2021.3.2.2 readline 8.0 hf8c457e_0 conda-forge requests 2.22.0 py36_1 conda-forge rope 0.16.0 py_0 conda-forge ruamel_yaml 0.15.80 py36h516909a_1000 conda-forge scikit-image 0.16.2 py36hb3f55d8_0 conda-forge scikit-learn 0.22.1 py36hcdab131_1 conda-forge scipy 1.4.1 py36h921218d_0 conda-forge seaborn 0.9.0 py_2 conda-forge secretstorage 3.1.2 py36_0 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 45.1.0 py36_0 conda-forge simplegeneric 0.8.1 py_1 conda-forge singledispatch 3.4.0.3 py36_1000 conda-forge sip 4.19.20 py36he1b5a44_0 conda-forge six 1.14.0 py36_0 conda-forge snappy 1.1.8 he1b5a44_1 conda-forge snowballstemmer 2.0.0 py_0 conda-forge sortedcollections 1.1.2 py_0 conda-forge sortedcontainers 2.1.0 py_0 conda-forge soupsieve 1.9.4 py36_0 conda-forge sphinx 2.3.1 py_0 conda-forge sphinxcontrib 1.0 py36_1 sphinxcontrib-applehelp 1.0.1 py_0 conda-forge sphinxcontrib-devhelp 1.0.1 py_0 conda-forge sphinxcontrib-htmlhelp 1.0.2 py_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.2 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.3 py_0 conda-forge sphinxcontrib-websupport 1.1.2 py_0 conda-forge spyder 3.3.6 py36_1 conda-forge spyder-kernels 0.5.2 py36_0 conda-forge sqlalchemy 1.3.13 py36h516909a_0 conda-forge sqlite 3.30.1 hcee41ef_0 conda-forge statsmodels 0.11.0 py36h516909a_0 conda-forge sympy 1.5.1 py36_1 conda-forge tblib 1.6.0 py_0 conda-forge terminado 0.8.3 py36_0 conda-forge testpath 0.4.4 py_0 conda-forge tk 8.6.10 hed695b0_0 conda-forge toolz 0.10.0 py_0 conda-forge tornado 6.0.3 py36h516909a_0 conda-forge tqdm 4.61.0 traitlets 4.3.3 py36_0 conda-forge typed-ast 1.4.1 py36h516909a_0 conda-forge unicodecsv 0.14.1 py_1 conda-forge unixodbc 2.3.7 h227dcee_1000 conda-forge urllib3 1.25.7 py36_0 conda-forge wcwidth 0.1.8 py_0 conda-forge webencodings 0.5.1 py_1 conda-forge werkzeug 0.16.1 py_0 conda-forge wheel 0.34.1 py36_0 conda-forge widgetsnbextension 3.5.1 py36_0 conda-forge wrapt 1.11.2 py36h516909a_0 conda-forge wurlitzer 2.0.0 py36_0 conda-forge xlrd 1.2.0 py_0 conda-forge xlsxwriter 1.2.7 py_0 conda-forge xlwt 1.3.0 py_1 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.9 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h14c3975_1001 conda-forge yaml 0.2.2 h516909a_1 conda-forge zeromq 4.3.2 he1b5a44_2 conda-forge zict 1.0.0 py_0 conda-forge zipp 2.1.0 py_0 conda-forge zlib 1.2.11 h516909a_1006 conda-forge zstd 1.4.4 h3b9ef0a_1 conda-forge

AxillaryPower commented 2 years ago

I came here to ask about the same issue; it appears that newer versions of ParmEd no longer have parmed.utils.six in its utils folder, where evidently it used to. InterMol (or at least convert.py) may need to be updated to be compatible with more recent ParmEd.

I was able to eliminate the error by editing convert.py; the only thing it was using parmed.utils.six for was to from parmed.utils.six import string_types and string_types is,

if PY3:
    string_types = str,
...
else:
    string_types = basestring,

so in the one place where convert.py, you can change that line

mattwthompson commented 2 years ago

I have a fix running in #380 but if you're using a local build, you should be able to modify line 10 in intermol/convert.py to just be from six import string_types to get it running again. That module in ParmEd is copy-pasted from another one that's probably installed in every Python environment these days.

mattwthompson commented 2 years ago

To any future travelers sent here by the Google machine: this should be fixed in the master branch via the linked PR. That change will also go into a release and conda package at some point.