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
309 stars 90 forks source link

Validating the conversion to GROMACS #1647

Closed 8marmar8 closed 1 year ago

8marmar8 commented 1 year ago

Dear developers,

I was trying to use the Jupiter Notebook from the folder https://github.com/openforcefield/openff-toolkit/blob/main/examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb, in order to parametrize a molecule that I want to simulate in Gromacs. I obtained the top and gro files, but during the last step: Validating the conversion to GROMACS and LAMMPS files, in particular:

if find_executable("gmx"):
    pprint(get_gromacs_energies(interchange).energies)
I received an error about the energies:
---------------------------------------------------------------------------
UnsupportedExportError                    Traceback (most recent call last)
Cell In[113], line 2
      1 if find_executable("gmx"):
----> 2     pprint(get_gromacs_energies(interchange).energies)

File ~/anaconda3/envs/openff-toolkit/lib/python3.10/site-packages/openff/interchange/drivers/gromacs.py:86, in get_gromacs_energies(interchange, mdp, round_positions, detailed)
     57 def get_gromacs_energies(
     58     interchange: Interchange,
     59     mdp: str = "auto",
     60     round_positions: int = 8,
     61     detailed: bool = False,
     62 ) -> EnergyReport:
     63     """
     64     Given an OpenFF Interchange object, return single-point energies as computed by GROMACS.
     65 
   (...)
     83 
     84     """
     85     return _process(
---> 86         _get_gromacs_energies(
     87             interchange=interchange,
     88             mdp=mdp,
     89             round_positions=round_positions,
     90         ),
     91         detailed=detailed,
     92     )

File ~/anaconda3/envs/openff-toolkit/lib/python3.10/site-packages/openff/interchange/drivers/gromacs.py:108, in _get_gromacs_energies(interchange, mdp, round_positions)
    106     mdconfig = MDConfig.from_interchange(interchange)
    107     mdp_file = "tmp.mdp"
--> 108     mdconfig.write_mdp_file(mdp_file)
    109 else:
    110     mdp_file = _get_mdp_file(mdp)

File ~/anaconda3/envs/openff-toolkit/lib/python3.10/site-packages/openff/interchange/components/mdconfig.py:162, in MDConfig.write_mdp_file(self, mdp_file)
    160     mdp.write(f"rcoulomb = {coul_cutoff}\n")
    161 else:
--> 162     raise UnsupportedExportError(
    163         f"Electrostatics method {self.coul_method} not supported",
    164     )
    166 if self.vdw_method == "cutoff":
    167     mdp.write("vdwtype = cutoff\n")

UnsupportedExportError: Electrostatics method Coulomb not supported

I'm not understanding why I have this error, could I trust and use the top and gro files that were generated?

Thank for your help Maria

mattwthompson commented 1 year ago

Thanks for reporting this, Maria, I'll have a closer look tomorrow but I'm fairly confident this error is mine. I don't think you're doing anything wrong here; the example just doesn't run properly off the shelf as you'd expect (and we strive to achieve).

mattwthompson commented 1 year ago

@8marmar8 I can't reproduce this using a fresh conda environment. I used this file but there are others that should work okay.

image

Could you share the output of conda list?

8marmar8 commented 1 year ago

Hi I have installed the environment that is present in the example folder. this is the output of conda list:

PS: I want to clarify that if I run all the steps of the Jupiter notebook with the two example molecules I don't have any errors. But when I try to do the same steps with my molecule I obtain the error reported before. If it's needed I can give you the smile of my molecule.

Name Version Build Channel

