choderalab / yank

An open, extensible Python framework for GPU-accelerated alchemical free energy calculations.
http://getyank.org
MIT License
177 stars 70 forks source link

Use Open Force Field parameters for ligands #1211

Open daveminh opened 4 years ago

daveminh commented 4 years ago

There is no clear way to use Open Force Field parameters for ligands, as the YAML input takes in mol2 and leaprc.gaff. Maybe if the ligands could be set up from prmtop and inpcrd files then it would be possible. They would just need to be exported from the Open Force Field toolkit.

daveminh commented 4 years ago

Looking at pipeline.py (https://github.com/choderalab/yank/blob/972753ad0f1e3b3b332e2a2b10a7ff6808f0474d/Yank/pipeline.py#L1074) it looks like if I have the correct names for the prmtop and inpcrd files then YANK will bypass its own setup.

andrrizzi commented 4 years ago

That's correct. You can bypass the automatic setup pipeline and provide your own system files that you can prepare independently with the openforcefield toolkit. See here for the syntax: http://getyank.org/latest/yamlpages/systems.html#arbitrary-phase-free-energies-setup-by-user.

jchodera commented 4 years ago

It should be relatively straightforward to add a simple additional step to the pipeline to re-assign parameters to the whole system using the openmmforcefields SystemGenerator. I'll make a plan to add this.

daveminh commented 4 years ago

Even if the new force fields are not much more accurate than GAFF, they have more chemical space coverage. I was trying to set up some calculations of several known inhibitors of 3cl-protease from COVID-19 to demonstrate for my class. I couldn't set up most of them with antechamber. However, I was able to build them with the open force field toolkit and add solvent with the modeller module in OpenMM.. Then I ran them with OpenMM for 5 ns. Except for one of five systems, both the ligand in solvent and in the complex run and seem to equilibrate.

However I'm having trouble running them in YANK, as it says "Potential energy is NaN after 0 attempts of integration with move LangevinSplittingDynamicsMove Attempting a restart...". This happens whether I minimize or not. It happened before I tried to equilibrate.

This is my attempt at the YAML script that directly loads AMBER inpcrd and prmtop files. Is there something wrong with it?

daveminh commented 4 years ago

I ran it again with the same problem but let the error logs complete.

jchodera commented 4 years ago

@daveminh : Can you post a tarball of some input files you would like to use through the normal YANK pipeline? If you configure them with GAFF now, I can quickly add a pipeline stage that reassigns parameters with the openforcefield force field.

To work, the systems would need to successfully parameterize with GAFF first. We'd simply add a second step that replaces the parameters with openff + OpenMM force fields after that.

daveminh commented 4 years ago

Some of the systems failed with GAFF. But I can try to get one of them working...

jchodera commented 4 years ago

Hm. Can you give some examples that fail? Maybe we can come up with a pipeline that works around this.

jchodera commented 4 years ago

Here's Figure 3 from the Jin et al. paper: image I don't think openff can cover Ebselen (which has a selenium), but I think we can cover the rest.

I'll look into what's going on with the files you've already created!

daveminh commented 4 years ago

Yeah, I’m working on the failures. I was trying to make a pipeline around it by building the inpcrd and prmtop files directly.

On Mar 23, 2020, at 9:09 PM, John Chodera notifications@github.com wrote:

Hm. Can you give some examples that fail? Maybe we can come up with a pipeline that works around this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/choderalab/yank/issues/1211#issuecomment-602965556, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQDIOAZY3SEM3F4TGMYG33RJAI4JANCNFSM4LQATVLA.

jchodera commented 4 years ago

The log link you posted doesn't seem to resolve.

jchodera commented 4 years ago

The YAML file looks good to me. Trying to run locally.

daveminh commented 4 years ago

Just tried it and it works for me. Try again? https://github.com/daveminh/Chem456/tree/master/static_files/tutorials/3cl-pro/YANK/output/ZINC000001714738/experiments/nan-error-logs https://github.com/daveminh/Chem456/tree/master/static_files/tutorials/3cl-pro/YANK/output/ZINC000001714738/experiments/nan-error-logs

On Mar 23, 2020, at 9:15 PM, John Chodera notifications@github.com wrote:

The log link https://github.com/daveminh/Chem456/tree/master/static_files/tutorials/3cl-pro/YANK/output/ZINC000001714738/experiments/nan-error-logs you posted doesn't seem to resolve.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/choderalab/yank/issues/1211#issuecomment-602967409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQDIOFMY6RQTW7UOY7JAD3RJAJT5ANCNFSM4LQATVLA.

jchodera commented 4 years ago

Do you have the prmtop files in one of your branches? I checked out master, but only see .chk and .inpcrd files in complexes/1-equilibrate.

In general, the checkpoint files should only be used for temporary checkpointing since they are not platform-portable. state.xml files (especially gzipped ones) will be portable, or you can use other formats that have box vectors too.

daveminh commented 4 years ago

The prmtop are in ../0-build/

On Mar 23, 2020, at 9:46 PM, John Chodera notifications@github.com wrote:

Do you have the prmtop files in one of your branches? I checked out master, but only see .chk and .inpcrd files in complexes/1-equilibrate.

In general, the checkpoint files should only be used for temporary checkpointing since they are not platform-portable. state.xml files (especially gzipped ones) will be portable, or you can use other formats that have box vectors too.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/choderalab/yank/issues/1211#issuecomment-602978354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQDIODUUFCAD64VGGORP6LRJANIFANCNFSM4LQATVLA.

daveminh commented 4 years ago

The paper also identifies cinanserin as a weaker binder. That’s helpful for testing dynamic range since the dataset would have three orders of magnitude.

On Mar 23, 2020, at 9:14 PM, John Chodera notifications@github.com wrote:

Here's Figure 3 from the Jin et al. paper https://www.biorxiv.org/content/10.1101/2020.02.26.964882v2: https://user-images.githubusercontent.com/3656088/77381119-49afa500-6d3a-11ea-8cdd-1071373f4a31.png I don't think openff can cover Ebselen (which has a selenium), but I think we can cover the rest.

I'll look into what's going on with the files you've already created!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/choderalab/yank/issues/1211#issuecomment-602967152, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQDIOCECP7FVGWXDEVEP7TRJAJQ7ANCNFSM4LQATVLA.

daveminh commented 4 years ago

GAFF setup seems to work for ZINC000001714738, ZINC000002015152, and ZINC000003951740. Antechamber complains about carbon valences in Tideglusib (ZINC000013985228) and Carmofur (ZINC000001542916).

daveminh commented 4 years ago

This is a YAML that doesn't work with antechamber.

jchodera commented 4 years ago

I seem to be able to get MPro_ZINC000001714738.yaml to run. Is this one of the examples that NaNs?

Are you using OpenMM 7.4.1? Can you paste your conda list environment?

Finally, I was trying to access your experiments.log, but that file doesn't seem to exist.

daveminh commented 4 years ago

Okay I've organized the files a bit more clearly. I am trying two ways to set up the systems.

1) The first is with the Open Force Field Toolkit. This was successful in setting up the system (5/5) and running OpenMM for 5 ns (4/5). However this one is giving NaN errors in YANK for ZINC000001714738, ZINC000002015152, and ZINC000013985228. However, ZINC000003951740 seems to run fine.