ambertools 23.0 py310h9dd47ba_1 conda-forge amberutils 21.0 pypi_0 pypi anyio 3.7.0 pyhd8ed1ab_1 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py310h90acd4f_3 conda-forge arpack 3.7.0 hefb7bc6_2 conda-forge asttokens 2.2.1 pyhd8ed1ab_0 conda-forge astunparse 1.6.3 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge aws-c-auth 0.6.28 hb1389d5_5 conda-forge aws-c-cal 0.5.27 h1a35643_0 conda-forge aws-c-common 0.8.20 h0dc2134_0 conda-forge aws-c-compression 0.2.17 h0ead7ca_0 conda-forge aws-c-event-stream 0.3.0 h3f5e915_6 conda-forge aws-c-http 0.7.8 h7d0dcbb_4 conda-forge aws-c-io 0.13.26 ha48b2be_0 conda-forge aws-c-mqtt 0.8.13 h4efb563_2 conda-forge aws-c-s3 0.3.4 hefe73a3_5 conda-forge aws-c-sdkutils 0.1.10 h0ead7ca_0 conda-forge aws-checksums 0.1.16 h0ead7ca_0 conda-forge aws-crt-cpp 0.20.2 he56e13b_9 conda-forge aws-sdk-cpp 1.10.57 h3009220_14 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.4 heccf04b_0 conda-forge boost 1.78.0 py310h3e792ce_4 conda-forge boost-cpp 1.78.0 hf5ba120_3 conda-forge brotli 1.0.9 hb7f2c08_8 conda-forge brotli-bin 1.0.9 hb7f2c08_8 conda-forge bson 0.5.9 py_0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.19.1 h0dc2134_0 conda-forge c-blosc2 2.9.2 h0dcb076_0 conda-forge ca-certificates 2023.5.7 h8857fd0_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cachetools 5.3.0 pyhd8ed1ab_0 conda-forge cairo 1.16.0 h09dd18c_1016 conda-forge certifi 2023.5.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py310ha78151a_3 conda-forge charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge codecov 2.1.13 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge comm 0.1.3 pyhd8ed1ab_0 conda-forge contourpy 1.1.0 py310h88cfcbd_0 conda-forge coverage 7.2.7 py310h6729b98_0 conda-forge curl 8.1.2 hbee3ae8_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cython 0.29.35 py310h9e9d8ca_0 conda-forge debugpy 1.6.7 py310h7a76584_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge edgembar 0.2 pypi_0 pypi entrypoints 0.4 pyhd8ed1ab_0 conda-forge exceptiongroup 1.1.1 pyhd8ed1ab_0 conda-forge execnet 1.9.0 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge expat 2.5.0 hf0c8a7f_1 conda-forge fftw 3.3.10 nompi_h4fa670e_108 conda-forge flit-core 3.9.0 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.2 h5bb23bf_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.40.0 py310h6729b98_0 conda-forge freetype 2.12.1 h3f81eb7_1 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge gflags 2.2.2 hb1e8313_1004 conda-forge glog 0.6.0 h8ac2a54_0 conda-forge greenlet 2.0.2 py310h9e9d8ca_1 conda-forge gromacs 2023.1 nompi_h384dcaf_102 conda-forge h5py 3.8.0 nompi_py310h1de854f_101 conda-forge hdf4 4.2.15 h9804679_6 conda-forge hdf5 1.14.0 nompi_hbf0aa07_103 conda-forge icu 72.1 h7336db1_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.6.0 pyha770c72_0 conda-forge importlib_metadata 6.6.0 hd8ed1ab_0 conda-forge importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipykernel 6.23.1 pyh736e0ef_0 conda-forge ipython 8.14.0 pyhd1c38e8_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.7.5 pyhd8ed1ab_0 conda-forge jedi 0.18.2 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.2.0 pyhd8ed1ab_0 conda-forge jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge jupyter_client 8.2.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.1 py310h2ec42d9_0 conda-forge jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge jupyter_server 2.6.0 pyhd8ed1ab_0 conda-forge jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 1.1.4 pyhd8ed1ab_0 conda-forge khronos-opencl-icd-loader 2023.04.17 hb7f2c08_0 conda-forge kiwisolver 1.4.4 py310ha23aa8a_1 conda-forge krb5 1.20.1 h049b76e_0 conda-forge lcms2 2.15 h2dcdeff_1 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libabseil 20230125.2 cxx17_h000cb23_2 conda-forge libaec 1.0.6 hf0c8a7f_1 conda-forge libarrow 12.0.0 h3aa1ecd_8_cpu conda-forge libblas 3.9.0 17_osx64_openblas conda-forge libbrotlicommon 1.0.9 hb7f2c08_8 conda-forge libbrotlidec 1.0.9 hb7f2c08_8 conda-forge libbrotlienc 1.0.9 hb7f2c08_8 conda-forge libcblas 3.9.0 17_osx64_openblas conda-forge libcrc32c 1.1.2 he49afe7_0 conda-forge libcurl 8.1.2 hbee3ae8_0 conda-forge libcxx 16.0.6 hd57cbcb_0 conda-forge libdeflate 1.18 hac1461d_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libevent 2.1.12 ha90c15b_1 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 11_3_0_h97931a8_31 conda-forge libgfortran5 12.2.0 he409387_31 conda-forge libglib 2.76.3 hc62aa5d_0 conda-forge libgoogle-cloud 2.11.0 h20eaa6e_1 conda-forge libgrpc 1.54.2 hfaa49da_2 conda-forge libhwloc 2.9.1 nocuda_h6fa2af9_6 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libjpeg-turbo 2.1.5.1 hb7f2c08_0 conda-forge liblapack 3.9.0 17_osx64_openblas conda-forge libnetcdf 4.9.2 nompi_hf077d52_105 conda-forge libnghttp2 1.52.0 he2ab024_0 conda-forge libopenblas 0.3.23 openmp_h429af6e_0 conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libprotobuf 3.21.12 hbc0c0cd_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsqlite 3.42.0 h58db7d2_0 conda-forge libssh2 1.11.0 hd019ec5_0 conda-forge libthrift 0.18.1 h88b220a_2 conda-forge libtiff 4.5.1 hf955e92_0 conda-forge libutf8proc 2.8.0 hb7f2c08_0 conda-forge libwebp-base 1.3.0 hb7f2c08_0 conda-forge libxcb 1.15 hb7f2c08_0 conda-forge libxml2 2.11.4 hd95e348_0 conda-forge libxslt 1.1.37 h20bfa82_1 conda-forge libzip 1.9.2 h6db710c_1 conda-forge libzlib 1.2.13 h8a1eda9_5 conda-forge llvm-openmp 16.0.6 hff08bdf_0 conda-forge lxml 4.9.2 py310h479f746_1 conda-forge lz4-c 1.9.4 hf0c8a7f_0 conda-forge markupsafe 2.1.3 py310h6729b98_0 conda-forge matplotlib-base 3.7.1 py310he725631_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mdtraj 1.9.7 py310h1b5c016_4 conda-forge mistune 2.0.5 pyhd8ed1ab_0 conda-forge mmpbsa-py 16.0 pypi_0 pypi msgpack-python 1.0.5 py310ha23aa8a_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge nbclient 0.8.0 pyhd8ed1ab_0 conda-forge nbconvert 7.5.0 pyhd8ed1ab_0 conda-forge nbconvert-core 7.5.0 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.5.0 pyhd8ed1ab_0 conda-forge nbformat 5.9.0 pyhd8ed1ab_0 conda-forge nbval 0.9.6 pyh9f0ad1d_0 conda-forge ncurses 6.4 hf0c8a7f_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge netcdf-fortran 4.6.1 nompi_ha0a3666_100 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nglview 3.0.5 pyhe68d6a8_0 conda-forge notebook 6.5.4 pyha770c72_0 conda-forge notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge numexpr 2.8.4 py310hecf8f37_0 conda-forge numpy 1.25.0 py310h7451ae0_0 conda-forge ocl_icd_wrapper_apple 1.0.0 hbcb3906_0 conda-forge openeye-toolkits 2023.1.0 py310_0 openeye openff-amber-ff-ports 0.0.3 pyh6c4a22f_0 conda-forge openff-forcefields 2023.06.0 pyh1a96a4e_0 conda-forge openff-interchange 0.3.5 pyhd8ed1ab_0 conda-forge openff-interchange-base 0.3.5 pyhd8ed1ab_0 conda-forge openff-models 0.0.5 pyh1a96a4e_0 conda-forge openff-toolkit 0.13.1 pyhd8ed1ab_0 conda-forge openff-toolkit-base 0.13.1 pyhd8ed1ab_0 conda-forge openff-units 0.2.1 pyh1a96a4e_0 conda-forge openff-utilities 0.1.8 pyh1a96a4e_0 conda-forge openjpeg 2.5.0 h13ac156_2 conda-forge openmm 8.0.0 py310h16dc4a5_1_khronos conda-forge openmmforcefields 0.11.2 pyhd8ed1ab_1 conda-forge openssl 3.1.1 h8a1eda9_1 conda-forge orc 1.8.4 hec59b76_0 conda-forge overrides 7.3.1 pyhd8ed1ab_0 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge packmol 20.010 h508aa58_0 conda-forge packmol-memgen 2023.2.24 pypi_0 pypi pandas 2.0.2 py310h5e4fcda_0 conda-forge pandoc 3.1.3 h9d075a6_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge panedr 0.7.1 pyhd8ed1ab_0 conda-forge parmed 4.1.0 py310h7a76584_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pbr 5.11.1 pyhd8ed1ab_0 conda-forge pcre2 10.40 h1c4e4bc_0 conda-forge pdb4amber 22.0 pypi_0 pypi pdbfixer 1.9 pyh1a96a4e_0 conda-forge perl 5.32.1 2_h0d85af4_perl5 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.5.0 py310hd63a8c7_1 conda-forge pint 0.21 pyhd8ed1ab_0 conda-forge pip 23.1.2 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 3.5.3 pyhd8ed1ab_0 conda-forge plotly 5.15.0 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 pyhd8ed1ab_5 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge prometheus_client 0.17.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.38 pyha770c72_0 conda-forge prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge psutil 5.9.5 py310h90acd4f_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge py-cpuinfo 9.0.0 pyhd8ed1ab_0 conda-forge pyarrow 12.0.0 py310hf4a3e4a_8_cpu conda-forge pycairo 1.23.0 py310h8cdeff8_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pydantic 1.10.9 py310h6729b98_0 conda-forge pyedr 0.7.1 pyhd8ed1ab_0 conda-forge pygments 2.15.1 pyhd8ed1ab_0 conda-forge pymsmt 22.0 pypi_0 pypi pyobjc-core 9.2 py310hef2d279_0 conda-forge pyobjc-framework-cocoa 9.2 py310hef2d279_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyrsistent 0.19.3 py310h90acd4f_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytables 3.8.0 py310he6142c8_1 conda-forge pytest 7.3.2 pyhd8ed1ab_1 conda-forge pytest-cov 4.1.0 pyhd8ed1ab_0 conda-forge pytest-rerunfailures 11.1.2 pyhd8ed1ab_0 conda-forge pytest-xdist 3.3.1 pyhd8ed1ab_0 conda-forge python 3.10.11 he7542f4_0_cpython conda-forge python-constraint 1.4.0 py_0 conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.17.1 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.10 3_cp310 conda-forge pytraj 2.0.6 pypi_0 pypi pytz 2023.3 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py310h90acd4f_5 conda-forge pyzmq 25.1.0 py310h998be00_0 conda-forge qcelemental 0.25.1 pyhd8ed1ab_1 conda-forge qcengine 0.26.0 pyhd8ed1ab_0 conda-forge qcportal 0.15.8 pyhd8ed1ab_0 conda-forge rdkit 2023.03.1 py310h68cd598_0 conda-forge re2 2023.03.02 h096449b_0 conda-forge readline 8.2 h9e318b2_1 conda-forge reportlab 3.6.13 py310hea71a27_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge sander 22.0 pypi_0 pypi scipy 1.10.1 py310h3900cf1_3 conda-forge send2trash 1.8.2 pyhd1c38e8_0 conda-forge setuptools 67.7.2 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge smirnoff99frosst 1.1.0 pyh44b312d_0 conda-forge snakeviz 2.2.0 pyhd8ed1ab_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sqlalchemy 2.0.16 py310h6729b98_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge tenacity 8.2.2 pyhd8ed1ab_0 conda-forge terminado 0.17.1 pyhd1c38e8_0 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tinydb 4.8.0 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.3.2 py310h6729b98_0 conda-forge tqdm 4.65.0 pyhd8ed1ab_1 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.6.3 hd8ed1ab_0 conda-forge typing_extensions 4.6.3 pyha770c72_0 conda-forge typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge unicodedata2 15.0.0 py310h90acd4f_0 conda-forge urllib3 2.0.3 pyhd8ed1ab_0 conda-forge validators 0.20.0 pyhd8ed1ab_0 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.6.0 pyhd8ed1ab_0 conda-forge wheel 0.40.0 pyhd8ed1ab_0 conda-forge widgetsnbextension 3.6.4 pyhd8ed1ab_0 conda-forge xmltodict 0.13.0 pyhd8ed1ab_0 conda-forge xorg-kbproto 1.0.7 h35c211d_1002 conda-forge xorg-libice 1.0.10 h0d85af4_0 conda-forge xorg-libsm 1.2.3 h0d85af4_1000 conda-forge xorg-libx11 1.8.6 hbd0b022_0 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xorg-libxext 1.3.4 hb7f2c08_2 conda-forge xorg-libxt 1.3.0 h0dc2134_0 conda-forge xorg-xextproto 7.3.0 hb7f2c08_1003 conda-forge xorg-xproto 7.0.31 h35c211d_1007 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zipp 3.15.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h8a1eda9_5 conda-forge zlib-ng 2.0.7 hb7f2c08_0 conda-forge zstd 1.5.2 hbc0c0cd_6 conda-forge

mattwthompson commented 1 year ago

Your environment looks sufficiently up-to-date, so we can mostly rule that out. Please do share the SMILES you're using, and are you modifying the example in other ways?

8marmar8 commented 1 year ago

This is the SMILE of the molecule CC(C)n1cnc2c(NCCc3ccc(O)cc3)nc(nc12)-c1csc2ccccc12

You can find attached the pdb and the Jupiter notebook that I'm using, and the .gro and the .top files that I obtained.

files.zip

mattwthompson commented 1 year ago

Thanks for the files! The issue here is that your PDB file doesn't have box information and vacuum simulations aren't explicitly supported in recent versions of GROMACS.

A workaround is to set arbitrarily large box vectors. For example, if change the topology to be a 4 nm cube in the second cell (you can set this to any number you want, I figure ~4.5x the cutoff should be plenty):

md4 = Molecule.from_smiles("CC(C)n1cnc2c(NCCc3ccc(O)cc3)nc(nc12)-c1csc2ccccc12")

off_topology = Topology.from_pdb(
    "md4_ini_connects.pdb", unique_molecules=[md4],
)
off_topology.box_vectors = [4, 4, 4] * unit.nanometer

the last cell reports reasonable-looking agreement between the energies:

Bond Angle Torsion Electrostatics vdW RBTorsion
11.513458 136.431097 38.61051 -962.724721 65.934695 NaN
11.513531 136.431035 38.61037 -962.692794 68.533083 NaN
11.513349 136.430695 38.61054 -962.829836 65.952589 0.0

We'll look at how to better report this behavior and make the error message more useful

8marmar8 commented 1 year ago

Can I ask you if you can share the entire Jupiter notebook form from which you obtained those results?

If I modify my Jupiter notebook with your suggestions, I obtain always the same previous error.

Thank you so much,

Maria

mattwthompson commented 1 year ago

Sure - here's the notebook after just a couple of modifications from the one you uploaded: https://gist.github.com/mattwthompson/938bc8562f33d250f2fa9dacfc573f6b

It's assumed this is run within the folder you zipped up so that it has access to that PDB file

mattwthompson commented 1 year ago

The gist seems to be working, and I've also included some of these changes in #1648