2) The second is with GAFF. This is what you suggested could be a way to start setup in new force fields. It was successful in setting up (2/5) of systems. For ZINC000013985228 and ZINC000001542916, antechamber complains. One system is still being set up. The other two systems seem to run fine.

I set up miniconda3 + yank and did conda update --all today and ran these on my group's cluster. This is conda list:

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_llvm conda-forge alabaster 0.7.12 py_0 conda-forge amberlite 16.0 pypi_0 pypi ambertools 17.0 pypi_0 pypi attrs 19.3.0 py_0 conda-forge babel 2.8.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge bleach 3.1.3 pyh8c360ce_0 conda-forge blosc 1.17.1 he1b5a44_0 conda-forge boost-cpp 1.72.0 h8e57a91_0 conda-forge bzip2 1.0.8 h516909a_2 conda-forge ca-certificates 2019.11.28 hecc5488_0 conda-forge cerberus 1.3.2 py_0 conda-forge certifi 2019.11.28 py37hc8dfbb8_1 conda-forge cffi 1.14.0 py37hd463f26_0 conda-forge cftime 1.1.1.2 py37h03ebfcd_0 conda-forge chardet 3.0.4 py37hc8dfbb8_1006 conda-forge clusterutils 0.3.1 py37_1 omnia cryptography 2.8 py37hb09aad4_2 conda-forge curl 7.68.0 hf8cf82a_0 conda-forge cycler 0.10.0 py_2 conda-forge cython 0.29.16 py37h3340039_0 conda-forge dbus 1.13.6 he372182_0 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.6.0 py_0 conda-forge docopt 0.6.2 py_1 conda-forge docutils 0.16 py37hc8dfbb8_1 conda-forge entrypoints 0.3 py37hc8dfbb8_1001 conda-forge expat 2.2.9 he1b5a44_2 conda-forge fftw 3.3.8 nompi_h7f3a6c3_1110 conda-forge fftw3f 3.3.4 2 omnia fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.1 he06d7ca_0 conda-forge gettext 0.19.8.1 hc5be6a0_1002 conda-forge glib 2.58.3 py37he00f558_1003 conda-forge gst-plugins-base 1.14.5 h0935bb2_2 conda-forge gstreamer 1.14.5 h36ae1b5_2 conda-forge hdf4 4.2.13 hf30be14_1003 conda-forge hdf5 1.10.5 nompi_h3c11f04_1104 conda-forge icu 64.2 he1b5a44_1 conda-forge idna 2.9 py_1 conda-forge imagesize 1.2.0 py_0 conda-forge importlib-metadata 1.5.0 py37hc8dfbb8_1 conda-forge importlib_metadata 1.5.0 1 conda-forge ipykernel 5.2.0 py37h43977f1_0 conda-forge ipython 7.13.0 py37hc8dfbb8_2 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.5.1 py_0 conda-forge jedi 0.16.0 py37hc8dfbb8_1 conda-forge jinja2 2.11.1 py_0 conda-forge jpeg 9c h14c3975_1001 conda-forge jsonschema 3.2.0 py37hc8dfbb8_1 conda-forge jupyter 1.0.0 py_2 conda-forge jupyter_client 6.1.0 py_0 conda-forge jupyter_console 6.1.0 py_1 conda-forge jupyter_core 4.6.3 py37hc8dfbb8_1 conda-forge kiwisolver 1.1.0 py37h99015e2_1 conda-forge krb5 1.16.4 h2fd8d38_0 conda-forge latexcodec 2.0.0 py_0 conda-forge ld_impl_linux-64 2.34 h53a641e_0 conda-forge libblas 3.8.0 16_openblas conda-forge libcblas 3.8.0 16_openblas conda-forge libclang 9.0.1 default_hde54327_0 conda-forge libcurl 7.68.0 hda55be3_0 conda-forge libedit 3.1.20170329 hf8c457e_1001 conda-forge libffi 3.2.1 he1b5a44_1007 conda-forge libgcc-ng 9.2.0 h24d8f2e_2 conda-forge libgfortran-ng 7.3.0 hdf63c60_5 conda-forge libgomp 9.2.0 h24d8f2e_2 conda-forge libiconv 1.15 h516909a_1006 conda-forge liblapack 3.8.0 16_openblas conda-forge libllvm9 9.0.1 hc9558a2_0 conda-forge libnetcdf 4.7.3 nompi_h9f9fd6a_101 conda-forge libopenblas 0.3.9 h5ec1e0e_0 conda-forge libpng 1.6.37 hed695b0_1 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 libuuid 2.32.1 h14c3975_1000 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxkbcommon 0.10.0 he1b5a44_0 conda-forge libxml2 2.9.10 hee79883_0 conda-forge llvm-openmp 9.0.1 hc9558a2_2 conda-forge lzo 2.10 h14c3975_1000 conda-forge markupsafe 1.1.1 py37h8f50634_1 conda-forge matplotlib 3.2.1 0 conda-forge matplotlib-base 3.2.1 py37h30547a4_0 conda-forge mdtraj 1.9.3 py37h00575c5_0 conda-forge mistune 0.8.4 py37h516909a_1000 conda-forge mmpbsa-py 16.0 pypi_0 pypi mock 3.0.5 py37hc8dfbb8_1 conda-forge mpi 1.0 mpich conda-forge mpich 3.3.2 hc856adb_0 conda-forge mpiplus v0.0.1 py37_1000 conda-forge nbconvert 5.6.1 py37_0 conda-forge nbformat 5.0.4 py_0 conda-forge ncurses 6.1 hf484d3e_1002 conda-forge netcdf-fortran 4.5.2 nompi_h09cde99_103 conda-forge netcdf4 1.5.3 nompi_py37hd35fb8e_102 conda-forge notebook 6.0.3 py37_0 conda-forge nspr 4.25 he1b5a44_0 conda-forge nss 3.47 he751ad9_0 conda-forge numexpr 2.7.1 py37h0da4684_1 conda-forge numpy 1.18.1 py37h8960a57_1 conda-forge numpydoc 0.9.2 py_0 conda-forge openmm 7.4.1 py37_cuda101_rc_1 omnia openmmtools 0.19.0 py37_1 omnia openmoltools 0.8.6 py37_0 omnia openssl 1.1.1e h516909a_0 conda-forge oset 0.1.3 py_1 conda-forge packaging 20.1 py_0 conda-forge pandas 1.0.3 py37h0da4684_0 conda-forge pandoc 2.9.2 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parmed 3.2.0 pypi_0 pypi parso 0.6.2 py_0 conda-forge pcre 8.44 he1b5a44_0 conda-forge pdb4amber 1.7.dev0 pypi_0 pypi pdbfixer 1.6 py37_0 omnia perl 5.26.2 h516909a_1006 conda-forge pexpect 4.8.0 py37hc8dfbb8_1 conda-forge pickleshare 0.7.5 py37hc8dfbb8_1001 conda-forge pip 20.0.2 py_2 conda-forge prometheus_client 0.7.1 py_0 conda-forge prompt-toolkit 3.0.4 py_0 conda-forge prompt_toolkit 3.0.4 0 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge ptyprocess 0.6.0 py_1001 conda-forge pybtex 0.22.2 py37hc8dfbb8_1 conda-forge pybtex-docutils 0.2.2 py37hc8dfbb8_1 conda-forge pycparser 2.20 py_0 conda-forge pygments 2.6.1 py_0 conda-forge pymbar 3.0.5 py37hc1659b7_0 conda-forge pyopenssl 19.1.0 py_1 conda-forge pyparsing 2.4.6 py_0 conda-forge pyqt 5.12.3 py37hcca6a23_1 conda-forge pyqt5-sip 4.19.18 pypi_0 pypi pyqtwebengine 5.12.1 pypi_0 pypi pyrsistent 0.16.0 py37h8f50634_0 conda-forge pysocks 1.7.1 py37hc8dfbb8_1 conda-forge pytables 3.6.1 py37h9f153d1_1 conda-forge python 3.7.6 h8356626_5_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python_abi 3.7 1_cp37m conda-forge pytraj 2.0.5 pypi_0 pypi pytz 2019.3 py_0 conda-forge pyyaml 5.3.1 py37h8f50634_0 conda-forge pyzmq 19.0.0 py37hac76be4_1 conda-forge qt 5.12.5 hd8c4c69_1 conda-forge qtconsole 4.7.1 py_0 conda-forge qtpy 1.9.0 py_0 conda-forge readline 8.0 hf8c457e_0 conda-forge requests 2.23.0 pyh8c360ce_2 conda-forge sander 16.0 pypi_0 pypi scipy 1.4.1 py37h921218d_0 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 46.1.1 py37hc8dfbb8_0 conda-forge six 1.14.0 py_1 conda-forge snowballstemmer 2.0.0 py_0 conda-forge sphinx 2.4.4 py_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-bibtex 1.0.0 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 1.0.3 py_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.4 py_0 conda-forge sqlite 3.30.1 hcee41ef_0 conda-forge terminado 0.8.3 py37hc8dfbb8_1 conda-forge testpath 0.4.4 py_0 conda-forge tk 8.6.10 hed695b0_0 conda-forge tornado 6.0.4 py37h8f50634_1 conda-forge traitlets 4.3.3 py37hc8dfbb8_1 conda-forge urllib3 1.25.7 py37hc8dfbb8_1 conda-forge wcwidth 0.1.8 py_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.34.2 py_1 conda-forge widgetsnbextension 3.5.1 py37_0 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-libxt 1.2.0 h516909a_0 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h516909a_1002 conda-forge yaml 0.2.2 h516909a_1 conda-forge yank 0.25.2 py37_1 omnia zeromq 4.3.2 he1b5a44_2 conda-forge zipp 3.1.0 py_0 conda-forge zlib 1.2.11 h516909a_1006 conda-forge