├── .conda_create_env └── environment.yml ├── .gitignore ├── .readthedocs.yml ├── LICENSE ├── README.rst ├── docs ├── conf.py ├── index.rst ├── make.bat └── source │ ├── CHANGELOG.md │ ├── _static │ ├── BindFlow-logo-full.svg │ ├── BindFlow-logo.svg │ ├── custom.css │ ├── custom.js │ └── parts.png │ ├── about-us.md │ ├── api-reference.md │ ├── citations.md │ ├── env │ ├── backup │ │ ├── environment-linux.yml │ │ └── environment-macos.yml │ ├── latest │ │ ├── environment-linux.yml │ │ └── environment-macos.yml │ └── relaxed │ │ └── environment.yml │ ├── faq.md │ ├── guides │ ├── customizing.md │ ├── debugging.md │ ├── deploy.md │ ├── force-fields.md │ ├── index.md │ └── performance │ │ ├── fep-mmxbsa-avg-time-per-lig.svg │ │ ├── fep-mmxbsa-cluster-bench.svg │ │ ├── fep-mmxbsa-simu-size.svg │ │ ├── index.md │ │ └── scripts │ │ ├── README.md │ │ ├── dag-performance.ipynb │ │ ├── dag_perf_utility.py │ │ ├── data │ │ ├── elwe.csv │ │ ├── simu-size-fep.csv │ │ ├── simu-size-mmpbsa.csv │ │ └── smaug.csv │ │ └── fep-mmxbsa-cluster-bench.ipynb │ ├── installation.md │ ├── modules │ ├── data.md │ ├── flow_builder.md │ ├── generate_scheduler.md │ ├── mdp.md │ ├── runners.md │ ├── solvent.md │ ├── system_builder.md │ └── utils.md │ ├── notebooks │ └── mmpbsa.ipynb │ └── tutorials.md ├── examples ├── A2A │ ├── README.md │ ├── config-fep.yml │ ├── config-mmpbsa.yml │ ├── executor-fep.py │ ├── executor-mmpbsa.py │ ├── inputs │ │ ├── cofactor.gro │ │ ├── cofactor.top │ │ ├── membrane.pdb │ │ ├── protein-amber14-all │ │ │ ├── protein.gro │ │ │ └── protein.top │ │ └── sdf_split │ │ │ ├── 4g.mol │ │ │ ├── 4h.mol │ │ │ ├── 4i.mol │ │ │ ├── 4j.mol │ │ │ ├── 4k.mol │ │ │ ├── 4l.mol │ │ │ ├── 4m.mol │ │ │ ├── 4n.mol │ │ │ ├── 4q.mol │ │ │ └── 4r.mol │ └── make_ndx.py ├── CyclophilinD │ ├── config-fep.yml │ ├── config-mmpbsa.yml │ ├── executor-fep.py │ ├── executor-mmpbsa.py │ └── inputs │ │ ├── ligands │ │ ├── ligand-14.sdf │ │ ├── ligand-16.sdf │ │ ├── ligand-2.sdf │ │ ├── ligand-27.sdf │ │ ├── ligand-3.sdf │ │ ├── ligand-39.sdf │ │ ├── ligand-4.sdf │ │ ├── ligand-40.sdf │ │ ├── ligand-7.sdf │ │ └── ligand-8.sdf │ │ └── receptor_protein.pdb ├── README.md ├── SAMPL6-OA │ ├── config-fep.yml │ ├── config-mmpbsa.yml │ ├── executor-fep.py │ ├── executor-mmpbsa.py │ └── inputs │ │ ├── guests │ │ ├── OA-G0.sdf │ │ ├── OA-G1.sdf │ │ ├── OA-G2.sdf │ │ ├── OA-G3.sdf │ │ ├── OA-G4.sdf │ │ ├── OA-G5.sdf │ │ └── OA-G6.sdf │ │ └── host │ │ ├── OA.sdf │ │ └── espaloma-0.3.1 │ │ ├── OA.gro │ │ └── OA.top └── configs │ ├── amber │ ├── membrane │ │ ├── config-fep.yml │ │ └── config-mmpbsa.yml │ └── soluble │ │ ├── config-fep.yml │ │ └── config-mmpbsa.yml │ ├── charmm │ └── soluble │ │ └── config-fep.yml │ └── config-general-view.yml ├── github └── workflows │ ├── codeql-analysis.yml │ └── tests.yml ├── pyproject.toml ├── requirements_docs.txt ├── src └── bindflow │ ├── __init__.py │ ├── _gmx_check.py │ ├── cli.py │ ├── data │ ├── ci_systems │ │ ├── WP6.tar.gz │ │ ├── config-fep.yml │ │ └── config-mmpbsa.yml │ ├── gmx_ff │ │ ├── Slipids_2020.ff.tar.gz │ │ └── amber99sb-star-ildn.ff.tar.gz │ └── gmx_water_models │ │ ├── README.md │ │ ├── amber │ │ ├── ffnonbonded.itp │ │ ├── ions.itp │ │ ├── spc.itp │ │ ├── spce.itp │ │ ├── tip3p.itp │ │ ├── tip4p.itp │ │ ├── tip4pew.itp │ │ ├── tip5p.itp │ │ └── watermodels.dat │ │ ├── charmm │ │ ├── ffnonbonded.itp │ │ ├── ions.itp │ │ ├── spc.itp │ │ ├── spce.itp │ │ ├── tip3p.itp │ │ ├── tip4p.itp │ │ ├── tip5p.itp │ │ ├── tips3p.itp │ │ └── watermodels.dat │ │ ├── configurations │ │ ├── spc216.gro │ │ ├── tip4p.gro │ │ └── tip5p.gro │ │ ├── oplsaa │ │ ├── ffnonbonded.itp │ │ ├── ions.itp │ │ ├── spc.itp │ │ ├── spce.itp │ │ ├── tip3p.itp │ │ ├── tip4p.itp │ │ ├── tip4pew.itp │ │ ├── tip5p.itp │ │ ├── tip5pe.itp │ │ └── watermodels.dat │ │ └── water_models.yml │ ├── free_energy │ ├── __init__.py │ ├── fep_analysis.py │ ├── gather_results.py │ └── mmxbsa_analysis.py │ ├── home.py │ ├── mdp │ ├── __init__.py │ ├── _path_handler.py │ ├── mdp.py │ └── templates │ │ ├── __init__.py │ │ ├── complex │ │ ├── membrane │ │ │ ├── equi │ │ │ │ ├── 00_min.mdp │ │ │ │ ├── 01_nvt.mdp │ │ │ │ ├── 02_nvt.mdp │ │ │ │ ├── 03_npt.mdp │ │ │ │ ├── 04_npt.mdp │ │ │ │ ├── 05_npt.mdp │ │ │ │ ├── 06_npt.mdp │ │ │ │ └── prod.mdp │ │ │ ├── fep │ │ │ │ ├── bonded │ │ │ │ │ ├── 00_min.mdp │ │ │ │ │ ├── 01_nvt.mdp │ │ │ │ │ ├── 02_npt.mdp │ │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ │ └── prod.mdp │ │ │ │ ├── coul │ │ │ │ │ ├── 00_min.mdp │ │ │ │ │ ├── 01_nvt.mdp │ │ │ │ │ ├── 02_npt.mdp │ │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ │ └── prod.mdp │ │ │ │ └── vdw │ │ │ │ │ ├── 00_min.mdp │ │ │ │ │ ├── 01_nvt.mdp │ │ │ │ │ ├── 02_npt.mdp │ │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ │ └── prod.mdp │ │ │ └── mmpbsa │ │ │ │ └── prod.mdp │ │ └── soluble │ │ │ ├── equi │ │ │ ├── 00_min.mdp │ │ │ ├── 01_nvt.mdp │ │ │ ├── 02_nvt.mdp │ │ │ ├── 03_npt.mdp │ │ │ ├── 04_npt.mdp │ │ │ └── prod.mdp │ │ │ ├── fep │ │ │ ├── bonded │ │ │ │ ├── 00_min.mdp │ │ │ │ ├── 01_nvt.mdp │ │ │ │ ├── 02_npt.mdp │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ └── prod.mdp │ │ │ ├── coul │ │ │ │ ├── 00_min.mdp │ │ │ │ ├── 01_nvt.mdp │ │ │ │ ├── 02_npt.mdp │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ └── prod.mdp │ │ │ └── vdw │ │ │ │ ├── 00_min.mdp │ │ │ │ ├── 01_nvt.mdp │ │ │ │ ├── 02_npt.mdp │ │ │ │ ├── 03_npt_norest.mdp │ │ │ │ └── prod.mdp │ │ │ └── mmpbsa │ │ │ └── prod.mdp │ │ └── ligand │ │ ├── equi │ │ ├── 00_min.mdp │ │ ├── 01_nvt.mdp │ │ ├── 02_nvt.mdp │ │ ├── 03_npt.mdp │ │ └── prod.mdp │ │ └── fep │ │ ├── coul │ │ ├── 00_min.mdp │ │ ├── 01_nvt.mdp │ │ ├── 02_npt.mdp │ │ ├── 03_npt_norest.mdp │ │ └── prod.mdp │ │ └── vdw │ │ ├── 00_min.mdp │ │ ├── 01_nvt.mdp │ │ ├── 02_npt.mdp │ │ ├── 03_npt_norest.mdp │ │ └── prod.mdp │ ├── mmpbsa_in │ ├── __init__.py │ ├── input_loader.py │ └── templates │ │ ├── gb.in │ │ ├── pb.in │ │ └── pb_gb.in │ ├── orchestration │ ├── __init__.py │ ├── flow_builder.py │ └── generate_scheduler.py │ ├── preparation │ ├── __init__.py │ ├── boresch.py │ ├── solvent.py │ └── system_builder.py │ ├── rules │ ├── __init__.py │ ├── equi │ │ ├── Snakefile │ │ ├── boresch.smk │ │ ├── complex │ │ │ ├── membrane │ │ │ │ ├── setup.smk │ │ │ │ └── simulation.smk │ │ │ └── soluble │ │ │ │ ├── setup.smk │ │ │ │ └── simulation.smk │ │ └── ligand │ │ │ ├── setup.smk │ │ │ └── simulation.smk │ ├── fep │ │ ├── Snakefile │ │ ├── calculate_result.smk │ │ ├── complex │ │ │ ├── ana.smk │ │ │ ├── membrane │ │ │ │ ├── setup.smk │ │ │ │ └── simulation.smk │ │ │ └── soluble │ │ │ │ ├── setup.smk │ │ │ │ └── simulation.smk │ │ ├── gather_receptor_results.smk │ │ └── ligand │ │ │ ├── ana.smk │ │ │ ├── setup.smk │ │ │ └── simulation.smk │ ├── mmpbsa │ │ ├── Snakefile │ │ ├── ana.smk │ │ ├── gather_receptor_results.smk │ │ ├── setup.smk │ │ └── simulation.smk │ └── super_flow │ │ ├── Snakefile │ │ └── build_ligand_systems.smk │ ├── runners.py │ └── utils │ ├── cluster.py │ └── tools.py └── tests ├── test_fep.py ├── test_mmpbsa.py └── test_small.py /.conda_create_env/environment.yml: -------------------------------------------------------------------------------- 1 | name: bindflow 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python==3.9.* 6 | - pip 7 | - conda-build 8 | - ipykernel 9 | - ipython 10 | - ipywidgets 11 | - pip: 12 | - numpy<2 13 | - scipy 14 | - myst-nb 15 | - myst-parser 16 | - sphinx_book_theme 17 | - sphinx==7.2.6 18 | - sphinx_design 19 | - sphinxcontrib-katex 20 | - sphinxcontrib-mermaid 21 | - sphinx-inline-tabs 22 | - sphinx_copybutton 23 | - roman -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #python gedoens 2 | __pycache__ 3 | *.pyc 4 | .idea 5 | jupyter_execute 6 | 7 | #snake fun 8 | .snakemake 9 | Snakemake 10 | 11 | data/* 12 | /examples/CyclophilinD_data/fep/ 13 | /examples/internal_example 14 | /examples/2VT4/extra 15 | /examples/2VT4/fep 16 | /examples/4HW3/mmpbsa 17 | 18 | public 19 | 20 | # Interanl modules 21 | src/bindflow/utils/my_pdb.py 22 | src/bindflow/_version.py 23 | 24 | .pytest_cache 25 | .vscode 26 | 27 | *.egg-info 28 | build 29 | dist 30 | 31 | .DS_Store 32 | 33 | ideas 34 | 35 | *.test* 36 | *.dfpkl 37 | 38 | #Ignore vscode AI rules 39 | .github/instructions/codacy.instructions.md 40 | .codacy 41 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | formats: 3 | - htmlzip 4 | - epub 5 | build: 6 | os: ubuntu-20.04 7 | tools: 8 | python: mambaforge-4.10 9 | sphinx: 10 | configuration: docs/conf.py 11 | python: 12 | install: 13 | - method: pip 14 | path: . 15 | conda: 16 | environment: .conda_create_env/environment.yml -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. BindFlow documentation master file, created by 2 | sphinx-quickstart on Sun Jul 10 13:47:23 2022. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to BindFlow's documentation! 7 | ==================================== 8 | .. include:: ../README.rst 9 | 10 | Index 11 | ----- 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | source/installation 17 | source/citations 18 | source/about-us 19 | source/tutorials 20 | 21 | 22 | .. toctree:: 23 | :maxdepth: 2 24 | 25 | source/guides/index 26 | 27 | .. toctree:: 28 | :caption: 📖 Reference 29 | :maxdepth: 1 30 | 31 | source/CHANGELOG 32 | source/api-reference 33 | source/faq 34 | 35 | 36 | Indices and tables 37 | ================== 38 | 39 | * :ref:`genindex` 40 | * :ref:`modindex` 41 | * :ref:`search` 42 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd -------------------------------------------------------------------------------- /docs/source/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 🗒️ Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -------------------------------------------------------------------------------- /docs/source/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* === Base Styles === */ 2 | #installer-config { 3 | font-family: system-ui, sans-serif; 4 | margin: 1em 0; 5 | } 6 | 7 | #installer-config button { 8 | margin: 4px; 9 | padding: 6px 14px; 10 | border-radius: 6px; 11 | cursor: pointer; 12 | border: 1px solid; 13 | transition: background 0.2s, color 0.2s; 14 | } 15 | 16 | #installer-config pre { 17 | padding: 12px; 18 | border-radius: 8px; 19 | overflow-x: auto; 20 | font-size: 0.9em; 21 | } 22 | 23 | #download-env { 24 | margin-top: 8px; 25 | padding: 6px 12px; 26 | border-radius: 6px; 27 | background: #2b6cb0; 28 | color: white; 29 | text-decoration: none; 30 | } 31 | #download-env:hover { 32 | background: #2c5282; 33 | } 34 | 35 | /* === Light Mode === */ 36 | html[data-theme="light"] #installer-config button { 37 | background: #edf2f7; 38 | border-color: #cbd5e0; 39 | color: #1a202c; 40 | } 41 | 42 | html[data-theme="light"] #installer-config button:hover { 43 | background: #e2e8f0; 44 | } 45 | 46 | html[data-theme="light"] #installer-config button.active { 47 | background: #2b6cb0; 48 | border-color: #2b6cb0; 49 | color: white; 50 | } 51 | 52 | /* === Dark Mode === */ 53 | html[data-theme="dark"] #installer-config button { 54 | background: #2d3748; 55 | border-color: #4a5568; 56 | color: #e2e8f0; 57 | } 58 | 59 | html[data-theme="dark"] #installer-config button:hover { 60 | background: #4a5568; 61 | } 62 | 63 | html[data-theme="dark"] #installer-config button.active { 64 | background: #63b3ed; 65 | border-color: #63b3ed; 66 | color: #1a202c; 67 | } -------------------------------------------------------------------------------- /docs/source/_static/parts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/docs/source/_static/parts.png -------------------------------------------------------------------------------- /docs/source/about-us.md: -------------------------------------------------------------------------------- 1 | # 😊 About Us 2 | 3 | ## Project Origins 4 | 5 | This project began during my Ph.D. studies at [Jochen Hub's Computational Biophysics Group](https://biophys.uni-saarland.de/) at [Saarland University](https://www.uni-saarland.de/en/home.html). It was carried out within the framework of the ITN (Innovative Training Network) [PROTON](https://cordis.europa.eu/project/id/860592). If you are interested in getting in touch or learning more about my work, please visit my [Portfolio](https://alejandro.netlify.app). 6 | 7 | We would like to acknowledge the project [ABFE_Workflow](https://github.com/bigginlab/ABFE_workflow), which was the starting point of the development of BindFlow. 8 | 9 | ```{important} 10 | This project received funding from [Marie Skłodowska-Curie Actions](https://cordis.europa.eu/project/id/860592). 11 | ``` 12 | 13 | [![parts](_static/parts.png)](https://www.uni-saarland.de/en/home.html) -------------------------------------------------------------------------------- /docs/source/api-reference.md: -------------------------------------------------------------------------------- 1 | # 🛠️ API Reference 2 | 3 | ```{toctree} 4 | :maxdepth: 2 5 | :glob: 6 | 7 | modules/* 8 | ``` 9 | -------------------------------------------------------------------------------- /docs/source/citations.md: -------------------------------------------------------------------------------- 1 | # 🖋️ Citation 2 | 3 | If you use BindFlow in your research, please cite the following paper: 4 | 5 | ```bibtex 6 | @article {leon2025bindflow, 7 | author = {Mart{\'i}nez Le{\'o}n, Alejandro and Andersen, Lucas and Hub, Jochen S}, 8 | title = {BindFlow: a free, user-friendly pipeline for absolute binding free energy calculations using free energy perturbation or MM(PB/GB)SA}, 9 | elocation-id = {2025.09.25.678545}, 10 | year = {2025}, 11 | doi = {10.1101/2025.09.25.678545}, 12 | publisher = {Cold Spring Harbor Laboratory}, 13 | URL = {https://www.biorxiv.org/content/early/2025/09/27/2025.09.25.678545}, 14 | eprint = {https://www.biorxiv.org/content/early/2025/09/27/2025.09.25.678545.full.pdf}, 15 | journal = {bioRxiv} 16 | } 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/source/env/backup/environment-linux.yml: -------------------------------------------------------------------------------- 1 | name: BindFlow 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.10.14 6 | - pip 7 | - bioconda::snakemake=7.32.2 8 | - ambertools=22.5 9 | - openmm=8.0.0 10 | - openmmforcefields=0.11.2 11 | - pdbfixer=1.9 12 | - openff-toolkit=0.14.2 13 | - espaloma=0.3.1 14 | - dglteam::dgl=0.9.1post1 15 | - pyyaml=6.0 16 | - parmed=4.1.0 17 | - pandas=2.0.3 18 | - numpy=1.22.4 19 | - mpi4py=3.1.5 20 | - pip: 21 | - alchemlyb==2.0.0 22 | - mdanalysis==2.5.0 23 | - mdrestraintsgenerator==0.2.1 24 | - pymbar==4.0.1 25 | - pytraj==2.0.6 26 | - rdkit==2023.3.2 27 | - toff==0.1.0 28 | 29 | -------------------------------------------------------------------------------- /docs/source/env/backup/environment-macos.yml: -------------------------------------------------------------------------------- 1 | name: BindFlow 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.10.14 6 | - pip 7 | - ambertools 8 | - openmmforcefields 9 | - bioconda::snakemake=7.32.2 10 | - openmm=8.0.0 11 | - pdbfixer=1.9 12 | - openff-toolkit=0.14.2 13 | - pyyaml=6.0 14 | - parmed=4.1.0 15 | - pandas=2.0.3 16 | - numpy=1.22.4 17 | - mpi4py=3.1.5 18 | - pip: 19 | - alchemlyb==2.0.0 20 | - mdanalysis==2.5.0 21 | - mdrestraintsgenerator==0.2.1 22 | - pymbar==4.0.1 23 | - pytraj==2.0.6 24 | - rdkit==2023.3.2 25 | - toff==0.1.0 -------------------------------------------------------------------------------- /docs/source/env/latest/environment-linux.yml: -------------------------------------------------------------------------------- 1 | name: BindFlow 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.10.14 6 | - pip 7 | - bioconda::snakemake=7.32.2 8 | - ambertools=22.5 9 | - openmm=8.0.0 10 | - openmmforcefields=0.11.2 11 | - pdbfixer=1.9 12 | - openff-toolkit=0.14.2 13 | - espaloma=0.3.2 14 | - pyyaml=6.0 15 | - parmed=4.1.0 16 | - pandas=2.0.3 17 | - numpy=1.22.4 18 | - mpi4py=3.1.5 19 | - pip: 20 | - alchemlyb==2.0.0 21 | - mdanalysis==2.5.0 22 | - mdrestraintsgenerator==0.2.1 23 | - pymbar==4.0.1 24 | - pytraj==2.0.6 25 | - rdkit==2023.3.2 26 | - toff==0.2.0 27 | 28 | -------------------------------------------------------------------------------- /docs/source/env/latest/environment-macos.yml: -------------------------------------------------------------------------------- 1 | name: BindFlow 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.10.14 6 | - pip 7 | - bioconda::snakemake=7.32.2 8 | - ambertools 9 | - openmm=8.0.0 10 | - openmmforcefields 11 | - pdbfixer=1.9 12 | - openff-toolkit=0.14.2 13 | - espaloma=0.3.2 14 | - pyyaml=6.0 15 | - parmed=4.1.0 16 | - pandas=2.0.3 17 | - numpy=1.22.4 18 | - mpi4py=3.1.5 19 | - pip: 20 | - alchemlyb==2.0.0 21 | - mdanalysis==2.5.0 22 | - mdrestraintsgenerator==0.2.1 23 | - pymbar==4.0.1 24 | - pytraj==2.0.6 25 | - rdkit==2023.3.2 26 | - toff==0.2.0 -------------------------------------------------------------------------------- /docs/source/env/relaxed/environment.yml: -------------------------------------------------------------------------------- 1 | name: BindFlow-dev 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.10.* 6 | - pip 7 | - bioconda::snakemake 8 | - ambertools 9 | - openmm 10 | - openmmforcefields 11 | - pdbfixer 12 | - openff-toolkit 13 | - espaloma>=0.3.2 14 | - pyyaml 15 | - parmed 16 | - pandas 17 | - numpy 18 | - mpi4py=3.1.5 19 | - alchemlyb 20 | - mdanalysis 21 | - pymbar 22 | - pip: 23 | - mdrestraintsgenerator>=0.2.1 24 | - rdkit 25 | - toff>=0.2.0 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/source/guides/debugging.md: -------------------------------------------------------------------------------- 1 | (debugging-bindflow-runs)= 2 | # Debugging BindFlow runs 3 | 4 | To troubleshoot a BindFlow run: 5 | 6 | 1. Check the main log file 7 | - Located in the `.snakemake` directory of the running simulation. 8 | - Search for the keyword error. 9 | - Note the rule name and job ID associated with the failure. 10 | 2. If running on an HPC system 11 | - Go to the `slurm_logs` directory. 12 | - Find the corresponding `.err` and/or `.out` files using the rule name and job ID. 13 | - Review their contents — in most cases this will clearly indicate what went wrong and which steps were involved. 14 | 3. If the issue remains unclear 15 | - Return to the main log file and locate the reported working directory. 16 | - Explore that directory for more detailed logs. 17 | - For GROMACS simulations, check for `.log` and `.lis` files in the specified directory. 18 | -------------------------------------------------------------------------------- /docs/source/guides/index.md: -------------------------------------------------------------------------------- 1 | # 📚 Guides 2 | 3 | ```{toctree} 4 | :maxdepth: 2 5 | 6 | force-fields 7 | deploy 8 | customizing 9 | debugging 10 | performance/index 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/source/guides/performance/scripts/README.md: -------------------------------------------------------------------------------- 1 | # How to execute the performance estimator 2 | 3 | 1. Execute the notebook `dag-performance.ipynb`. 4 | 2. Then -------------------------------------------------------------------------------- /docs/source/guides/performance/scripts/data/simu-size-fep.csv: -------------------------------------------------------------------------------- 1 | System_Name,non_compressed_GB,compressed_GB 2 | mcl1,142, 54 3 | thrombin,168, 66 4 | p38,320,137 5 | ptp1b,217,91 6 | tyk2,117,49 7 | SAMPL6-OA,20,6.3 8 | CyclophilinD,90,34 9 | A2A,110,47 -------------------------------------------------------------------------------- /docs/source/guides/performance/scripts/data/simu-size-mmpbsa.csv: -------------------------------------------------------------------------------- 1 | System_Name,non_compressed_GB,compressed_GB 2 | mcl1,15,6.3 3 | thrombin,19,8.2 4 | p38,40,19 5 | ptp1b,26,12 6 | tyk2,14,6.2 7 | SAMPL6-OA,1.2,0.47 8 | CyclophilinD,5.3,2.3 9 | A2A,15,6.5 -------------------------------------------------------------------------------- /docs/source/modules/data.md: -------------------------------------------------------------------------------- 1 | # Data 2 | 3 | This is sub-packege for testing. -------------------------------------------------------------------------------- /docs/source/modules/flow_builder.md: -------------------------------------------------------------------------------- 1 | # Builder helper 2 | 3 | Some helper functions used during the building of the pipeline 4 | 5 | ```{eval-rst} 6 | .. automodule:: bindflow.orchestration.flow_builder 7 | :members: 8 | :special-members: __init__, __call__ 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/source/modules/generate_scheduler.md: -------------------------------------------------------------------------------- 1 | # Scheduler 2 | 3 | Here is the template class to build your Scheduler based on your needs as well as the already implemented and tested scheduler. 4 | 5 | ```{eval-rst} 6 | .. automodule:: bindflow.orchestration.generate_scheduler 7 | :members: 8 | :special-members: __init__, __call__, __cluster_validation__ 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/source/modules/mdp.md: -------------------------------------------------------------------------------- 1 | # MDP utilities 2 | 3 | ```{eval-rst} 4 | .. automodule:: bindflow.mdp.mdp 5 | :members: 6 | :special-members: __init__, __call__ 7 | ```{eval-rst} 8 | -------------------------------------------------------------------------------- /docs/source/modules/runners.md: -------------------------------------------------------------------------------- 1 | # BindFlow's runners 2 | 3 | (bindflow-runners)= 4 | These are the main functions to execute BindFlow. Learn them well! 5 | 6 | ```{eval-rst} 7 | .. automodule:: bindflow.runners 8 | :members: 9 | :special-members: __init__, __call__ 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/source/modules/solvent.md: -------------------------------------------------------------------------------- 1 | # Solvation 2 | 3 | ```{eval-rst} 4 | .. autoclass:: bindflow.preparation.solvent.Solvate 5 | :members: 6 | :special-members: __init__, __call__ 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/modules/system_builder.md: -------------------------------------------------------------------------------- 1 | # System Builder 2 | 3 | ```{eval-rst} 4 | .. automodule:: bindflow.preparation.system_builder 5 | :members: 6 | :special-members: __init__, __call__ 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/modules/utils.md: -------------------------------------------------------------------------------- 1 | # Tools 2 | 3 | ```{eval-rst} 4 | .. automodule:: bindflow.utils.tools 5 | :members: 6 | :special-members: __init__, __call__ 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/notebooks/mmpbsa.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# MM(PB/GB)SA tutorial\n", 8 | "\n", 9 | "Here we will demonstrate how to execute a MM(PB/GB)SA calculation on the CyclophilinD system. All the data is on the " 10 | ] 11 | } 12 | ], 13 | "metadata": { 14 | "language_info": { 15 | "name": "python" 16 | } 17 | }, 18 | "nbformat": 4, 19 | "nbformat_minor": 2 20 | } 21 | -------------------------------------------------------------------------------- /examples/A2A/README.md: -------------------------------------------------------------------------------- 1 | # Handling cofactors properly during MMGBSA 2 | 3 | Modify the command from the `job.sh` adding `--until build_ligand_system`. 4 | 5 | ```bash 6 | snakemake --until build_ligand_system --jobs 100000 --latency-wait 360 --cluster-cancel scancel --rerun-incomplete --keep-incomplete --keep-going --cluster 'sbatch --partition=uds-hub --time=0-20:00:00 --gpus=1 --gres=gpu:1 --mem=5G --ntasks={threads} --cpus-per-task=1 --job-name=a2a.espaloma-0.3.1.{rule}.{jobid} --output=/scratch/uds_alma015/smaug/data/users/alejandro/simulation/BindFlow_simulations/A2A/mmpbsa/espaloma-0.3.1/slurm_logs/a2a.espaloma-0.3.1.{rule}.{jobid}.out --error=/scratch/uds_alma015/smaug/data/users/alejandro/simulation/BindFlow_simulations/A2A/mmpbsa/espaloma-0.3.1/slurm_logs/a2a.espaloma-0.3.1.{rule}.{jobid}.err' 7 | ``` 8 | 9 | After conclusion, we used the script `make_ndx.py` to modify the RECEPTOR group such as include the cofactors (in our case Na ion for A2A). 10 | 11 | Then, we restore the command by removing `--until build_ligand_system`, and execute. 12 | 13 | ```bash 14 | snakemake --jobs 100000 --latency-wait 360 --cluster-cancel scancel --rerun-incomplete --keep-incomplete --keep-going --cluster 'sbatch --partition=uds-hub --time=0-20:00:00 --gpus=1 --gres=gpu:1 --mem=5G --ntasks={threads} --cpus-per-task=1 --job-name=a2a.espaloma-0.3.1.{rule}.{jobid} --output=/scratch/uds_alma015/smaug/data/users/alejandro/simulation/BindFlow_simulations/A2A/mmpbsa/espaloma-0.3.1/slurm_logs/a2a.espaloma-0.3.1.{rule}.{jobid}.out --error=/scratch/uds_alma015/smaug/data/users/alejandro/simulation/BindFlow_simulations/A2A/mmpbsa/espaloma-0.3.1/slurm_logs/a2a.espaloma-0.3.1.{rule}.{jobid}.err' 15 | ``` 16 | 17 | ## Root of the problem 18 | 19 | ```python 20 | host_name='Protein or resname yCA or resname COF' 21 | ``` 22 | 23 | Will make crash the gmx_MMPBSA because actually `center_xtc` is failing before when dealing with this non standard `host_name`. 24 | This is related with issue [#32](https://github.com/ale94mleon/BindFlow/issues/32). 25 | -------------------------------------------------------------------------------- /examples/A2A/config-fep.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True -------------------------------------------------------------------------------- /examples/A2A/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 10G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True 30 | samples: 20 31 | mdp: 32 | complex: 33 | equi: 34 | 00_min: 35 | nsteps: 100000 36 | 01_nvt: 37 | dt: 0.001 38 | nsteps: 5000 39 | 02_nvt: 40 | dt: 0.001 41 | nsteps: 5000 42 | 03_npt: 43 | dt: 0.001 44 | nsteps: 5000 45 | 04_npt: 46 | dt: 0.002 47 | nsteps: 7500 48 | 05_npt: 49 | dt: 0.002 50 | nsteps: 7500 51 | 06_npt: 52 | dt: 0.003 53 | nsteps: 15000 54 | prod: 55 | dt: 0.004 56 | nsteps: 237500 57 | nstxout-compressed: 11875 58 | mmpbsa: 59 | prod: 60 | dt: 0.004 61 | nsteps: 25000 62 | nstxout-compressed: 1250 63 | mmpbsa: 64 | general: 65 | c2_entropy: 1 66 | interaction_entropy: 1 67 | pb: {} 68 | gb: {} -------------------------------------------------------------------------------- /examples/A2A/executor-fep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'fep' 8 | 9 | force_fields = { 10 | "openff_unconstrained-2.0.0": { 11 | "type": "openff", 12 | "code": "openff_unconstrained-2.0.0.offxml", 13 | }, 14 | "espaloma-0.3.1": { 15 | "type": "espaloma", 16 | "code": "espaloma-0.3.1", 17 | }, 18 | "gaff-2.11": { 19 | "type": "gaff", 20 | "code": "gaff-2.11", 21 | }, 22 | } 23 | 24 | ligand_files = glob.glob("inputs/sdf_split/*.mol") 25 | 26 | with open(f"config-{calculation_type}.yml", "r") as c: 27 | global_config = yaml.safe_load(c) 28 | 29 | for ff_id, info in force_fields.items(): 30 | ligands = [] 31 | for ligand_file in ligand_files: 32 | ligands.append({ 33 | 'conf': ligand_file, 34 | 'ff': { 35 | 'type': info["type"], 36 | 'code': info["code"] 37 | } 38 | }) 39 | 40 | calculate( 41 | calculation_type=calculation_type, 42 | protein={ 43 | 'conf': 'inputs/protein-amber14-all/protein.gro', 44 | 'top': 'inputs/protein-amber14-all/protein.top', 45 | }, 46 | ligands=ligands, 47 | membrane='inputs/membrane.pdb', 48 | cofactor={ 49 | 'conf': 'inputs/cofactor.gro', 50 | 'top': 'inputs/cofactor.top', 51 | 'is_water': False, 52 | }, 53 | cofactor_on_protein=True, 54 | water_model='amber/tip3p', 55 | hmr_factor=2.5, 56 | out_root_folder_path=f"{calculation_type}/{ff_id}", 57 | threads=10, 58 | num_jobs=100000, 59 | replicas=3, 60 | scheduler_class=SlurmScheduler, 61 | debug=False, 62 | job_prefix=f'a2a.{ff_id}', 63 | submit=False, 64 | global_config=global_config) 65 | -------------------------------------------------------------------------------- /examples/A2A/executor-mmpbsa.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'mmpbsa' 8 | 9 | force_fields = { 10 | "openff_unconstrained-2.0.0": { 11 | "type": "openff", 12 | "code": "openff_unconstrained-2.0.0.offxml", 13 | }, 14 | "espaloma-0.3.1": { 15 | "type": "espaloma", 16 | "code": "espaloma-0.3.1", 17 | }, 18 | "gaff-2.11": { 19 | "type": "gaff", 20 | "code": "gaff-2.11", 21 | }, 22 | } 23 | 24 | ligand_files = glob.glob("inputs/sdf_split/*.mol") 25 | 26 | with open(f"config-{calculation_type}.yml", "r") as c: 27 | global_config = yaml.safe_load(c) 28 | 29 | for ff_id, info in force_fields.items(): 30 | ligands = [] 31 | for ligand_file in ligand_files: 32 | ligands.append({ 33 | 'conf': ligand_file, 34 | 'ff': { 35 | 'type': info["type"], 36 | 'code': info["code"] 37 | } 38 | }) 39 | 40 | calculate( 41 | calculation_type=calculation_type, 42 | protein={ 43 | 'conf': 'inputs/protein-amber14-all/protein.gro', 44 | 'top': 'inputs/protein-amber14-all/protein.top', 45 | }, 46 | ligands=ligands, 47 | membrane='inputs/membrane.pdb', 48 | cofactor={ 49 | 'conf': 'inputs/cofactor.gro', 50 | 'top': 'inputs/cofactor.top', 51 | 'is_water': False, 52 | }, 53 | cofactor_on_protein=True, 54 | water_model='amber/tip3p', 55 | hmr_factor=2.5, 56 | out_root_folder_path=f"{calculation_type}/{ff_id}", 57 | threads=10, 58 | num_jobs=100000, 59 | replicas=3, 60 | scheduler_class=SlurmScheduler, 61 | debug=False, 62 | job_prefix=f'a2a.{ff_id}', 63 | submit=False, 64 | global_config=global_config) 65 | -------------------------------------------------------------------------------- /examples/A2A/inputs/cofactor.gro: -------------------------------------------------------------------------------- 1 | Manual Modification 2 | 1 3 | 500COF yNA 1 7.056 3.869 6.442 4 | 9.00890 7.80194 11.97990 0.00000 0.00000 4.50445 0.00000 0.00000 0.00000 5 | -------------------------------------------------------------------------------- /examples/A2A/inputs/cofactor.top: -------------------------------------------------------------------------------- 1 | [ defaults ] 2 | ; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ 3 | 1 2 no 1 0.833333 4 | 5 | [ atomtypes ] 6 | ; name at.num mass charge ptype sigma epsilon 7 | yNa 11 22.990000 0.00000000 A 0.33284 0.0115897 8 | 9 | 10 | [ moleculetype ] 11 | ; Name nrexcl 12 | COF 3 13 | 14 | [ atoms ] 15 | ; nr type resnr residue atom cgnr charge mass typeB chargeB massB 16 | ; residue 1 NA rtp NA q 1.0 17 | 1 yNa 1 COF yNA 1 1.00000000 22.990000 ; qtot 1.000000 18 | 19 | 20 | [ system ] 21 | ; Name 22 | Generic title 23 | 24 | [ molecules ] 25 | ; Compound #mols 26 | COF 1 27 | 28 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4g.mol: -------------------------------------------------------------------------------- 1 | 4g 2 | RDKit 3D 3 | 4 | 36 38 0 0 1 0 0 0 0 0999 V2000 5 | 66.4599 42.9655 46.0419 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.4105 42.4952 46.8658 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1564 42.3084 48.1949 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8482 42.5410 48.6895 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.9007 43.0676 47.8622 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.2529 43.2650 46.5726 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.6140 41.2229 50.5608 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 69.6935 42.1069 51.0220 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 68.5713 42.4859 50.2804 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3525 41.9267 49.0123 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 69.3141 41.0226 48.5304 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 70.4143 40.6934 49.3269 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.4246 41.6171 52.6499 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 63.8907 42.6975 51.9581 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 64.3550 42.9901 50.6786 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.3598 42.2179 50.0734 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 65.8598 41.1161 50.7836 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 65.4101 40.8284 52.0683 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.3061 43.8392 45.7361 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 71.4651 39.7129 48.8397 C 0 0 0 0 0 0 0 0 0 0 0 0 25 | 69.9525 42.6768 52.4033 C 0 0 0 0 0 0 0 0 0 0 0 0 26 | 67.8764 43.2103 50.6789 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 69.1975 40.5717 47.5552 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 64.0695 41.3818 53.6417 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 63.1236 43.3069 52.4139 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 63.9405 43.8477 50.1695 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 66.6014 40.4654 50.3421 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 65.8086 39.9773 52.6039 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 63.4911 44.2777 46.1549 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 64.5378 43.9950 44.7560 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 71.0085 38.9158 48.2504 H 0 0 0 0 0 0 0 0 0 0 0 0 36 | 72.1913 40.2252 48.2107 H 0 0 0 0 0 0 0 0 0 0 0 0 37 | 71.9999 39.2478 49.6688 H 0 0 0 0 0 0 0 0 0 0 0 0 38 | 69.2321 43.4544 52.6595 H 0 0 0 0 0 0 0 0 0 0 0 0 39 | 70.9503 43.1139 52.4621 H 0 0 0 0 0 0 0 0 0 0 0 0 40 | 69.8740 41.8910 53.1552 H 0 0 0 0 0 0 0 0 0 0 0 0 41 | 1 2 2 0 42 | 1 6 1 0 43 | 2 3 1 0 44 | 3 4 2 0 45 | 3 10 1 0 46 | 4 5 1 0 47 | 4 16 1 0 48 | 5 6 2 0 49 | 6 19 1 0 50 | 7 8 2 0 51 | 7 12 1 0 52 | 8 9 1 0 53 | 8 21 1 0 54 | 9 10 2 0 55 | 9 22 1 0 56 | 10 11 1 0 57 | 11 12 2 0 58 | 11 23 1 0 59 | 12 20 1 0 60 | 13 14 2 0 61 | 13 18 1 0 62 | 13 24 1 0 63 | 14 15 1 0 64 | 14 25 1 0 65 | 15 16 2 0 66 | 15 26 1 0 67 | 16 17 1 0 68 | 17 18 2 0 69 | 17 27 1 0 70 | 18 28 1 0 71 | 19 29 1 0 72 | 19 30 1 0 73 | 20 31 1 0 74 | 20 32 1 0 75 | 20 33 1 0 76 | 21 34 1 0 77 | 21 35 1 0 78 | 21 36 1 0 79 | M END 80 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4h.mol: -------------------------------------------------------------------------------- 1 | 4h 2 | RDKit 3D 3 | 4 | 36 38 0 0 1 0 0 0 0 0999 V2000 5 | 66.4702 43.0147 46.0491 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.4245 42.5622 46.8770 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1588 42.3465 48.1985 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8400 42.5360 48.6811 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.8793 43.0259 47.8456 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.2439 43.2558 46.5652 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.5890 41.1810 50.5708 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 69.6715 42.0639 51.0419 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 68.5603 42.4715 50.2989 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3486 41.9454 49.0161 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 69.3054 41.0436 48.5223 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 70.3958 40.6839 49.3212 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.4682 41.6295 52.6604 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 63.9360 42.7141 51.9748 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 64.3809 42.9983 50.6873 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.3561 42.2084 50.0626 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 65.8433 41.0935 50.7592 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 65.4263 40.8254 52.0581 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.2964 43.8078 45.7177 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 71.4361 39.7011 48.8169 C 0 0 0 0 0 0 0 0 0 0 0 0 25 | 69.9171 42.6015 52.4388 C 0 0 0 0 0 0 0 0 0 0 0 0 26 | 67.8674 43.1875 50.7130 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 69.1970 40.6088 47.5403 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 64.0607 41.3601 53.9200 F 0 0 0 0 0 0 0 0 0 0 0 0 29 | 63.1945 43.3425 52.4452 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 63.9750 43.8637 50.1853 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 66.5666 40.4330 50.3010 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 65.8280 39.9756 52.5919 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 63.4725 44.2422 46.1218 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 64.5523 43.9862 44.7459 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 70.9655 38.8908 48.2574 H 0 0 0 0 0 0 0 0 0 0 0 0 36 | 72.1385 40.2074 48.1566 H 0 0 0 0 0 0 0 0 0 0 0 0 37 | 71.9986 39.2529 49.6373 H 0 0 0 0 0 0 0 0 0 0 0 0 38 | 69.2160 43.3994 52.6889 H 0 0 0 0 0 0 0 0 0 0 0 0 39 | 70.9250 43.0111 52.5266 H 0 0 0 0 0 0 0 0 0 0 0 0 40 | 69.7957 41.8032 53.1719 H 0 0 0 0 0 0 0 0 0 0 0 0 41 | 1 2 2 0 42 | 1 6 1 0 43 | 2 3 1 0 44 | 3 4 2 0 45 | 3 10 1 0 46 | 4 5 1 0 47 | 4 16 1 0 48 | 5 6 2 0 49 | 6 19 1 0 50 | 7 8 2 0 51 | 7 12 1 0 52 | 8 9 1 0 53 | 8 21 1 0 54 | 9 10 2 0 55 | 9 22 1 0 56 | 10 11 1 0 57 | 11 12 2 0 58 | 11 23 1 0 59 | 12 20 1 0 60 | 13 14 2 0 61 | 13 18 1 0 62 | 13 24 1 0 63 | 14 15 1 0 64 | 14 25 1 0 65 | 15 16 2 0 66 | 15 26 1 0 67 | 16 17 1 0 68 | 17 18 2 0 69 | 17 27 1 0 70 | 18 28 1 0 71 | 19 29 1 0 72 | 19 30 1 0 73 | 20 31 1 0 74 | 20 32 1 0 75 | 20 33 1 0 76 | 21 34 1 0 77 | 21 35 1 0 78 | 21 36 1 0 79 | M END 80 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4m.mol: -------------------------------------------------------------------------------- 1 | 4m 2 | RDKit 3D 3 | 4 | 30 32 0 0 1 0 0 0 0 0999 V2000 5 | 66.2804 43.0540 45.9749 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.2480 42.4335 46.6688 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1170 42.1989 48.0077 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8988 42.5374 48.6478 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.9373 43.2150 47.9528 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.1771 43.4546 46.6455 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.7063 40.6428 49.8694 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 69.8892 41.4988 50.5338 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 68.7239 42.0117 49.9618 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3458 41.6374 48.6589 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 69.2107 40.7639 47.9743 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 70.3625 40.2910 48.6059 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.7225 41.5091 52.6668 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 65.5604 40.6609 51.9508 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 65.9267 40.9843 50.6481 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.5047 42.1811 50.0527 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 64.6512 43.0158 50.7922 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 64.2614 42.6859 52.0896 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.2262 44.1792 45.9421 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 70.3234 41.9829 52.1347 Cl 0 0 0 0 0 0 0 0 0 0 0 0 25 | 68.1206 42.7104 50.5196 H 0 0 0 0 0 0 0 0 0 0 0 0 26 | 68.9882 40.4430 46.9668 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 71.0350 39.6144 48.0994 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 64.4210 41.2507 53.6718 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 65.9034 39.7378 52.3989 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 66.5424 40.2858 50.0986 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 64.2950 43.9453 50.3739 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 63.6029 43.3393 52.6437 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 63.4976 44.6591 46.4613 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 64.3793 44.3779 44.9535 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 1 2 2 0 36 | 1 6 1 0 37 | 2 3 1 0 38 | 3 4 2 0 39 | 3 10 1 0 40 | 4 5 1 0 41 | 4 16 1 0 42 | 5 6 2 0 43 | 6 19 1 0 44 | 7 8 2 0 45 | 7 12 1 0 46 | 8 9 1 0 47 | 8 20 1 0 48 | 9 10 2 0 49 | 9 21 1 0 50 | 10 11 1 0 51 | 11 12 2 0 52 | 11 22 1 0 53 | 12 23 1 0 54 | 13 14 2 0 55 | 13 18 1 0 56 | 13 24 1 0 57 | 14 15 1 0 58 | 14 25 1 0 59 | 15 16 2 0 60 | 15 26 1 0 61 | 16 17 1 0 62 | 17 18 2 0 63 | 17 27 1 0 64 | 18 28 1 0 65 | 19 29 1 0 66 | 19 30 1 0 67 | M END 68 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4n.mol: -------------------------------------------------------------------------------- 1 | 4n 2 | RDKit 3D 3 | 4 | 30 32 0 0 1 0 0 0 0 0999 V2000 5 | 66.4829 42.9333 46.0455 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.4264 42.4775 46.8854 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1574 42.3000 48.2136 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8429 42.5290 48.6914 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.9020 43.0392 47.8454 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.2656 43.2252 46.5575 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.6058 41.2603 50.6017 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 70.4228 40.7181 49.3714 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 69.3203 41.0325 48.5733 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3477 41.9287 49.0444 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 68.5553 42.4957 50.3108 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 69.6801 42.1398 51.0584 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.3367 41.6167 52.6281 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 65.3514 40.8401 52.0795 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 65.8308 41.1264 50.8046 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.3339 42.2146 50.0713 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 64.3036 42.9760 50.6464 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 63.8080 42.6855 51.9137 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.3217 43.7708 45.6984 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 69.9172 42.8526 52.6127 Cl 0 0 0 0 0 0 0 0 0 0 0 0 25 | 71.5940 39.5953 48.7833 Cl 0 0 0 0 0 0 0 0 0 0 0 0 26 | 69.2151 40.5709 47.6021 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 67.8538 43.2138 50.7084 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 63.9560 41.3867 53.6127 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 65.7505 39.9983 52.6299 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 66.5891 40.4811 50.3858 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 63.8891 43.8229 50.1192 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 63.0181 43.2880 52.3397 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 63.4938 44.2066 46.0963 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 64.5651 43.9152 44.7194 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 1 2 2 0 36 | 1 6 1 0 37 | 2 3 1 0 38 | 3 4 2 0 39 | 3 10 1 0 40 | 4 5 1 0 41 | 4 16 1 0 42 | 5 6 2 0 43 | 6 19 1 0 44 | 7 8 2 0 45 | 7 12 1 0 46 | 8 9 1 0 47 | 8 21 1 0 48 | 9 10 2 0 49 | 9 22 1 0 50 | 10 11 1 0 51 | 11 12 2 0 52 | 11 23 1 0 53 | 12 20 1 0 54 | 13 14 2 0 55 | 13 18 1 0 56 | 13 24 1 0 57 | 14 15 1 0 58 | 14 25 1 0 59 | 15 16 2 0 60 | 15 26 1 0 61 | 16 17 1 0 62 | 17 18 2 0 63 | 17 27 1 0 64 | 18 28 1 0 65 | 19 29 1 0 66 | 19 30 1 0 67 | M END 68 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4q.mol: -------------------------------------------------------------------------------- 1 | 4q 2 | RDKit 3D 3 | 4 | 30 32 0 0 1 0 0 0 0 0999 V2000 5 | 66.4723 42.9283 46.0409 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.4224 42.4779 46.8766 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1644 42.3022 48.2074 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8505 42.5282 48.6921 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.9031 43.0332 47.8503 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.2583 43.2172 46.5602 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.6565 41.2829 50.5634 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 70.4848 40.7915 49.3109 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 69.3717 41.0934 48.5222 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3660 41.9348 49.0287 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 68.5583 42.4578 50.3173 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 69.6943 42.1053 51.0486 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.3675 41.6307 52.6401 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 65.3715 40.8456 52.0841 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 65.8404 41.1245 50.8038 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.3451 42.2147 50.0732 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 64.3237 42.9831 50.6545 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 63.8368 42.6987 51.9266 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.3068 43.7572 45.7069 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 71.2630 40.1406 48.9395 H 0 0 0 0 0 0 0 0 0 0 0 0 25 | 69.2878 40.6672 47.5331 H 0 0 0 0 0 0 0 0 0 0 0 0 26 | 67.8388 43.1374 50.7477 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 69.8522 42.4999 52.0420 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 63.9982 41.4082 53.6305 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 65.7787 40.0139 52.6402 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 66.5948 40.4775 50.3802 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 63.9124 43.8326 50.1295 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 63.0554 43.3072 52.3589 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 63.4845 44.1971 46.1116 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 64.5377 43.8882 44.7230 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 1 2 2 0 36 | 1 6 1 0 37 | 2 3 1 0 38 | 3 4 2 0 39 | 3 10 1 0 40 | 4 5 1 0 41 | 4 16 1 0 42 | 5 6 2 0 43 | 6 19 1 0 44 | 7 8 2 0 45 | 7 12 1 0 46 | 8 9 1 0 47 | 8 20 1 0 48 | 9 10 2 0 49 | 9 21 1 0 50 | 10 11 1 0 51 | 11 12 2 0 52 | 11 22 1 0 53 | 12 23 1 0 54 | 13 14 2 0 55 | 13 18 1 0 56 | 13 24 1 0 57 | 14 15 1 0 58 | 14 25 1 0 59 | 15 16 2 0 60 | 15 26 1 0 61 | 16 17 1 0 62 | 17 18 2 0 63 | 17 27 1 0 64 | 18 28 1 0 65 | 19 29 1 0 66 | 19 30 1 0 67 | M END 68 | -------------------------------------------------------------------------------- /examples/A2A/inputs/sdf_split/4r.mol: -------------------------------------------------------------------------------- 1 | 4r 2 | RDKit 3D 3 | 4 | 33 35 0 0 1 0 0 0 0 0999 V2000 5 | 66.2809 43.1458 45.9651 N 0 0 0 0 0 0 0 0 0 0 0 0 6 | 67.2540 42.5144 46.6453 N 0 0 0 0 0 0 0 0 0 0 0 0 7 | 67.1095 42.2456 47.9764 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 65.8968 42.5780 48.6273 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 64.9231 43.2411 47.9440 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 65.1638 43.5089 46.6396 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 70.4789 40.3945 49.9457 N 0 0 0 0 0 0 0 0 0 0 0 0 12 | 69.8513 41.4654 50.4913 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 68.7639 42.0829 49.8721 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 68.3027 41.6252 48.6323 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 68.9829 40.5475 48.0511 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 70.0346 39.9344 48.7441 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 64.9563 41.5766 52.7091 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 64.4677 42.7566 52.1606 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 64.7748 43.0835 50.8397 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 65.5459 42.2226 50.0426 C 0 0 0 0 0 0 0 0 0 0 0 0 21 | 65.9653 41.0079 50.6021 C 0 0 0 0 0 0 0 0 0 0 0 0 22 | 65.7088 40.7066 51.9333 C 0 0 0 0 0 0 0 0 0 0 0 0 23 | 64.2014 44.2316 45.9470 N 0 0 0 0 0 0 0 0 0 0 0 0 24 | 70.7012 38.6780 48.1877 C 0 0 0 0 0 0 0 0 0 0 0 0 25 | 70.4106 42.0690 52.0095 Cl 0 0 0 0 0 0 0 0 0 0 0 0 26 | 64.7094 41.2686 54.0023 F 0 0 0 0 0 0 0 0 0 0 0 0 27 | 71.7337 38.2616 48.9256 F 0 0 0 0 0 0 0 0 0 0 0 0 28 | 69.8054 37.6926 48.1314 F 0 0 0 0 0 0 0 0 0 0 0 0 29 | 71.1356 38.9242 46.9544 F 0 0 0 0 0 0 0 0 0 0 0 0 30 | 68.2605 42.8989 50.3574 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 68.6631 40.1546 47.0972 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 63.8792 43.4303 52.7674 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | 64.4209 44.0229 50.4437 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 66.5178 40.2933 50.0128 H 0 0 0 0 0 0 0 0 0 0 0 0 35 | 66.0772 39.7863 52.3606 H 0 0 0 0 0 0 0 0 0 0 0 0 36 | 63.5046 44.7410 46.4820 H 0 0 0 0 0 0 0 0 0 0 0 0 37 | 64.3741 44.4672 44.9727 H 0 0 0 0 0 0 0 0 0 0 0 0 38 | 1 2 2 0 39 | 1 6 1 0 40 | 2 3 1 0 41 | 3 4 2 0 42 | 3 10 1 0 43 | 4 5 1 0 44 | 4 16 1 0 45 | 5 6 2 0 46 | 6 19 1 0 47 | 7 8 2 0 48 | 7 12 1 0 49 | 8 9 1 0 50 | 8 21 1 0 51 | 9 10 2 0 52 | 9 26 1 0 53 | 10 11 1 0 54 | 11 12 2 0 55 | 11 27 1 0 56 | 12 20 1 0 57 | 13 14 2 0 58 | 13 18 1 0 59 | 13 22 1 0 60 | 14 15 1 0 61 | 14 28 1 0 62 | 15 16 2 0 63 | 15 29 1 0 64 | 16 17 1 0 65 | 17 18 2 0 66 | 17 30 1 0 67 | 18 31 1 0 68 | 19 32 1 0 69 | 19 33 1 0 70 | 20 23 1 0 71 | 20 24 1 0 72 | 20 25 1 0 73 | M END 74 | -------------------------------------------------------------------------------- /examples/CyclophilinD/config-fep.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True -------------------------------------------------------------------------------- /examples/CyclophilinD/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True 30 | samples: 20 31 | mdp: 32 | complex: 33 | equi: 34 | 00_min: 35 | nsteps: 100000 36 | 01_nvt: 37 | dt: 0.002 38 | nsteps: 5000 39 | 02_nvt: 40 | dt: 0.003 41 | nsteps: 5000 42 | 03_npt: 43 | dt: 0.003 44 | nsteps: 7500 45 | 04_npt: 46 | dt: 0.004 47 | nsteps: 15000 48 | prod: 49 | dt: 0.004 50 | nsteps: 237500 51 | nstxout-compressed: 11875 52 | mmpbsa: 53 | prod: 54 | dt: 0.004 55 | nsteps: 25000 56 | nstxout-compressed: 1250 57 | mmpbsa: 58 | general: 59 | c2_entropy: 1 60 | interaction_entropy: 1 61 | pb: {} 62 | gb: {} -------------------------------------------------------------------------------- /examples/CyclophilinD/executor-fep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'fep' 8 | 9 | force_fields = { 10 | "openff_unconstrained-2.0.0": { 11 | "type": "openff", 12 | "code": "openff_unconstrained-2.0.0.offxml", 13 | }, 14 | "espaloma-0.3.1": { 15 | "type": "espaloma", 16 | "code": "espaloma-0.3.1", 17 | }, 18 | "gaff-2.11": { 19 | "type": "gaff", 20 | "code": "gaff-2.11", 21 | }, 22 | } 23 | 24 | ligand_files = glob.glob("inputs/ligands/*.sdf") 25 | 26 | with open(f"config-{calculation_type}.yml", "r") as c: 27 | global_config = yaml.safe_load(c) 28 | 29 | for ff_id, info in force_fields.items(): 30 | ligands = [] 31 | for ligand_file in ligand_files: 32 | ligands.append({ 33 | 'conf': ligand_file, 34 | 'ff': { 35 | 'type': info["type"], 36 | 'code': info["code"] 37 | } 38 | }) 39 | 40 | calculate( 41 | calculation_type=calculation_type, 42 | protein='inputs/receptor_protein.pdb', 43 | ligands=ligands, 44 | water_model='amber/tip3p', 45 | hmr_factor=2.5, 46 | out_root_folder_path=f"{calculation_type}/{ff_id}", 47 | threads=10, # Configure it based on your cluster 48 | num_jobs=100000, 49 | replicas=3, 50 | scheduler_class=SlurmScheduler, 51 | debug=False, 52 | job_prefix=f'cycloD.{ff_id}', 53 | submit=False, 54 | global_config=global_config) 55 | -------------------------------------------------------------------------------- /examples/CyclophilinD/executor-mmpbsa.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'mmpbsa' 8 | 9 | # For benchmark several force fields may be tested 10 | # But for production consider to use only one 11 | force_fields = { 12 | "openff_unconstrained-2.0.0": { 13 | "type": "openff", 14 | "code": "openff_unconstrained-2.0.0.offxml", 15 | }, 16 | "espaloma-0.3.1": { 17 | "type": "espaloma", 18 | "code": "espaloma-0.3.1", 19 | }, 20 | "gaff-2.11": { 21 | "type": "gaff", 22 | "code": "gaff-2.11", 23 | }, 24 | } 25 | 26 | ligand_files = glob.glob("inputs/ligands/*.sdf") 27 | 28 | with open(f"config-{calculation_type}.yml", "r") as c: 29 | global_config = yaml.safe_load(c) 30 | 31 | for ff_id, info in force_fields.items(): 32 | ligands = [] 33 | for ligand_file in ligand_files: 34 | ligands.append({ 35 | 'conf': ligand_file, 36 | 'ff': { 37 | 'type': info["type"], 38 | 'code': info["code"] 39 | } 40 | }) 41 | 42 | calculate( 43 | calculation_type=calculation_type, 44 | protein='inputs/receptor_protein.pdb', 45 | ligands=ligands, 46 | water_model='amber/tip3p', 47 | hmr_factor=2.5, 48 | out_root_folder_path=f"{calculation_type}/{ff_id}", 49 | threads=10, 50 | num_jobs=100000, 51 | replicas=3, 52 | scheduler_class=SlurmScheduler, 53 | debug=False, 54 | job_prefix=f'cycloD.{ff_id}', 55 | submit=False, 56 | global_config=global_config) 57 | -------------------------------------------------------------------------------- /examples/CyclophilinD/inputs/ligands/ligand-3.sdf: -------------------------------------------------------------------------------- 1 | ligand-3 2 | PyMOL2.5 3D 0 3 | 4 | 27 29 0 0 0 0 0 0 0 0999 V2000 5 | 39.2512 44.8430 32.1483 F 0 0 0 0 0 0 0 0 0 0 0 0 6 | 34.9223 50.1032 36.4350 O 0 0 0 0 0 0 0 0 0 0 0 0 7 | 36.6668 49.2152 34.1752 O 0 0 0 0 0 0 0 0 0 0 0 0 8 | 35.3731 46.4221 35.7874 N 0 0 0 0 0 0 0 0 0 0 0 0 9 | 36.9502 49.0121 35.5980 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | 37.9774 44.4035 34.1000 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 36.9926 44.8088 35.0188 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | 37.6053 46.4304 32.8130 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 34.5050 48.1110 34.2184 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 38.2838 45.2189 33.0084 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 35.6074 48.8483 36.3744 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 35.8894 48.1598 33.5427 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 34.7261 47.7592 35.6987 C 0 0 0 0 0 0 0 0 0 0 0 0 18 | 36.3090 46.0102 34.8319 C 0 0 0 0 0 0 0 0 0 0 0 0 19 | 36.6070 46.8269 33.7133 C 0 0 0 0 0 0 0 0 0 0 0 0 20 | 34.0069 49.9196 36.7802 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 35.6056 46.1143 36.7322 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 37.5025 49.8751 35.9887 H 0 0 0 0 0 0 0 0 0 0 0 0 23 | 37.5790 48.1253 35.7340 H 0 0 0 0 0 0 0 0 0 0 0 0 24 | 38.5004 43.4619 34.2371 H 0 0 0 0 0 0 0 0 0 0 0 0 25 | 36.7626 44.1860 35.8797 H 0 0 0 0 0 0 0 0 0 0 0 0 26 | 37.8530 47.0520 31.9613 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 33.8752 47.3647 33.7309 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 34.0008 49.0808 34.1137 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 35.8424 48.5282 37.3995 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 35.7708 48.3750 32.4767 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | 33.7478 47.7147 36.2031 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | 1 10 1 0 0 0 0 33 | 2 11 1 0 0 0 0 34 | 2 16 1 0 0 0 0 35 | 3 5 1 0 0 0 0 36 | 3 12 1 0 0 0 0 37 | 4 13 1 0 0 0 0 38 | 4 14 1 0 0 0 0 39 | 4 17 1 0 0 0 0 40 | 5 11 1 0 0 0 0 41 | 5 18 1 0 0 0 0 42 | 5 19 1 0 0 0 0 43 | 6 7 2 0 0 0 0 44 | 6 10 1 0 0 0 0 45 | 6 20 1 0 0 0 0 46 | 7 14 1 0 0 0 0 47 | 7 21 1 0 0 0 0 48 | 8 10 2 0 0 0 0 49 | 8 15 1 0 0 0 0 50 | 8 22 1 0 0 0 0 51 | 9 12 1 0 0 0 0 52 | 9 13 1 0 0 0 0 53 | 9 23 1 0 0 0 0 54 | 9 24 1 0 0 0 0 55 | 11 13 1 0 0 0 0 56 | 11 25 1 0 0 0 0 57 | 12 15 1 0 0 0 0 58 | 12 26 1 0 0 0 0 59 | 13 27 1 0 0 0 0 60 | 14 15 2 0 0 0 0 61 | M END 62 | $$$$ 63 | -------------------------------------------------------------------------------- /examples/CyclophilinD/inputs/ligands/ligand-7.sdf: -------------------------------------------------------------------------------- 1 | ligand-7 2 | RDKit 3D 3 | 4 | 16 18 0 0 0 0 0 0 0 0999 V2000 5 | 42.3526 43.6387 30.2688 O 0 0 0 0 0 0 0 0 0 0 0 0 6 | 40.8269 42.6613 31.4160 O 0 0 0 0 0 0 0 0 0 0 0 0 7 | 43.8335 40.1789 30.5994 O 0 0 0 0 0 0 0 0 0 0 0 0 8 | 42.0345 41.2285 34.6487 O 0 0 0 0 0 0 0 0 0 0 0 0 9 | 42.9074 40.9888 32.5331 N 0 0 0 0 0 0 0 0 0 0 0 0 10 | 43.0428 42.4473 32.2125 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 45.5907 38.8714 33.3008 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | 45.0309 39.2777 34.6811 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | 44.0966 37.1630 34.0398 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | 41.9923 42.9429 31.2144 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 43.3541 39.9942 31.7021 C 0 0 0 0 0 0 0 0 0 0 0 0 16 | 42.4744 40.5339 33.7471 C 0 0 0 0 0 0 0 0 0 0 0 0 17 | 44.5226 37.8878 32.7552 C 0 0 1 0 0 0 0 0 0 0 0 0 18 | 43.7036 38.4571 34.7711 C 0 0 2 0 0 0 0 0 0 0 0 0 19 | 43.2034 38.6464 32.4023 C 0 0 1 0 0 0 0 0 0 0 0 0 20 | 42.6230 39.0129 33.8023 C 0 0 2 0 0 0 0 0 0 0 0 0 21 | 1 10 1 0 22 | 2 10 2 0 23 | 3 11 2 0 24 | 4 12 2 0 25 | 5 6 1 0 26 | 5 11 1 0 27 | 5 12 1 0 28 | 6 10 1 0 29 | 7 8 1 0 30 | 13 7 1 1 31 | 14 8 1 6 32 | 9 13 1 0 33 | 9 14 1 0 34 | 15 11 1 6 35 | 16 12 1 6 36 | 13 15 1 0 37 | 14 16 1 0 38 | 15 16 1 0 39 | M CHG 1 1 -1 40 | M END 41 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | To learn how to run the examples, please visit the [Tutorial page](https://bindflow.readthedocs.io/en/latest/source/tutorials.html) on the online documentation. 4 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/config-fep.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | partition: deflt 5 | # partition: uds-hub 6 | time: "0-20:00:00" 7 | gpus: 1 8 | gres: "gpu:1" 9 | mem: '10G' 10 | exclude: fang[51-54] 11 | job: # optional 12 | partition: deflt 13 | # partition: uds-hub 14 | time: "2-00:00:00" 15 | mem: '10G' 16 | cpus-per-task: 1 17 | exclude: fang[51-54] 18 | extra_directives: # Optional 19 | dependencies: 20 | - MODULEPATH="/data/shared/spack/0.22.1+240909/modules:${MODULEPATH}" 21 | - module add gromacs/2022.4 22 | 23 | # - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 24 | # - module add gromacs/2022.4 25 | - 'export GMX_MAXBACKUP=-1' 26 | mdrun: 27 | all: 28 | cpi: True 29 | stepout: 5000 30 | v: True 31 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | partition: deflt 5 | # partition: uds-hub 6 | time: "0-20:00:00" 7 | gpus: 1 8 | gres: "gpu:1" 9 | mem: '10G' 10 | # exclude: fang[51-54] 11 | job: # optional 12 | partition: deflt 13 | # partition: uds-hub 14 | time: "2-00:00:00" 15 | mem: '10G' 16 | cpus-per-task: 1 17 | # exclude: fang[51-54] 18 | extra_directives: # Optional 19 | dependencies: 20 | - MODULEPATH="/data/shared/spack/0.22.1+240909/modules:${MODULEPATH}" 21 | - module add gromacs/2022.4 22 | 23 | # - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 24 | # - module add gromacs/2022.4 25 | - 'export GMX_MAXBACKUP=-1' 26 | mdrun: 27 | all: 28 | cpi: True 29 | stepout: 5000 30 | v: True 31 | samples: 20 32 | mdp: 33 | complex: 34 | equi: 35 | 00_min: 36 | nsteps: 100000 37 | 01_nvt: 38 | dt: 0.002 39 | nsteps: 5000 40 | 02_nvt: 41 | dt: 0.003 42 | nsteps: 5000 43 | 03_npt: 44 | dt: 0.003 45 | nsteps: 7500 46 | 04_npt: 47 | dt: 0.004 48 | nsteps: 15000 49 | prod: 50 | dt: 0.004 51 | nsteps: 237500 52 | nstxout-compressed: 11875 53 | mmpbsa: 54 | prod: 55 | dt: 0.004 56 | nsteps: 25000 57 | nstxout-compressed: 1250 58 | mmpbsa: 59 | general: 60 | c2_entropy: 1 61 | interaction_entropy: 1 62 | pb: {} 63 | gb: {} -------------------------------------------------------------------------------- /examples/SAMPL6-OA/executor-fep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'fep' 8 | 9 | force_fields = { 10 | "espaloma-0.3.1": { 11 | "type": "espaloma", 12 | "code": "espaloma-0.3.1" 13 | }, 14 | } 15 | 16 | ligand_files = glob.glob("inputs/guests/*.sdf") 17 | 18 | with open(f"config-{calculation_type}.yml", "r") as c: 19 | global_config = yaml.safe_load(c) 20 | 21 | for ff_id, info in force_fields.items(): 22 | ligands = [] 23 | for ligand_file in ligand_files: 24 | ligands.append({ 25 | 'conf': ligand_file, 26 | 'ff': { 27 | 'type': info["type"], 28 | 'code': info["code"] 29 | } 30 | }) 31 | 32 | calculate( 33 | calculation_type=calculation_type, 34 | protein={ 35 | 'conf': 'inputs/host/espaloma-0.3.1/OA.gro', 36 | 'top': 'inputs/host/espaloma-0.3.1/OA.top', 37 | }, 38 | ligands=ligands, 39 | out_root_folder_path=f"{calculation_type}2/{ff_id}", 40 | cofactor=None, 41 | cofactor_on_protein=True, 42 | host_name='HOST', 43 | host_selection='resname HOST', 44 | membrane=None, 45 | water_model='amber/tip3p', 46 | hmr_factor=2.5, 47 | threads=10, 48 | num_jobs=100000, 49 | replicas=5, 50 | submit=False, 51 | debug=False, 52 | job_prefix=f'sampl6-oa.{ff_id}', 53 | scheduler_class=SlurmScheduler, 54 | global_config=global_config) 55 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/executor-mmpbsa.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import yaml 3 | import glob 4 | from bindflow.runners import calculate 5 | from bindflow.orchestration.generate_scheduler import SlurmScheduler 6 | 7 | calculation_type = 'mmpbsa' 8 | 9 | force_fields = { 10 | "espaloma-0.3.1": { 11 | "type": "espaloma", 12 | "code": "espaloma-0.3.1" 13 | }, 14 | } 15 | 16 | ligand_files = glob.glob("inputs/guests/*.sdf") 17 | 18 | with open(f"config-{calculation_type}.yml", "r") as c: 19 | global_config = yaml.safe_load(c) 20 | 21 | for ff_id, info in force_fields.items(): 22 | ligands = [] 23 | for ligand_file in ligand_files: 24 | ligands.append({ 25 | 'conf': ligand_file, 26 | 'ff': { 27 | 'type': info["type"], 28 | 'code': info["code"] 29 | } 30 | }) 31 | 32 | calculate( 33 | calculation_type=calculation_type, 34 | protein={ 35 | 'conf': 'inputs/host/espaloma-0.3.1/OA.gro', 36 | 'top': 'inputs/host/espaloma-0.3.1/OA.top', 37 | }, 38 | ligands=ligands, 39 | out_root_folder_path=f"{calculation_type}2/{ff_id}", 40 | cofactor=None, 41 | cofactor_on_protein=True, 42 | host_name='HOST', 43 | host_selection='resname HOST', 44 | membrane=None, 45 | water_model='amber/tip3p', 46 | hmr_factor=2.5, 47 | threads=10, 48 | num_jobs=100000, 49 | replicas=3, 50 | submit=False, 51 | debug=False, 52 | job_prefix=f'sampl6-oa.{ff_id}', 53 | scheduler_class=SlurmScheduler, 54 | global_config=global_config) 55 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G0.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715413D 3 | 4 | 20 20 0 0 0 0 0 0 0999 V2000 5 | -0.7955 1.2297 -3.7854 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 1.3091 -0.3847 -0.7486 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | 0.5096 0.2717 0.3768 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 0.2838 -0.8860 -1.7613 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | -0.9597 0.1420 -0.0138 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | -0.9546 -0.0222 -1.5321 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | -0.8697 1.3180 -2.2595 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | 0.2049 0.6341 -4.2709 O 0 5 0 0 0 0 0 0 0 0 0 0 13 | -1.7693 1.7767 -4.3800 O 0 0 0 0 0 0 0 0 0 0 0 0 14 | 2.0136 0.3154 -1.2099 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | 1.8934 -1.2223 -0.3497 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | 0.7004 -0.2524 1.3210 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0.7925 1.3196 0.5218 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | 0.6733 -0.7466 -2.7812 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0.0732 -1.9566 -1.6356 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | -1.4456 -0.7024 0.4948 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | -1.5023 1.0547 0.2785 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | -1.8449 -0.5532 -1.8532 H 0 0 0 0 0 0 0 0 0 0 0 0 23 | 0.0170 1.8572 -1.9078 H 0 0 0 0 0 0 0 0 0 0 0 0 24 | -1.7461 1.9209 -1.9970 H 0 0 0 0 0 0 0 0 0 0 0 0 25 | 1 7 1 0 0 0 0 26 | 1 8 1 0 0 0 0 27 | 1 9 2 0 0 0 0 28 | 2 3 1 0 0 0 0 29 | 2 4 1 0 0 0 0 30 | 3 5 1 0 0 0 0 31 | 4 6 1 0 0 0 0 32 | 5 6 1 0 0 0 0 33 | 6 7 1 0 0 0 0 34 | 2 10 1 0 0 0 0 35 | 2 11 1 0 0 0 0 36 | 3 12 1 0 0 0 0 37 | 3 13 1 0 0 0 0 38 | 4 14 1 0 0 0 0 39 | 4 15 1 0 0 0 0 40 | 5 16 1 0 0 0 0 41 | 5 17 1 0 0 0 0 42 | 6 18 1 0 0 0 0 43 | 7 19 1 0 0 0 0 44 | 7 20 1 0 0 0 0 45 | M CHG 1 8 -1 46 | M END 47 | > 48 | -7.956566 49 | 50 | $$$$ 51 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G1.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715413D 3 | 4 | 17 16 0 0 0 0 0 0 0999 V2000 5 | -1.0006 -0.7469 -3.8833 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | -0.0084 -0.5611 -3.0020 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | -0.8433 -0.3922 -5.3688 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | -0.0381 0.0211 0.8063 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | -0.1259 -0.8917 -1.5409 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | 0.1069 0.3450 -0.6725 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 0.2681 0.0857 -5.7303 O 0 5 0 0 0 0 0 0 0 0 0 0 12 | -1.8736 -0.6292 -6.0659 O 0 0 0 0 0 0 0 0 0 0 0 0 13 | -1.9447 -1.1634 -3.5343 H 0 0 0 0 0 0 0 0 0 0 0 0 14 | 0.9430 -0.1434 -3.3206 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | -1.0312 -0.3847 1.0235 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | 0.0983 0.9255 1.4073 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0.7104 -0.7126 1.1224 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | -1.1300 -1.2920 -1.3561 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0.5854 -1.6783 -1.2604 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | 1.1106 0.7483 -0.8545 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | -0.6092 1.1326 -0.9379 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 1 2 2 0 0 0 0 23 | 1 3 1 0 0 0 0 24 | 2 5 1 0 0 0 0 25 | 3 7 1 0 0 0 0 26 | 3 8 2 0 0 0 0 27 | 4 6 1 0 0 0 0 28 | 5 6 1 0 0 0 0 29 | 1 9 1 0 0 0 0 30 | 2 10 1 0 0 0 0 31 | 4 11 1 0 0 0 0 32 | 4 12 1 0 0 0 0 33 | 4 13 1 0 0 0 0 34 | 5 14 1 0 0 0 0 35 | 5 15 1 0 0 0 0 36 | 6 16 1 0 0 0 0 37 | 6 17 1 0 0 0 0 38 | M CHG 1 7 -1 39 | M END 40 | > 41 | -6.831202 42 | 43 | $$$$ 44 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G2.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715413D 3 | 4 | 25 25 0 1 0 0 0 0 0999 V2000 5 | 0.2241 -1.1357 -4.2804 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 0.4652 0.1472 -4.5856 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | 1.7894 -0.5542 -1.5717 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 1.1825 0.4275 -5.8319 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 0.5566 -0.2851 -1.1171 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | -0.4939 -1.5520 -3.0259 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 0.0275 1.3042 -3.7403 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | -1.0051 0.9021 -2.6793 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | -0.6591 -0.4247 -1.9881 C 0 0 2 0 0 0 0 0 0 0 0 0 14 | 0.3129 0.1732 0.2902 C 0 0 0 0 0 0 0 0 0 0 0 0 15 | 0.6132 0.0157 -6.8813 O 0 5 0 0 0 0 0 0 0 0 0 0 16 | 2.2758 1.0443 -5.6932 O 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0.5476 -1.9343 -4.9434 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | 2.6613 -0.4502 -0.9346 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 1.9554 -0.8848 -2.5917 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | -1.4888 -1.9348 -3.3003 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 0.0542 -2.4021 -2.5903 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 0.8919 1.7520 -3.2369 H 0 0 0 0 0 0 0 0 0 0 0 0 23 | -0.4008 2.0735 -4.3938 H 0 0 0 0 0 0 0 0 0 0 0 0 24 | -1.0802 1.7062 -1.9245 H 0 0 0 0 0 0 0 0 0 0 0 0 25 | -2.0002 0.8451 -3.1539 H 0 0 0 0 0 0 0 0 0 0 0 0 26 | -1.5025 -0.6880 -1.3241 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 0.3537 1.2659 0.3463 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | -0.6741 -0.1560 0.6311 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 1.0569 -0.2247 0.9886 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | 1 2 2 0 0 0 0 31 | 1 6 1 0 0 0 0 32 | 2 4 1 0 0 0 0 33 | 2 7 1 0 0 0 0 34 | 3 5 2 0 0 0 0 35 | 4 11 1 0 0 0 0 36 | 4 12 2 0 0 0 0 37 | 5 9 1 0 0 0 0 38 | 5 10 1 0 0 0 0 39 | 6 9 1 0 0 0 0 40 | 7 8 1 0 0 0 0 41 | 8 9 1 0 0 0 0 42 | 1 13 1 0 0 0 0 43 | 3 14 1 0 0 0 0 44 | 3 15 1 0 0 0 0 45 | 6 16 1 0 0 0 0 46 | 6 17 1 0 0 0 0 47 | 7 18 1 0 0 0 0 48 | 7 19 1 0 0 0 0 49 | 8 20 1 0 0 0 0 50 | 8 21 1 0 0 0 0 51 | 9 22 1 0 0 0 0 52 | 10 23 1 0 0 0 0 53 | 10 24 1 0 0 0 0 54 | 10 25 1 0 0 0 0 55 | M CHG 1 11 -1 56 | M END 57 | > 58 | -9.873334 59 | 60 | $$$$ 61 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G3.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715413D 3 | 4 | 17 16 0 0 0 0 0 0 0999 V2000 5 | -0.2421 -0.0718 0.3818 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 0.8393 -0.2077 -0.3937 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | -1.3051 0.2551 -3.3541 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | 1.1850 0.7201 -1.5211 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | -0.1018 -0.6816 -3.2022 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | 1.2330 -0.0262 -2.8578 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | -1.5879 0.9108 -2.3102 O 0 5 0 0 0 0 0 0 0 0 0 0 12 | -1.8592 0.2770 -4.4873 O 0 0 0 0 0 0 0 0 0 0 0 0 13 | -0.4542 -0.7664 1.1869 H 0 0 0 0 0 0 0 0 0 0 0 0 14 | -0.9353 0.7462 0.2188 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | 1.5207 -1.0316 -0.1977 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | 2.1638 1.1681 -1.3121 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | 0.4650 1.5450 -1.5737 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | -0.3602 -1.3853 -2.4008 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0.0074 -1.2732 -4.1197 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | 1.4879 0.6810 -3.6576 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 2.0316 -0.7782 -2.8399 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 1 2 2 0 0 0 0 23 | 2 4 1 0 0 0 0 24 | 3 5 1 0 0 0 0 25 | 3 7 1 0 0 0 0 26 | 3 8 2 0 0 0 0 27 | 4 6 1 0 0 0 0 28 | 5 6 1 0 0 0 0 29 | 1 9 1 0 0 0 0 30 | 1 10 1 0 0 0 0 31 | 2 11 1 0 0 0 0 32 | 4 12 1 0 0 0 0 33 | 4 13 1 0 0 0 0 34 | 5 14 1 0 0 0 0 35 | 5 15 1 0 0 0 0 36 | 6 16 1 0 0 0 0 37 | 6 17 1 0 0 0 0 38 | M CHG 1 7 -1 39 | M END 40 | > 41 | -7.734579 42 | 43 | $$$$ 44 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G4.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715423D 3 | 4 | 29 28 0 1 0 0 0 0 0999 V2000 5 | -0.3023 -0.8943 -1.9056 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 0.4373 -0.5293 -0.8413 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | 1.0556 1.4485 -5.1381 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | -0.1104 -0.2112 0.5212 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | 1.9350 -0.4263 -0.9512 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | -1.9787 1.0573 -5.6003 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | 0.1827 -1.2245 -3.2898 C 0 0 0 0 0 0 0 0 0 0 0 0 12 | -0.0475 1.5230 -4.0753 C 0 0 0 0 0 0 0 0 0 0 0 0 13 | -0.8663 -0.8574 -4.3441 C 0 0 0 0 0 0 0 0 0 0 0 0 14 | -1.2784 0.6305 -4.3059 C 0 0 2 0 0 0 0 0 0 0 0 0 15 | 2.0098 2.2581 -4.9567 O 0 5 0 0 0 0 0 0 0 0 0 0 16 | 0.8803 0.6125 -6.0669 O 0 0 0 0 0 0 0 0 0 0 0 0 17 | -1.3802 -0.9841 -1.7762 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | -0.1488 -1.1197 1.1320 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | -1.1238 0.1959 0.4987 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | 0.5344 0.5154 1.0259 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 2.2639 0.5732 -1.2544 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 2.3111 -1.1387 -1.6928 H 0 0 0 0 0 0 0 0 0 0 0 0 23 | 2.4012 -0.6500 0.0139 H 0 0 0 0 0 0 0 0 0 0 0 0 24 | -1.3241 0.9347 -6.4681 H 0 0 0 0 0 0 0 0 0 0 0 0 25 | -2.2613 2.1149 -5.5589 H 0 0 0 0 0 0 0 0 0 0 0 0 26 | -2.8879 0.4712 -5.7716 H 0 0 0 0 0 0 0 0 0 0 0 0 27 | 0.3887 -2.3007 -3.3170 H 0 0 0 0 0 0 0 0 0 0 0 0 28 | 1.1330 -0.7307 -3.5143 H 0 0 0 0 0 0 0 0 0 0 0 0 29 | 0.3900 1.2984 -3.0936 H 0 0 0 0 0 0 0 0 0 0 0 0 30 | -0.3600 2.5753 -4.0472 H 0 0 0 0 0 0 0 0 0 0 0 0 31 | -0.4864 -1.1087 -5.3434 H 0 0 0 0 0 0 0 0 0 0 0 0 32 | -1.7539 -1.4826 -4.1850 H 0 0 0 0 0 0 0 0 0 0 0 0 33 | -1.9857 0.7778 -3.4799 H 0 0 0 0 0 0 0 0 0 0 0 0 34 | 1 2 2 0 0 0 0 35 | 1 7 1 0 0 0 0 36 | 2 4 1 0 0 0 0 37 | 2 5 1 0 0 0 0 38 | 3 8 1 0 0 0 0 39 | 3 11 1 0 0 0 0 40 | 3 12 2 0 0 0 0 41 | 6 10 1 0 0 0 0 42 | 7 9 1 0 0 0 0 43 | 8 10 1 0 0 0 0 44 | 9 10 1 0 0 0 0 45 | 1 13 1 0 0 0 0 46 | 4 14 1 0 0 0 0 47 | 4 15 1 0 0 0 0 48 | 4 16 1 0 0 0 0 49 | 5 17 1 0 0 0 0 50 | 5 18 1 0 0 0 0 51 | 5 19 1 0 0 0 0 52 | 6 20 1 0 0 0 0 53 | 6 21 1 0 0 0 0 54 | 6 22 1 0 0 0 0 55 | 7 23 1 0 0 0 0 56 | 7 24 1 0 0 0 0 57 | 8 25 1 0 0 0 0 58 | 8 26 1 0 0 0 0 59 | 9 27 1 0 0 0 0 60 | 9 28 1 0 0 0 0 61 | 10 29 1 0 0 0 0 62 | M CHG 1 11 -1 63 | M END 64 | > 65 | -9.173710 66 | 67 | $$$$ 68 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G5.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715423D 3 | 4 | 17 16 0 1 0 0 0 0 0999 V2000 5 | 0.4721 -0.3596 0.1049 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | -0.6140 0.0086 -0.5838 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | -0.3138 -0.7087 -3.7837 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | -1.6475 1.3143 -4.0310 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | -0.5825 0.9091 -1.7860 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | -1.2344 0.2559 -3.0098 C 0 0 2 0 0 0 0 0 0 0 0 0 11 | 0.5382 -1.3387 -3.0968 O 0 5 0 0 0 0 0 0 0 0 0 0 12 | -0.5250 -0.7473 -5.0305 O 0 0 0 0 0 0 0 0 0 0 0 0 13 | 0.4022 -1.0124 0.9678 H 0 0 0 0 0 0 0 0 0 0 0 0 14 | 1.4547 -0.0073 -0.1892 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | -1.5854 -0.3514 -0.2552 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | -0.7758 1.8832 -4.3717 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | -2.3607 2.0256 -3.5996 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | -2.1200 0.8627 -4.9107 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0.4463 1.2159 -2.0129 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | -1.1278 1.8263 -1.5296 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | -2.1320 -0.2920 -2.6927 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | 1 2 2 0 0 0 0 23 | 2 5 1 0 0 0 0 24 | 3 6 1 0 0 0 0 25 | 3 7 1 0 0 0 0 26 | 3 8 2 0 0 0 0 27 | 4 6 1 0 0 0 0 28 | 5 6 1 0 0 0 0 29 | 1 9 1 0 0 0 0 30 | 1 10 1 0 0 0 0 31 | 2 11 1 0 0 0 0 32 | 4 12 1 0 0 0 0 33 | 4 13 1 0 0 0 0 34 | 4 14 1 0 0 0 0 35 | 5 15 1 0 0 0 0 36 | 5 16 1 0 0 0 0 37 | 6 17 1 0 0 0 0 38 | M CHG 1 7 -1 39 | M END 40 | > 41 | -7.638822 42 | 43 | $$$$ 44 | -------------------------------------------------------------------------------- /examples/SAMPL6-OA/inputs/guests/OA-G6.sdf: -------------------------------------------------------------------------------- 1 | 2 | -OEChem-08221715423D 3 | 4 | 19 18 0 0 0 0 0 0 0999 V2000 5 | -1.3428 0.3977 -4.1555 C 0 0 0 0 0 0 0 0 0 0 0 0 6 | 1.3494 0.8562 -1.6206 C 0 0 0 0 0 0 0 0 0 0 0 0 7 | -0.1465 0.0031 0.1950 C 0 0 0 0 0 0 0 0 0 0 0 0 8 | -0.4127 -0.7040 -3.6398 C 0 0 0 0 0 0 0 0 0 0 0 0 9 | -0.4163 -0.9172 -2.1271 C 0 0 0 0 0 0 0 0 0 0 0 0 10 | -0.0498 0.3297 -1.2978 C 0 0 0 0 0 0 0 0 0 0 0 0 11 | -1.4251 0.5122 -5.4098 O 0 5 0 0 0 0 0 0 0 0 0 0 12 | -1.9062 1.0746 -3.2485 O 0 0 0 0 0 0 0 0 0 0 0 0 13 | 2.1072 0.0897 -1.4250 H 0 0 0 0 0 0 0 0 0 0 0 0 14 | 1.6012 1.7234 -1.0027 H 0 0 0 0 0 0 0 0 0 0 0 0 15 | 1.4304 1.1499 -2.6726 H 0 0 0 0 0 0 0 0 0 0 0 0 16 | 0.5555 -0.7928 0.4655 H 0 0 0 0 0 0 0 0 0 0 0 0 17 | -1.1538 -0.3402 0.4542 H 0 0 0 0 0 0 0 0 0 0 0 0 18 | 0.0812 0.8805 0.8099 H 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0.6080 -0.5200 -3.9934 H 0 0 0 0 0 0 0 0 0 0 0 0 20 | -0.7392 -1.6346 -4.1217 H 0 0 0 0 0 0 0 0 0 0 0 0 21 | 0.2862 -1.7273 -1.8917 H 0 0 0 0 0 0 0 0 0 0 0 0 22 | -1.4072 -1.2739 -1.8180 H 0 0 0 0 0 0 0 0 0 0 0 0 23 | -0.7712 1.1284 -1.5083 H 0 0 0 0 0 0 0 0 0 0 0 0 24 | 1 4 1 0 0 0 0 25 | 1 7 1 0 0 0 0 26 | 1 8 2 0 0 0 0 27 | 2 6 1 0 0 0 0 28 | 3 6 1 0 0 0 0 29 | 4 5 1 0 0 0 0 30 | 5 6 1 0 0 0 0 31 | 2 9 1 0 0 0 0 32 | 2 10 1 0 0 0 0 33 | 2 11 1 0 0 0 0 34 | 3 12 1 0 0 0 0 35 | 3 13 1 0 0 0 0 36 | 3 14 1 0 0 0 0 37 | 4 15 1 0 0 0 0 38 | 4 16 1 0 0 0 0 39 | 5 17 1 0 0 0 0 40 | 5 18 1 0 0 0 0 41 | 6 19 1 0 0 0 0 42 | M CHG 1 7 -1 43 | M END 44 | > 45 | -7.568456 46 | 47 | $$$$ 48 | -------------------------------------------------------------------------------- /examples/configs/amber/membrane/config-fep.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True -------------------------------------------------------------------------------- /examples/configs/amber/membrane/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 10G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True 30 | samples: 20 31 | mdp: 32 | complex: 33 | equi: 34 | 00_min: 35 | nsteps: 100000 36 | 01_nvt: 37 | dt: 0.001 38 | nsteps: 5000 39 | 02_nvt: 40 | dt: 0.001 41 | nsteps: 5000 42 | 03_npt: 43 | dt: 0.001 44 | nsteps: 5000 45 | 04_npt: 46 | dt: 0.002 47 | nsteps: 7500 48 | 05_npt: 49 | dt: 0.002 50 | nsteps: 7500 51 | 06_npt: 52 | dt: 0.003 53 | nsteps: 15000 54 | prod: 55 | dt: 0.004 56 | nsteps: 237500 57 | nstxout-compressed: 11875 58 | mmpbsa: 59 | prod: 60 | dt: 0.004 61 | nsteps: 25000 62 | nstxout-compressed: 1250 63 | mmpbsa: 64 | general: 65 | c2_entropy: 1 66 | interaction_entropy: 1 67 | pb: {} 68 | gb: {} -------------------------------------------------------------------------------- /examples/configs/amber/soluble/config-fep.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True -------------------------------------------------------------------------------- /examples/configs/amber/soluble/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | cluster: 2 | options: 3 | calculation: 4 | # partition: deflt 5 | partition: uds-hub 6 | time: 0-20:00:00 7 | gpus: 1 8 | gres: gpu:1 9 | mem: 5G 10 | job: # optional 11 | # partition: deflt 12 | partition: uds-hub 13 | time: 2-00:00:00 14 | mem: 1G 15 | cpus-per-task: 1 16 | extra_directives: # Optional 17 | dependencies: 18 | # - MODULEPATH="/data/shared/spack/0.21.1+240303/modules:${MODULEPATH}" 19 | # - module add gromacs/2022.4 20 | 21 | - MODULEPATH="/groups/CBG/opt/spack-0.21.0/modules:${MODULEPATH}" 22 | - module add gromacs/2022.4 23 | 24 | - export GMX_MAXBACKUP=-1 25 | mdrun: 26 | all: 27 | cpi: True 28 | stepout: 5000 29 | v: True 30 | samples: 20 31 | mdp: 32 | complex: 33 | equi: 34 | 00_min: 35 | nsteps: 100000 36 | 01_nvt: 37 | dt: 0.002 38 | nsteps: 5000 39 | 02_nvt: 40 | dt: 0.003 41 | nsteps: 5000 42 | 03_npt: 43 | dt: 0.003 44 | nsteps: 7500 45 | 04_npt: 46 | dt: 0.004 47 | nsteps: 15000 48 | prod: 49 | dt: 0.004 50 | nsteps: 237500 51 | nstxout-compressed: 11875 52 | mmpbsa: 53 | prod: 54 | dt: 0.004 55 | nsteps: 25000 56 | nstxout-compressed: 1250 57 | mmpbsa: 58 | general: 59 | c2_entropy: 1 60 | interaction_entropy: 1 61 | pb: {} 62 | gb: {} -------------------------------------------------------------------------------- /examples/configs/config-general-view.yml: -------------------------------------------------------------------------------- 1 | mdp: # optional 2 | ligand: 3 | equi: 4 | : 5 | 6 | : 7 | 8 | fep: 9 | vdw: 10 | : 11 | 12 | : 13 | 14 | coul: 15 | : 16 | 17 | : 18 | 19 | complex: 20 | equi: 21 | : 22 | 23 | : 24 | 25 | fep: 26 | vdw: 27 | : 28 | 29 | : 30 | 31 | coul: 32 | : 33 | 34 | : 35 | 36 | bonded: 37 | : 38 | 39 | : 40 | -------------------------------------------------------------------------------- /github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '00 00 * * 5' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'python' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 3 | 4 | name: tests 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build_ubuntu: 14 | runs-on: ${{ matrix.os }} 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | os: [ubuntu-latest, macOS-latest, windows-latest] 19 | python-version: [3.8, 3.9] 20 | exclude: 21 | - os: macOS-latest 22 | python-version: '3.10' 23 | steps: 24 | - uses: actions/checkout@v3 25 | - name: Setup conda 26 | uses: conda-incubator/setup-miniconda@v2 27 | with: 28 | python-version: ${{ matrix.python-version }} 29 | mamba-version: "*" 30 | channels: conda-forge,defaults,bioconda 31 | channel-priority: true 32 | activate-environment: anaconda-client-env 33 | environment-file: environment.yml 34 | - name: Install pip dependencies and bindflow on test mode 35 | run: | 36 | python -m pip install --upgrade pip 37 | python -m pip install flake8 38 | pip install -e .[test] 39 | python -m pip install pytest-cov 40 | - name: Lint with flake8 41 | run: | 42 | # stop the build if there are Python syntax errors or undefined names 43 | flake8 src/bindflow --count --select=E9,F63,F7,F82 --show-source --statistics 44 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 45 | flake8 src/bindflow --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 46 | echo after "Lint with flake8" My python version is actually: $(python --version). 47 | - name: Test with pytest 48 | run: | 49 | pytest --cov src/bindflow 50 | - name: Upload coverage reports to Codecov with GitHub Action 51 | uses: codecov/codecov-action@v3 -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires=[ 3 | "setuptools>=77.0.0", 4 | "versioningit", 5 | ] 6 | build-backend = "setuptools.build_meta" 7 | 8 | [project.urls] 9 | "Hompage" = "https://github.com/ale94mleon/BindFlow" 10 | "Discussions" = "https://github.com/ale94mleon/BindFlow/discussions" 11 | "Documentation" = "https://BindFlow.readthedocs.io/en/latest/" 12 | "Issues" = "https://github.com/ale94mleon/BindFlow/issues" 13 | 14 | [project] 15 | name = "bindflow" 16 | dynamic = ["version"] 17 | description = "A snakemake-based workflow for binding free energy calculations using GROMACS." 18 | readme = "README.rst" 19 | license-files = ["LICENSE"] 20 | 21 | authors=[ 22 | {name="Alejandro Martínez León", email="ale94mleon@gmail.com"}, 23 | ] 24 | 25 | classifiers = [ 26 | "Development Status :: 2 - Pre-Alpha", 27 | "Operating System :: OS Independent", 28 | "Intended Audience :: Science/Research", 29 | "Programming Language :: Python :: 3", 30 | "Programming Language :: Python :: 3.8", 31 | "Programming Language :: Python :: 3.9", 32 | "Programming Language :: Python :: 3.10", 33 | "Topic :: Scientific/Engineering :: Bio-Informatics", 34 | "Topic :: Scientific/Engineering :: Chemistry" 35 | ] 36 | keywords = [ 37 | "science", 38 | "chemistry", 39 | "biology", 40 | "drug-design" 41 | ] 42 | 43 | requires-python = ">= 3.8 , < 3.11" 44 | dependencies = [ 45 | "alchemlyb >= 2.0.0", 46 | "pymbar >= 4.0.1", 47 | "MDRestraintsGenerator @ git+https://github.com/ale94mleon/MDRestraintsGenerator.git@dev", # Waiting for merge 48 | "numpy", 49 | "pandas", 50 | "mdanalysis", 51 | # "TOFF >= 0.2.0", 52 | "pyyaml", 53 | ] 54 | 55 | [project.optional-dependencies] 56 | dev = ["pytest"] 57 | 58 | [tool.versioningit] 59 | default-version = "1+unknown" 60 | 61 | [tool.versioningit.format] 62 | distance = "{base_version}.post{distance}" 63 | dirty = "{base_version}.post{distance}.dev0" 64 | distance-dirty = "{base_version}.post{distance}.dev0" 65 | 66 | 67 | [tool.versioningit.vcs] 68 | method = "git" 69 | match = ["*"] 70 | default-tag = "0.0.0" 71 | 72 | [tool.versioningit.write] 73 | file = "src/bindflow/_version.py" 74 | 75 | [tool.setuptools] 76 | include-package-data = true 77 | 78 | [tool.setuptools.packages.find] 79 | where = ["src"] 80 | 81 | [tool.setuptools.package-data] 82 | bindflow = [ 83 | "data/gmx_ff/*.tar.gz", 84 | "data/gmx_water_models/*/*.itp", 85 | "data/gmx_water_models/*/*.dat", 86 | "data/gmx_water_models/*.yml", 87 | "data/gmx_water_models/configurations/*.gro", 88 | "data/ci_systems/**/*.yml", 89 | "data/ci_systems/**/*.tar.gz", 90 | "mdp/templates/**/*.mdp", 91 | "mmpbsa_in/templates/*.in", 92 | "rules/**/*.smk", 93 | "rules/**/Snakefile" 94 | ] 95 | 96 | [project.scripts] 97 | bindflow = "bindflow.cli:main" -------------------------------------------------------------------------------- /requirements_docs.txt: -------------------------------------------------------------------------------- 1 | myst-nb 2 | myst-parser 3 | sphinx_book_theme 4 | sphinx==7.2.6 5 | sphinx_design 6 | sphinxcontrib-katex 7 | sphinxcontrib-mermaid 8 | sphinx-inline-tabs 9 | sphinx_copybutton 10 | sphinx-autobuild 11 | roman -------------------------------------------------------------------------------- /src/bindflow/__init__.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | from bindflow._version import __version__ 4 | 5 | pkg_root_path = Path(__file__).resolve().parent 6 | -------------------------------------------------------------------------------- /src/bindflow/data/ci_systems/WP6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/data/ci_systems/WP6.tar.gz -------------------------------------------------------------------------------- /src/bindflow/data/ci_systems/config-fep.yml: -------------------------------------------------------------------------------- 1 | extra_directives: # Optional 2 | dependencies: 3 | # - 'source /data/shared/spack-0.19.1/shared.bash' 4 | # - 'module load gromacs/2022.4' 5 | - 'export GMX_MAXBACKUP=-1' 6 | # Needed mainly for MacOS with Metal chips and for testing 7 | # if the GPU wants to be used. Highly discouraged for production! 8 | # See: 9 | # https://manual.gromacs.org/current/user-guide/environment-variables.html 10 | # https://gromacs.bioexcel.eu/t/does-gromacs-supports-gpu-acceleration-on-m1-mac/3466 11 | - 'export GMX_GPU_DISABLE_COMPATIBILITY_CHECK=1' 12 | mdrun: 13 | all: 14 | cpi: False 15 | stepout: 5000 16 | v: True 17 | nwindows: # optional 18 | ligand: 19 | vdw: 6 20 | coul: 6 21 | complex: 22 | vdw: 6 23 | coul: 6 24 | bonded: 6 25 | mdp: # optional 26 | ligand: 27 | equi: 28 | 01_nvt: 29 | nsteps: 25 30 | 02_nvt: 31 | nsteps: 25 32 | 03_npt: 33 | nsteps: 25 34 | prod: 35 | nsteps: 250 36 | fep: 37 | vdw: 38 | 01_nvt: 39 | nsteps: 25 40 | 02_npt: 41 | nsteps: 25 42 | 03_npt_norest: 43 | nsteps: 25 44 | prod: 45 | nsteps: 250 46 | coul: 47 | 01_nvt: 48 | nsteps: 25 49 | 02_npt: 50 | nsteps: 25 51 | 03_npt_norest: 52 | nsteps: 25 53 | prod: 54 | nsteps: 250 55 | complex: 56 | equi: 57 | 01_nvt: 58 | nsteps: 25 59 | 02_nvt: 60 | nsteps: 25 61 | 03_npt: 62 | nsteps: 25 63 | 04_npt: 64 | nsteps: 25 65 | prod: 66 | nsteps: 250 67 | fep: 68 | vdw: 69 | 01_nvt: 70 | nsteps: 25 71 | 02_npt: 72 | nsteps: 25 73 | 03_npt_norest: 74 | nsteps: 25 75 | prod: 76 | nsteps: 250 77 | coul: 78 | 01_nvt: 79 | nsteps: 25 80 | 02_npt: 81 | nsteps: 25 82 | 03_npt_norest: 83 | nsteps: 25 84 | prod: 85 | nsteps: 250 86 | bonded: 87 | 01_nvt: 88 | nsteps: 25 89 | 02_npt: 90 | nsteps: 25 91 | 03_npt_norest: 92 | nsteps: 25 93 | prod: 94 | nsteps: 250 95 | -------------------------------------------------------------------------------- /src/bindflow/data/ci_systems/config-mmpbsa.yml: -------------------------------------------------------------------------------- 1 | extra_directives: # Optional 2 | dependencies: 3 | # - 'source /data/shared/spack-0.19.1/shared.bash' 4 | # - 'module load gromacs/2022.4' 5 | - 'export GMX_MAXBACKUP=-1' 6 | # Needed mainly for MacOS with Metal chips and for testing 7 | # if the GPU wants to be used. Highly discouraged for production! 8 | # See: 9 | # https://manual.gromacs.org/current/user-guide/environment-variables.html 10 | # https://gromacs.bioexcel.eu/t/does-gromacs-supports-gpu-acceleration-on-m1-mac/3466 11 | - 'export GMX_GPU_DISABLE_COMPATIBILITY_CHECK=1' 12 | mdrun: 13 | all: 14 | cpi: False 15 | stepout: 5000 16 | v: True 17 | samples: 2 # optional 18 | mdp: # optional 19 | complex: 20 | equi: 21 | 00_min: 22 | nsteps: 100 23 | 01_nvt: 24 | dt: 0.002 25 | nsteps: 500 26 | 02_nvt: 27 | dt: 0.003 28 | nsteps: 200 29 | 03_npt: 30 | dt: 0.003 31 | nsteps: 200 32 | 04_npt: 33 | dt: 0.004 34 | nsteps: 200 35 | prod: 36 | dt: 0.004 37 | nsteps: 400 38 | nstxout-compressed: 40 39 | mmpbsa: 40 | prod: 41 | dt: 0.004 42 | nsteps: 400 43 | nstxout-compressed: 40 44 | mmpbsa: 45 | general: 46 | c2_entropy: 1 47 | qh_entropy: 1 48 | interaction_entropy: 1 49 | startframe: 5 # recommended burn phase to skip frames directly after the split 50 | pb: {} 51 | gb: {} -------------------------------------------------------------------------------- /src/bindflow/data/gmx_ff/Slipids_2020.ff.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/data/gmx_ff/Slipids_2020.ff.tar.gz -------------------------------------------------------------------------------- /src/bindflow/data/gmx_ff/amber99sb-star-ildn.ff.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/data/gmx_ff/amber99sb-star-ildn.ff.tar.gz -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/README.md: -------------------------------------------------------------------------------- 1 | # Descriptions of files and force fields 2 | 3 | All configuration and topology files are sourced from GROMACS force fields, available at [GROMACS GitLab - share/top](https://gitlab.com/gromacs/gromacs/-/tree/main/share/top?ref_type=heads). These files contain topologies and configurations for water models and ions within three force field families: AMBER, CHARMM, and OPLS-AA. 4 | 5 | It is assumed that inside the same family, the non-bonded interactions are the same (`epsilon` and `sigma` parameters), which is true for the force fields presented in the GROMACS distribution. 6 | 7 | The `ffnonbonded.itp` for each family was taken from: 8 | 9 | * AMBER: amber99sb-ildn 10 | * CHARMM: charmm27 11 | * OPLS-AA: oplsaa 12 | 13 | These `ffnonbonded.itp` files were modified to retain only the `[ atomtypes ]` section, including only atom types related to the water models and ions. This modification prevents potential conflicts with atom-type definitions from user-provided force fields. 14 | 15 | The available force fields and their corresponding configuration files are: 16 | 17 | ```yaml 18 | amber: 19 | spc: spc216.gro 20 | spce: spc216.gro 21 | tip3p: spc216.gro 22 | tip4p: tip4p.gro 23 | tip4pew: tip4p.gro 24 | tip5p: tip5p.gro 25 | charmm: 26 | spc: spc216.gro 27 | spce: spc216.gro 28 | tip3p: spc216.gro 29 | tip4p: tip4p.gro 30 | tip5p: tip5p.gro 31 | tips3p: spc216.gro 32 | oplsaa: 33 | spc: spc216.gro 34 | spce: spc216.gro 35 | tip3p: spc216.gro 36 | tip4p: tip4p.gro 37 | tip4pew: tip4p.gro 38 | tip5p: tip5p.gro 39 | tip5pe: tip5p.gro 40 | ``` 41 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/ffnonbonded.itp: -------------------------------------------------------------------------------- 1 | [ atomtypes ] 2 | ; name at.num mass charge ptype sigma epsilon 3 | C0 20 40.08 0.0000 A 3.05240e-01 1.92376e+00 4 | HW 1 1.008 0.0000 A 0.00000e+00 0.00000e+00 5 | Cl 17 35.45 0.0000 A 4.40104e-01 4.18400e-01 6 | Na 11 22.99 0.0000 A 3.32840e-01 1.15897e-02 7 | IB 0 131.0 0.0000 A 8.90899e-01 4.18400e-01 8 | MG 12 24.305 0.0000 A 1.41225e-01 3.74342e+00 9 | OW 8 16.00 0.0000 A 3.15061e-01 6.36386e-01 10 | K 19 39.10 0.0000 A 4.73602e-01 1.37235e-03 11 | Rb 37 85.47 0.0000 A 5.26699e-01 7.11280e-04 12 | Cs 55 132.91 0.0000 A 6.04920e-01 3.37230e-04 13 | ; spc water - use only with spc.itp & settles 14 | OW_spc 8 15.9994 0.0000 A 3.16557e-01 6.50629e-01 15 | HW_spc 1 1.0080 0.0000 A 0.00000e+00 0.00000e+00 16 | Li 3 6.94 0.0000 A 2.02590e-01 7.65672e-02 17 | Zn 30 65.4 0.0000 A 1.95998e-01 5.23000e-02 18 | ;tip4p-EW 19 | HW_tip4pew 1 1.008 0.0000 A 0.00000e+00 0.00000e+00 20 | OW_tip4pew 8 16.00 0.0000 A 3.16435e-01 6.80946e-01 21 | ; tip4p 22 | HW_tip4p 1 1.008 0.0000 A 0.00000e+00 0.00000e+00 23 | OW_tip4p 8 16.00 0.0000 A 3.15365e-01 6.48520e-01 24 | ;tip5p 25 | HW_tip5p 1 1.008 0.0000 A 0.00000e+00 0.00000e+00 26 | OW_tip5p 8 16.00 0.0000 A 3.12000e-01 6.69440e-01 27 | ; dummy defs 28 | ; MW=Dummy mass for tip4p/EW/5p water extra point charge 29 | MW 0 0.0000 0.0000 D 0.00000e+00 0.00000e+00 -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/ions.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | IB+ 1 ; big positive ion 4 | 5 | [ atoms ] 6 | ; id at type res nr residu name at name cg nr charge 7 | 1 IB 1 IB+ IB 1 1.00000 8 | 9 | 10 | [ moleculetype ] 11 | ; molname nrexcl 12 | CA 1 13 | 14 | [ atoms ] 15 | ; id at type res nr residu name at name cg nr charge 16 | 1 C0 1 CA CA 1 2.00000 17 | 18 | 19 | [ moleculetype ] 20 | ; molname nrexcl 21 | CL 1 22 | 23 | [ atoms ] 24 | ; id at type res nr residu name at name cg nr charge 25 | 1 Cl 1 CL CL 1 -1.00000 26 | 27 | 28 | [ moleculetype ] 29 | ; molname nrexcl 30 | NA 1 31 | 32 | [ atoms ] 33 | ; id at type res nr residu name at name cg nr charge 34 | 1 Na 1 NA NA 1 1.00000 35 | 36 | 37 | [ moleculetype ] 38 | ; molname nrexcl 39 | MG 1 40 | 41 | [ atoms ] 42 | ; id at type res nr residu name at name cg nr charge 43 | 1 MG 1 MG MG 1 2.00000 44 | 45 | 46 | [ moleculetype ] 47 | ; molname nrexcl 48 | K 1 49 | 50 | [ atoms ] 51 | ; id at type res nr residu name at name cg nr charge 52 | 1 K 1 K K 1 1.00000 53 | 54 | 55 | [ moleculetype ] 56 | ; molname nrexcl 57 | RB 1 58 | 59 | [ atoms ] 60 | ; id at type res nr residu name at name cg nr charge 61 | 1 Rb 1 RB RB 1 1.00000 62 | 63 | 64 | [ moleculetype ] 65 | ; molname nrexcl 66 | CS 1 67 | 68 | [ atoms ] 69 | ; id at type res nr residu name at name cg nr charge 70 | 1 Cs 1 CS CS 1 1.00000 71 | 72 | 73 | [ moleculetype ] 74 | ; molname nrexcl 75 | LI 1 76 | 77 | [ atoms ] 78 | ; id at type res nr residu name at name cg nr charge 79 | 1 Li 1 LI LI 1 1.00000 80 | 81 | 82 | [ moleculetype ] 83 | ; molname nrexcl 84 | ZN 1 85 | 86 | [ atoms ] 87 | ; id at type res nr residu name at name cg nr charge 88 | 1 Zn 1 ZN ZN 1 2.00000 89 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/spc.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr res name at name cg nr charge mass 7 | 1 OW_spc 1 SOL OW 1 -0.82 15.99940 8 | 2 HW_spc 1 SOL HW1 1 0.41 1.00800 9 | 3 HW_spc 1 SOL HW2 1 0.41 1.00800 10 | 11 | #ifndef FLEXIBLE 12 | 13 | [ settles ] 14 | ; OW funct doh dhh 15 | 1 1 0.1 0.16330 16 | 17 | [ exclusions ] 18 | 1 2 3 19 | 2 1 3 20 | 3 1 2 21 | 22 | #else 23 | 24 | [ bonds ] 25 | ; i j funct length force.c. 26 | 1 2 1 0.1 345000 0.1 345000 27 | 1 3 1 0.1 345000 0.1 345000 28 | 29 | [ angles ] 30 | ; i j k funct angle force.c. 31 | 2 1 3 1 109.47 383 109.47 383 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/spce.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr res name at name cg nr charge mass 7 | 1 OW_spc 1 SOL OW 1 -0.8476 15.99940 8 | 2 HW_spc 1 SOL HW1 1 0.4238 1.00800 9 | 3 HW_spc 1 SOL HW2 1 0.4238 1.00800 10 | 11 | #ifndef FLEXIBLE 12 | 13 | [ settles ] 14 | ; OW funct doh dhh 15 | 1 1 0.1 0.16330 16 | 17 | [ exclusions ] 18 | 1 2 3 19 | 2 1 3 20 | 3 1 2 21 | 22 | #else 23 | 24 | [ bonds ] 25 | ; i j funct length force.c. 26 | 1 2 1 0.1 345000 0.1 345000 27 | 1 3 1 0.1 345000 0.1 345000 28 | 29 | [ angles ] 30 | ; i j k funct angle force.c. 31 | 2 1 3 1 109.47 383 109.47 383 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/tip3p.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr res name at name cg nr charge mass 7 | 1 OW 1 SOL OW 1 -0.834 16.00000 8 | 2 HW 1 SOL HW1 1 0.417 1.00800 9 | 3 HW 1 SOL HW2 1 0.417 1.00800 10 | 11 | #ifndef FLEXIBLE 12 | 13 | [ settles ] 14 | ; OW funct doh dhh 15 | 1 1 0.09572 0.15139 16 | 17 | [ exclusions ] 18 | 1 2 3 19 | 2 1 3 20 | 3 1 2 21 | 22 | #else 23 | 24 | [ bonds ] 25 | ; i j funct length force_constant 26 | 1 2 1 0.09572 502416.0 0.09572 502416.0 27 | 1 3 1 0.09572 502416.0 0.09572 502416.0 28 | 29 | 30 | [ angles ] 31 | ; i j k funct angle force_constant 32 | 2 1 3 1 104.52 628.02 104.52 628.02 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/tip4p.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr res name at name cg nr charge mass 7 | 1 OW_tip4p 1 SOL OW 1 0 16.00000 8 | 2 HW_tip4p 1 SOL HW1 1 0.52 1.00800 9 | 3 HW_tip4p 1 SOL HW2 1 0.52 1.00800 10 | 4 MW 1 SOL MW 1 -1.04 0.00000 11 | 12 | #ifndef FLEXIBLE 13 | 14 | [ settles ] 15 | ; i funct doh dhh 16 | 1 1 0.09572 0.15139 17 | 18 | #else 19 | 20 | [ bonds ] 21 | ; i j funct length force.c. 22 | 1 2 1 0.09572 502416.0 0.09572 502416.0 23 | 1 3 1 0.09572 502416.0 0.09572 502416.0 24 | 25 | [ angles ] 26 | ; i j k funct angle force.c. 27 | 2 1 3 1 104.52 628.02 104.52 628.02 28 | 29 | #endif 30 | 31 | 32 | [ virtual_sites3 ] 33 | ; Vsite from funct a b 34 | 4 1 2 3 1 0.128012065 0.128012065 35 | 36 | 37 | [ exclusions ] 38 | 1 2 3 4 39 | 2 1 3 4 40 | 3 1 2 4 41 | 4 1 2 3 42 | 43 | 44 | ; The position of the virtual site is computed as follows: 45 | ; 46 | ; O 47 | ; 48 | ; V 49 | ; 50 | ; H H 51 | ; 52 | ; const = distance (OV) / [ cos (angle(VOH)) * distance (OH) ] 53 | ; 0.015 nm / [ cos (52.26 deg) * 0.09572 nm ] 54 | ; 55 | ; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1) 56 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/tip4pew.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr res name at name cg nr charge mass 7 | 1 OW_tip4pew 1 SOL OW 1 0 16.00000 8 | 2 HW_tip4pew 1 SOL HW1 1 0.52422 1.00800 9 | 3 HW_tip4pew 1 SOL HW2 1 0.52422 1.00800 10 | 4 MW 1 SOL MW 1 -1.04844 0.00000 11 | 12 | #ifndef FLEXIBLE 13 | 14 | [ settles ] 15 | ; i funct doh dhh 16 | 1 1 0.09572 0.15139 17 | 18 | #else 19 | [ bonds ] 20 | ; i j funct length force.c. 21 | 1 2 1 0.09572 502416.0 0.09572 502416.0 22 | 1 3 1 0.09572 502416.0 0.09572 502416.0 23 | 24 | [ angles ] 25 | ; i j k funct angle force.c. 26 | 2 1 3 1 104.52 628.02 104.52 628.02 27 | 28 | #endif 29 | 30 | 31 | [ virtual_sites3 ] 32 | ; Vsite from funct a b 33 | 4 1 2 3 1 0.106676721 0.106676721 34 | 35 | 36 | [ exclusions ] 37 | 1 2 3 4 38 | 2 1 3 4 39 | 3 1 2 4 40 | 4 1 2 3 41 | 42 | 43 | ; The position of the virtual site is computed as follows: 44 | ; 45 | ; O 46 | ; 47 | ; V 48 | ; 49 | ; H H 50 | ; 51 | ; Ewald tip4p: 52 | ; const = distance (OV) / [ cos (angle(VOH)) * distance (OH) ] 53 | ; 0.0125 nm / [ cos (52.26 deg) * 0.09572 nm ] 54 | ; then a = b = 0.5 * const = 0.106676721 55 | ; 56 | ; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1) 57 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/tip5p.itp: -------------------------------------------------------------------------------- 1 | ; original reference: [M. W. Mahoney and W. L. Jorgensen, J. Chem. Phys. 112 , 2000] 2 | ; 3 | ; Note that there are various issues with tip5p and the different forcefields. 4 | ; Discussion is here: https://gitlab.com/gromacs/gromacs/-/issues/1348 5 | 6 | [ moleculetype ] 7 | ; molname nrexcl 8 | SOL 2 9 | 10 | [ atoms ] 11 | ; id at type res nr res name at name cg nr charge mass 12 | 1 OW_tip5p 1 SOL OW 1 0 16.00000 13 | 2 HW_tip5p 1 SOL HW1 1 0.241 1.00800 14 | 3 HW_tip5p 1 SOL HW2 1 0.241 1.00800 15 | 4 MW 1 SOL LP1 1 -0.241 0.00000 16 | 5 MW 1 SOL LP2 1 -0.241 0.00000 17 | 18 | #ifndef FLEXIBLE 19 | 20 | [ settles ] 21 | ; i funct doh dhh 22 | 1 1 0.09572 0.15139 23 | 24 | #else 25 | 26 | [ bonds ] 27 | ; i j funct length force.c. 28 | 1 2 1 0.09572 502416.0 0.09572 502416.0 29 | 1 3 1 0.09572 502416.0 0.09572 502416.0 30 | 31 | [ angles ] 32 | ; i j k funct angle force.c. 33 | 2 1 3 1 104.52 628.02 104.52 628.02 34 | 35 | #endif 36 | 37 | 38 | [ virtual_sites3 ] 39 | ; Vsite from funct a b c 40 | 4 1 2 3 4 -0.344908262 -0.34490826 -6.4437903493 41 | 5 1 2 3 4 -0.344908262 -0.34490826 6.4437903493 42 | 43 | 44 | [ exclusions ] 45 | 1 2 3 4 5 46 | 2 1 3 4 5 47 | 3 1 2 4 5 48 | 4 1 2 3 5 49 | 5 1 2 3 4 50 | 51 | 52 | ; The positions of the vsites are computed as follows: 53 | ; 54 | ; LP1 LP2 55 | ; 56 | ; O 57 | ; 58 | ; H1 H2 59 | ; 60 | ; angle A (H1-O-H2) = 104.52 61 | ; angle B (M1-O-M2) = 109.47 62 | ; dist C (H-O) = 0.09572 nm 63 | ; dist D (M-O) = 0.070 nm 64 | ; 65 | ;atom x y z 66 | ;O 0.0 0.0 0.0 67 | ;H1 0.585882276 0.756950327 0.0 68 | ;H2 0.585882276 -0.756950327 0.0 69 | ;M1 -0.404151276 0.0 0.571543301 70 | ;M2 -0.404151276 0.0 -0.571543301 71 | ; Dummy pos x4 = x1 + a4*(x2-x1) + b4*(x3-x1) + c4*((x2-x1) x (x3-x1)) 72 | ; Dummy pos x5 = x1 + a5*(x2-x1) + b5*(x3-x1) + c5*((x2-x1) x (x3-x1)) 73 | ; a4 = b4 = a5 = b5 = (D*cos(B/2)) / (2*C*cos(A/2)) = -0.34490826 74 | ; c5 = -c4 = (D * sin(B/2))/ (C^2 * sin(A)) = 6.4437903 75 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/amber/watermodels.dat: -------------------------------------------------------------------------------- 1 | tip3p TIP3P TIP 3-point, recommended 2 | tip4p TIP4P TIP 4-point 3 | tip4pew TIP4P-Ew TIP 4-point optimized with Ewald 4 | tip5p TIP5P TIP 5-point (see https://gitlab.com/gromacs/gromacs/-/issues/1348 for issues) 5 | spc SPC simple point charge 6 | spce SPC/E extended simple point charge 7 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/ffnonbonded.itp: -------------------------------------------------------------------------------- 1 | [ atomtypes ] 2 | ;name at.num mass charge ptype sigma epsilon 3 | H 1 1.008000 0.31 A 0.0400013524445 0.192464 4 | #ifdef HEAVY_H 5 | HT 1 4.032 0.417 A 0.0400013524445 0.192464 ; CHARMM TIP3p H 6 | #else 7 | HT 1 1.008000 0.417 A 0.0400013524445 0.192464 8 | #endif 9 | OC 8 15.999400 -0.76 A 0.302905564168 0.50208 10 | OT 8 15.999400 -0.834 A 0.315057422683 0.6363864 11 | #ifdef HEAVY_H 12 | OT 8 9.951400 -0.834 A 0.315057422683 0.6363864 ; CHARMM TIP3p O 13 | #endif 14 | SOD 11 22.989770 1.00 A 0.242992625373 0.1962296 15 | POT 19 39.102000 1.00 A 0.314264522824 0.364008 16 | CLA 17 35.450000 -1.00 A 0.404468018036 0.6276 17 | CAL 20 40.080000 2.00 A 0.24357170954 0.50208 18 | MG 12 24.305000 2.00 A 0.211142996199 0.06276 19 | CES 55 132.900000 1.00 A 0.374177461619 0.79496 20 | ZN 30 65.370000 2.00 A 0.194215920555 1.046 21 | ; The following atom types are NOT part of the CHARMM distribution 22 | ; atomtypes for additional water models 23 | #ifdef HEAVY_H 24 | OWT3 8 9.951400 -0.834 A 3.15058e-01 6.36386e-01 ; TIP3p O 25 | HWT3 1 4.032000 0.417 A 0.0 0.0 ; TIP3p H 26 | OWT4 8 9.951400 0.0 A 3.15365e-01 6.48520e-01 ; TIP4p O 27 | HWT4 1 4.032000 0.52 A 0.0 0.0 ; TIP4p H 28 | MWT4 0 0.000000 -1.04 D 0.0 0.0 ; TIP4p vsite 29 | OWT5 8 9.951400 0.0 A 3.12000e-01 6.69440e-01 ; TIP5p O 30 | HWT5 1 4.032000 0.241 A 0.0 0.0 ; TIP5p H 31 | MWT5 0 0.000000 -0.241 D 0.0 0.0 ; TIP5p vsite 32 | OW 8 9.951400 -0.82 A 3.16557e-01 6.50194e-01 ; SPC 0 33 | HW 1 4.032000 0.41 A 0.0 0.0; SPC H 34 | #else 35 | OWT3 8 15.999400 -0.834 A 3.15058e-01 6.36386e-01 ; TIP3p O 36 | HWT3 1 1.008000 0.417 A 0.0 0.0 ; TIP3p H 37 | OWT4 8 15.999400 0.0 A 3.15365e-01 6.48520e-01 ; TIP4p O 38 | HWT4 1 1.008000 0.52 A 0.0 0.0 ; TIP4p H 39 | MWT4 0 0.000000 -1.04 D 0.0 0.0 ; TIP4p vsite 40 | OWT5 8 15.999400 0.0 A 3.12000e-01 6.69440e-01 ; TIP5p O 41 | HWT5 1 1.008000 0.241 A 0.0 0.0 ; TIP5p H 42 | MWT5 0 0.000000 -0.241 D 0.0 0.0 ; TIP5p vsite 43 | OW 8 15.999400 -0.82 A 3.16557e-01 6.50194e-01 ; SPC O 44 | HW 1 1.008000 0.41 A 0.0 0.0 ; SPC H 45 | #endif -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/ions.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] ; added by Bjelkmar Jan 2010, from c32b1/toppar/stream/toppar_water_ions.str 2 | ; molname nrexcl 3 | OH 1 4 | 5 | [ atoms ] 6 | ; id at type res nr residu name at name cg nr charge mass 7 | 1 OC 1 OH O1 1 -1.32 8 | 2 H 1 OH H1 1 0.32 9 | 10 | [ bonds ] 11 | ;i j funct length force.c. 12 | 1 2 1 0.09700 456056 ; hydroxyl bond 13 | 14 | [ moleculetype ] 15 | ; molname nrexcl 16 | NA 1 17 | 18 | [ atoms ] 19 | ; id at type res nr residu name at name cg nr charge 20 | 1 SOD 1 NA NA 1 1 21 | 22 | [ moleculetype ] 23 | ; molname nrexcl 24 | MG 1 25 | 26 | [ atoms ] 27 | ; id at type res nr residu name at name cg nr charge 28 | 1 MG 1 MG MG 1 2 29 | 30 | [ moleculetype ] 31 | ; molname nrexcl 32 | K 1 33 | 34 | [ atoms ] 35 | ; id at type res nr residu name at name cg nr charge 36 | 1 POT 1 K K 1 1 37 | 38 | [ moleculetype ] 39 | ; molname nrexcl 40 | CS 1 41 | 42 | [ atoms ] 43 | ; id at type res nr residu name at name cg nr charge 44 | 1 CES 1 CS CS 1 1 45 | 46 | [ moleculetype ] 47 | ; molname nrexcl 48 | CA 1 49 | 50 | [ atoms ] 51 | ; id at type res nr residu name at name cg nr charge 52 | 1 CAL 1 CA CA 1 2 53 | 54 | [ moleculetype ] 55 | ; molname nrexcl 56 | CL 1 57 | 58 | [ atoms ] 59 | ; id at type res nr residu name at name cg nr charge 60 | 1 CLA 1 CL CL 1 -1 61 | 62 | [ moleculetype ] 63 | ; molname nrexcl 64 | ZN 1 65 | 66 | [ atoms ] 67 | ; id at type res nr residu name at name cg nr charge 68 | 1 ZN 1 ZN ZN 1 2 69 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/spc.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; nr type resnr residue atom cgnr charge mass 7 | 1 OW 1 SOL OW 1 -0.82 8 | 2 HW 1 SOL HW1 1 0.41 9 | 3 HW 1 SOL HW2 1 0.41 10 | 11 | #ifndef FLEXIBLE 12 | [ settles ] 13 | ; OW funct doh dhh 14 | 1 1 0.1 0.16330 15 | 16 | [ exclusions ] 17 | 1 2 3 18 | 2 1 3 19 | 3 1 2 20 | #else 21 | [ bonds ] 22 | ; i j funct length force.c. 23 | 1 2 1 0.1 345000 0.1 345000 24 | 1 3 1 0.1 345000 0.1 345000 25 | 26 | [ angles ] 27 | ; i j k funct angle force.c. 28 | 2 1 3 1 109.47 383 109.47 383 29 | #endif 30 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/spce.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; nr type resnr residue atom cgnr charge mass 7 | 1 OW 1 SOL OW 1 -0.8476 8 | 2 HW 1 SOL HW1 1 0.4238 9 | 3 HW 1 SOL HW2 1 0.4238 10 | 11 | #ifndef FLEXIBLE 12 | [ settles ] 13 | ; OW funct doh dhh 14 | 1 1 0.1 0.16330 15 | 16 | [ exclusions ] 17 | 1 2 3 18 | 2 1 3 19 | 3 1 2 20 | #else 21 | [ bonds ] 22 | ; i j funct length force.c. 23 | 1 2 1 0.1 345000 0.1 345000 24 | 1 3 1 0.1 345000 0.1 345000 25 | 26 | [ angles ] 27 | ; i j k funct angle force.c. 28 | 2 1 3 1 109.47 383 109.47 383 29 | #endif 30 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/tip3p.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr residu name at name cg nr charge 7 | ; #ifdef _FF_CHARMM 8 | 1 OWT3 1 SOL OW 1 -0.834 9 | 2 HWT3 1 SOL HW1 1 0.417 10 | 3 HWT3 1 SOL HW2 1 0.417 11 | ; #endif 12 | 13 | 14 | #ifdef FLEXIBLE 15 | 16 | #ifdef CHARMM_TIP3P 17 | [ bonds ] 18 | ; i j funct length force.c. 19 | 1 2 1 0.09572 376560.0 0.09572 376560.0 20 | 1 3 1 0.09572 376560.0 0.09572 376560.0 21 | 22 | [ angles ] 23 | ; i j k funct angle force.c. 24 | 2 1 3 1 104.52 460.24 104.52 460.24 25 | #else 26 | [ bonds ] 27 | ; i j funct length force.c. 28 | 1 2 1 0.09572 502416.0 0.09572 502416.0 29 | 1 3 1 0.09572 502416.0 0.09572 502416.0 30 | 31 | [ angles ] 32 | ; i j k funct angle force.c. 33 | 2 1 3 1 104.52 628.02 104.52 628.02 34 | #endif 35 | 36 | 37 | #else 38 | [ settles ] 39 | ; i j funct length 40 | 1 1 0.09572 0.15139 41 | 42 | [ exclusions ] 43 | 1 2 3 44 | 2 1 3 45 | 3 1 2 46 | #endif 47 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/tip4p.itp: -------------------------------------------------------------------------------- 1 | ; 2 | ; Note the strange order of atoms to make it faster in gromacs. 3 | ; 4 | [ moleculetype ] 5 | ; molname nrexcl 6 | SOL 2 7 | 8 | [ atoms ] 9 | ; id at type res nr residu name at name cg nr charge 10 | 1 OWT4 1 SOL OW 1 0.0 11 | 2 HWT4 1 SOL HW1 1 0.52 12 | 3 HWT4 1 SOL HW2 1 0.52 13 | 4 MWT4 1 SOL MW 1 -1.04 14 | 15 | #ifndef FLEXIBLE 16 | [ settles ] 17 | ; OW funct doh dhh 18 | 1 1 0.09572 0.15139 19 | #else 20 | [ bonds ] 21 | ; i j funct length force.c. 22 | 1 2 1 0.09572 502416.0 0.09572 502416.0 23 | 1 3 1 0.09572 502416.0 0.09572 502416.0 24 | 25 | [ angles ] 26 | ; i j k funct angle force.c. 27 | 2 1 3 1 104.52 628.02 104.52 628.02 28 | #endif 29 | 30 | [ exclusions ] 31 | 1 2 3 4 32 | 2 1 3 4 33 | 3 1 2 4 34 | 4 1 2 3 35 | 36 | ; The position of the virtual site is computed as follows: 37 | ; 38 | ; O 39 | ; 40 | ; D 41 | ; 42 | ; H H 43 | ; 44 | ; const = distance (OD) / [ cos (angle(DOH)) * distance (OH) ] 45 | ; 0.015 nm / [ cos (52.26 deg) * 0.09572 nm ] 46 | 47 | ; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1) 48 | 49 | [ virtual_sites3 ] 50 | ; Vsite from funct a b 51 | 4 1 2 3 1 0.128012065 0.128012065 52 | 53 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/tip5p.itp: -------------------------------------------------------------------------------- 1 | ; original reference: [M. W. Mahoney and W. L. Jorgensen, J. Chem. Phys. 112 , 2000] 2 | ; 3 | ; Note that there are various issues with tip5p and the different forcefields. 4 | ; Discussion is here: https://gitlab.com/gromacs/gromacs/-/issues/1348 5 | 6 | [ moleculetype ] 7 | ; molname nrexcl 8 | SOL 2 9 | 10 | [ atoms ] 11 | ; id at type res nr res name at name cg nr charge mass 12 | 1 OWT5 1 SOL OW 1 0 15.99940 13 | 2 HWT5 1 SOL HW1 1 0.241 1.00800 14 | 3 HWT5 1 SOL HW2 1 0.241 1.00800 15 | 4 MWT5 1 SOL LP1 1 -0.241 0.00000 16 | 5 MWT5 1 SOL LP2 1 -0.241 0.00000 17 | 18 | #ifndef FLEXIBLE 19 | 20 | [ settles ] 21 | ; i funct doh dhh 22 | 1 1 0.09572 0.15139 23 | 24 | #else 25 | 26 | [ bonds ] 27 | ; i j funct length force.c. 28 | 1 2 1 0.09572 502416.0 0.09572 502416.0 29 | 1 3 1 0.09572 502416.0 0.09572 502416.0 30 | 31 | [ angles ] 32 | ; i j k funct angle force.c. 33 | 2 1 3 1 104.52 628.02 104.52 628.02 34 | 35 | #endif 36 | 37 | 38 | [ virtual_sites3 ] 39 | ; Vsite from funct a b c 40 | 4 1 2 3 4 -0.344908262 -0.34490826 -6.4437903493 41 | 5 1 2 3 4 -0.344908262 -0.34490826 6.4437903493 42 | 43 | 44 | [ exclusions ] 45 | 1 2 3 4 5 46 | 2 1 3 4 5 47 | 3 1 2 4 5 48 | 4 1 2 3 5 49 | 5 1 2 3 4 50 | 51 | 52 | ; The positions of the vsites are computed as follows: 53 | ; 54 | ; LP1 LP2 55 | ; 56 | ; O 57 | ; 58 | ; H1 H2 59 | ; 60 | ; angle A (H1-O-H2) = 104.52 61 | ; angle B (M1-O-M2) = 109.47 62 | ; dist C (H-O) = 0.09572 nm 63 | ; dist D (M-O) = 0.070 nm 64 | ; 65 | ;atom x y z 66 | ;O 0.0 0.0 0.0 67 | ;H1 0.585882276 0.756950327 0.0 68 | ;H2 0.585882276 -0.756950327 0.0 69 | ;M1 -0.404151276 0.0 0.571543301 70 | ;M2 -0.404151276 0.0 -0.571543301 71 | ; Dummy pos x4 = x1 + a4*(x2-x1) + b4*(x3-x1) + c4*((x2-x1) x (x3-x1)) 72 | ; Dummy pos x5 = x1 + a5*(x2-x1) + b5*(x3-x1) + c5*((x2-x1) x (x3-x1)) 73 | ; a4 = b4 = a5 = b5 = (D*cos(B/2)) / (2*C*cos(A/2)) = -0.34490826 74 | ; c5 = -c4 = (D * sin(B/2))/ (C^2 * sin(A)) = 6.4437903 75 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/tips3p.itp: -------------------------------------------------------------------------------- 1 | ; CHARMM TIP3P [MacKerell et al. J Phys Chem B, 1998] with LJ interaction 2 | ; sites on the hydrogens, about 2 times slower than the original TIP3P model 3 | 4 | [ moleculetype ] 5 | ; molname nrexcl 6 | SOL 2 7 | 8 | [ atoms ] 9 | ; id at type res nr residu name at name cg nr charge 10 | 1 OT 1 SOL OW 1 -0.834 11 | 2 HT 1 SOL HW1 1 0.417 12 | 3 HT 1 SOL HW2 1 0.417 13 | 14 | #ifndef FLEXIBLE 15 | [ settles ] 16 | ; i j funct length 17 | 1 1 0.09572 0.15139 18 | 19 | [ exclusions ] 20 | 1 2 3 21 | 2 1 3 22 | 3 1 2 23 | #else 24 | [ bonds ] 25 | ; i j funct length force.c. 26 | 1 2 1 0.09572 376560.0 0.09572 376560.0 27 | 1 3 1 0.09572 376560.0 0.09572 376560.0 28 | 29 | [ angles ] 30 | ; i j k funct angle force.c. 31 | 2 1 3 1 104.52 460.24 104.52 460.24 32 | #endif 33 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/charmm/watermodels.dat: -------------------------------------------------------------------------------- 1 | tip3p TIP3P TIP 3-point, recommended 2 | tip4p TIP4P TIP 4-point 3 | tips3p TIPS3P CHARMM TIP 3-point with LJ on H's 4 | tip5p TIP5P TIP 5-point (see https://gitlab.com/gromacs/gromacs/-/issues/1348 for issues) 5 | spc SPC simple point charge 6 | spce SPC/E extended simple point charge 7 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/ffnonbonded.itp: -------------------------------------------------------------------------------- 1 | [ atomtypes ] 2 | ; full atom descriptions are available in ffoplsaa.atp 3 | ; name bond_type mass charge ptype sigma epsilon 4 | #ifdef HEAVY_H 5 | opls_111 OW 8 9.95140 -0.834 A 3.15061e-01 6.36386e-01 6 | opls_112 HW 1 4.03200 0.417 A 0.00000e+00 0.00000e+00 7 | opls_113 OW 8 9.95140 0.000 A 3.15365e-01 6.48520e-01 8 | opls_114 HW 1 4.03200 0.520 A 0.00000e+00 0.00000e+00 9 | opls_115 MW 0 0.00000 -1.040 D 0.00000e+00 0.00000e+00 10 | opls_116 OW 8 9.95140 -0.820 A 3.16557e-01 6.50194e-01 11 | opls_117 HW 1 4.03200 0.410 A 0.00000e+00 0.00000e+00 12 | #else 13 | opls_111 OW 8 15.99940 -0.834 A 3.15061e-01 6.36386e-01 14 | opls_112 HW 1 1.00800 0.417 A 0.00000e+00 0.00000e+00 15 | opls_113 OW 8 15.99940 0.000 A 3.15365e-01 6.48520e-01 16 | opls_114 HW 1 1.00800 0.520 A 0.00000e+00 0.00000e+00 17 | opls_115 MW 0 0.00000 -1.040 D 0.00000e+00 0.00000e+00 18 | opls_116 OW 8 15.99940 -0.820 A 3.16557e-01 6.50194e-01 19 | opls_117 HW 1 1.00800 0.410 A 0.00000e+00 0.00000e+00 20 | #endif 21 | opls_118 OW 8 15.99940 0.000 A 3.12000e-01 6.69440e-01 22 | opls_118e OW 8 15.99940 0.000 A 3.09700e-01 7.44752e-01 ; J. Chem. Phys. 120 (2004) 6085-6093 23 | opls_119 HW 1 1.00800 0.000 A 0.00000e+00 0.00000e+00 24 | opls_120 OL 0 0.00000 0.000 D 0.00000e+00 0.00000e+00 25 | opls_400 F- 9 18.99840 -1.000 A 2.73295e-01 3.01248e+00 26 | opls_401 Cl- 17 35.45300 -1.000 A 4.41724e-01 4.92833e-01 27 | opls_402 Br- 35 79.90400 -1.000 A 4.62376e-01 3.76560e-01 28 | opls_403 I- 53 126.90450 -1.000 A 5.40000e-01 2.92880e-01 29 | opls_406 Li+ 3 6.94100 1.000 A 2.12645e-01 7.64793e-02 30 | opls_407 Na+ 11 22.98977 1.000 A 3.33045e-01 1.15980e-02 31 | opls_408 K+ 19 39.09830 1.000 A 4.93463e-01 1.37235e-03 32 | opls_409 Rb+ 37 85.46780 1.000 A 5.62177e-01 7.15464e-04 33 | opls_410 Cs+ 55 132.90540 1.000 A 6.71600e-01 3.38904e-04 34 | opls_411 Mg2+ 12 24.30500 2.000 A 1.64447e-01 3.66118e+00 35 | opls_412 Ca2+ 20 40.08000 2.000 A 2.41203e-01 1.88136e+00 36 | ; special dummy-type particles 37 | MW MW 0 0.00000 0.000 D 0.00000e+00 0.00000e+00 38 | ; tip4p-EW 39 | HW_tip4pew 1 1.008 0.0000 A 0.00000e+00 0.00000e+00 40 | OW_tip4pew 8 16.00 0.0000 A 3.16435e-01 6.80946e-01 41 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/ions.itp: -------------------------------------------------------------------------------- 1 | ; 2 | ; See literature references in forcefield.itp and atomtypes.atp 3 | ; 4 | 5 | [ moleculetype ] 6 | ; molname nrexcl 7 | MG 1 8 | 9 | [ atoms ] 10 | ; id at type res nr residu name at name cg nr charge mass 11 | 1 opls_411 1 MG MG 1 2 24.30500 12 | 13 | [ moleculetype ] 14 | ; molname nrexcl 15 | CA 1 16 | 17 | [ atoms ] 18 | ; id at type res nr residu name at name cg nr charge mass 19 | 1 opls_412 1 CA CA 1 2 40.08000 20 | 21 | [ moleculetype ] 22 | ; molname nrexcl 23 | LI 1 24 | 25 | [ atoms ] 26 | ; id at type res nr residu name at name cg nr charge mass 27 | 1 opls_406 1 LI LI 1 1 6.941 28 | 29 | [ moleculetype ] 30 | ; molname nrexcl 31 | NA 1 32 | 33 | [ atoms ] 34 | ; id at type res nr residu name at name cg nr charge mass 35 | 1 opls_407 1 NA NA 1 1 22.98977 36 | 37 | [ moleculetype ] 38 | ; molname nrexcl 39 | K 1 40 | 41 | [ atoms ] 42 | ; id at type res nr residu name at name cg nr charge mass 43 | 1 opls_408 1 K K 1 1 39.0983 44 | 45 | [ moleculetype ] 46 | ; molname nrexcl 47 | RB 1 48 | 49 | [ atoms ] 50 | ; id at type res nr residu name at name cg nr charge mass 51 | 1 opls_409 1 RB RB 1 1 85.4678 52 | 53 | [ moleculetype ] 54 | ; molname nrexcl 55 | CS 1 56 | 57 | [ atoms ] 58 | ; id at type res nr residu name at name cg nr charge mass 59 | 1 opls_410 1 CS CS 1 1 132.9054 60 | 61 | [ moleculetype ] 62 | ; molname nrexcl 63 | F 1 64 | 65 | [ atoms ] 66 | ; id at type res nr residu name at name cg nr charge mass 67 | 1 opls_400 1 F F 1 -1 18.9984 68 | 69 | [ moleculetype ] 70 | ; molname nrexcl 71 | CL 1 72 | 73 | [ atoms ] 74 | ; id at type res nr residu name at name cg nr charge mass 75 | 1 opls_401 1 CL CL 1 -1 35.45300 76 | 77 | [ moleculetype ] 78 | ; molname nrexcl 79 | BR 1 80 | 81 | [ atoms ] 82 | ; id at type res nr residu name at name cg nr charge mass 83 | 1 opls_402 1 BR BR 1 -1 79.904 84 | 85 | [ moleculetype ] 86 | ; molname nrexcl 87 | I 1 88 | 89 | [ atoms ] 90 | ; id at type res nr residu name at name cg nr charge mass 91 | 1 opls_403 1 I I 1 -1 126.9045 92 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/spc.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; nr type resnr residue atom cgnr charge mass 7 | 1 opls_116 1 SOL OW 1 -0.82 8 | 2 opls_117 1 SOL HW1 1 0.41 9 | 3 opls_117 1 SOL HW2 1 0.41 10 | 11 | #ifndef FLEXIBLE 12 | [ settles ] 13 | ; OW funct doh dhh 14 | 1 1 0.1 0.16330 15 | 16 | [ exclusions ] 17 | 1 2 3 18 | 2 1 3 19 | 3 1 2 20 | #else 21 | [ bonds ] 22 | ; i j funct length force.c. 23 | 1 2 1 0.1 345000 0.1 345000 24 | 1 3 1 0.1 345000 0.1 345000 25 | 26 | [ angles ] 27 | ; i j k funct angle force.c. 28 | 2 1 3 1 109.47 383 109.47 383 29 | #endif 30 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/spce.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; nr type resnr residue atom cgnr charge mass 7 | 1 opls_116 1 SOL OW 1 -0.8476 8 | 2 opls_117 1 SOL HW1 1 0.4238 9 | 3 opls_117 1 SOL HW2 1 0.4238 10 | 11 | #ifndef FLEXIBLE 12 | [ settles ] 13 | ; OW funct doh dhh 14 | 1 1 0.1 0.16330 15 | 16 | [ exclusions ] 17 | 1 2 3 18 | 2 1 3 19 | 3 1 2 20 | #else 21 | [ bonds ] 22 | ; i j funct length force.c. 23 | 1 2 1 0.1 345000 0.1 345000 24 | 1 3 1 0.1 345000 0.1 345000 25 | 26 | [ angles ] 27 | ; i j k funct angle force.c. 28 | 2 1 3 1 109.47 383 109.47 383 29 | #endif 30 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/tip3p.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr residu name at name cg nr charge 7 | 1 opls_111 1 SOL OW 1 -0.834 8 | 2 opls_112 1 SOL HW1 1 0.417 9 | 3 opls_112 1 SOL HW2 1 0.417 10 | 11 | #ifndef FLEXIBLE 12 | [ settles ] 13 | ; i j funct length 14 | 1 1 0.09572 0.15139 15 | 16 | [ exclusions ] 17 | 1 2 3 18 | 2 1 3 19 | 3 1 2 20 | #else 21 | [ bonds ] 22 | ; i j funct length force.c. 23 | 1 2 1 0.09572 502416.0 0.09572 502416.0 24 | 1 3 1 0.09572 502416.0 0.09572 502416.0 25 | 26 | 27 | [ angles ] 28 | ; i j k funct angle force.c. 29 | 2 1 3 1 104.52 628.02 104.52 628.02 30 | #endif 31 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/tip4p.itp: -------------------------------------------------------------------------------- 1 | ; 2 | ; Note the strange order of atoms to make it faster in gromacs. 3 | ; 4 | [ moleculetype ] 5 | ; molname nrexcl 6 | SOL 2 7 | 8 | [ atoms ] 9 | ; id at type res nr residu name at name cg nr charge 10 | 1 opls_113 1 SOL OW 1 0.0 11 | 2 opls_114 1 SOL HW1 1 0.52 12 | 3 opls_114 1 SOL HW2 1 0.52 13 | 4 opls_115 1 SOL MW 1 -1.04 14 | 15 | #ifndef FLEXIBLE 16 | [ settles ] 17 | ; OW funct doh dhh 18 | 1 1 0.09572 0.15139 19 | #else 20 | [ bonds ] 21 | ; i j funct length force.c. 22 | 1 2 1 0.09572 502416.0 0.09572 502416.0 23 | 1 3 1 0.09572 502416.0 0.09572 502416.0 24 | 25 | [ angles ] 26 | ; i j k funct angle force.c. 27 | 2 1 3 1 104.52 628.02 104.52 628.02 28 | #endif 29 | 30 | [ exclusions ] 31 | 1 2 3 4 32 | 2 1 3 4 33 | 3 1 2 4 34 | 4 1 2 3 35 | 36 | ; The position of the virtual site is computed as follows: 37 | ; 38 | ; O 39 | ; 40 | ; D 41 | ; 42 | ; H H 43 | ; 44 | ; const = distance (OD) / [ cos (angle(DOH)) * distance (OH) ] 45 | ; 0.015 nm / [ cos (52.26 deg) * 0.09572 nm ] 46 | 47 | ; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1) 48 | 49 | [ virtual_sites3 ] 50 | ; Vsite from funct a b 51 | 4 1 2 3 1 0.128012065 0.128012065 52 | 53 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/tip4pew.itp: -------------------------------------------------------------------------------- 1 | 2 | ; Horn et al. (2004). J. Chem. Phys.120, 9665-9678 3 | ; http://dx.doi.org/10.1063/1.1683075 4 | 5 | [ moleculetype ] 6 | ; molname nrexcl 7 | SOL 2 8 | 9 | [ atoms ] 10 | ; id at type res nr res name at name cg nr charge mass 11 | 1 OW_tip4pew 1 SOL OW 1 0 16.00000 12 | 2 HW_tip4pew 1 SOL HW1 1 0.52422 1.00800 13 | 3 HW_tip4pew 1 SOL HW2 1 0.52422 1.00800 14 | 4 MW 1 SOL MW 1 -1.04844 0.00000 15 | 16 | #ifndef FLEXIBLE 17 | 18 | [ settles ] 19 | ; i funct doh dhh 20 | 1 1 0.09572 0.15139 21 | 22 | #else 23 | [ bonds ] 24 | ; i j funct length force.c. 25 | 1 2 1 0.09572 502416.0 0.09572 502416.0 26 | 1 3 1 0.09572 502416.0 0.09572 502416.0 27 | 28 | [ angles ] 29 | ; i j k funct angle force.c. 30 | 2 1 3 1 104.52 628.02 104.52 628.02 31 | 32 | #endif 33 | 34 | 35 | [ virtual_sites3 ] 36 | ; Vsite from funct a b 37 | 4 1 2 3 1 0.106676721 0.106676721 38 | 39 | 40 | [ exclusions ] 41 | 1 2 3 4 42 | 2 1 3 4 43 | 3 1 2 4 44 | 4 1 2 3 45 | 46 | 47 | ; The position of the virtual site is computed as follows: 48 | ; 49 | ; O 50 | ; 51 | ; V 52 | ; 53 | ; H H 54 | ; 55 | ; Ewald tip4p: 56 | ; const = distance (OV) / [ cos (angle(VOH)) * distance (OH) ] 57 | ; 0.0125 nm / [ cos (52.26 deg) * 0.09572 nm ] 58 | ; then a = b = 0.5 * const = 0.106676721 59 | ; 60 | ; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1) 61 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/tip5p.itp: -------------------------------------------------------------------------------- 1 | ; original reference: [M. W. Mahoney and W. L. Jorgensen, J. Chem. Phys. 112 , 2000] 2 | ; 3 | ; Note that there are various issues with tip5p and the different forcefields. 4 | ; Discussion is here: https://gitlab.com/gromacs/gromacs/-/issues/1348 5 | 6 | [ moleculetype ] 7 | ; molname nrexcl 8 | SOL 2 9 | 10 | [ atoms ] 11 | ; id at type res nr residu name at name cg nr charge 12 | 1 opls_118 1 SOL OW 1 0 13 | 2 opls_119 1 SOL HW1 1 0.241 14 | 3 opls_119 1 SOL HW2 1 0.241 15 | 4 opls_120 1 SOL LP1 1 -0.241 16 | 5 opls_120 1 SOL LP2 1 -0.241 17 | 18 | #ifndef FLEXIBLE 19 | 20 | [ settles ] 21 | ; i funct doh dhh 22 | 1 1 0.09572 0.15139 23 | 24 | #else 25 | 26 | [ bonds ] 27 | ; i j funct length force.c. 28 | 1 2 1 0.09572 502416.0 0.09572 502416.0 29 | 1 3 1 0.09572 502416.0 0.09572 502416.0 30 | 31 | [ angles ] 32 | ; i j k funct angle force.c. 33 | 2 1 3 1 104.52 628.02 104.52 628.02 34 | 35 | #endif 36 | 37 | [ virtual_sites3 ] 38 | ; The position of the virtual site is computed as follows: 39 | ; 40 | ; The distance from OW to L is 0.07 nm, the geometry is tetrahedral 41 | ; (109.47 deg) 42 | ; Therefore, a = b = 0.07 * cos (109.47/2) / | xOH1 + xOH2 | 43 | ; c = 0.07 * sin (109.47/2) / | xOH1 X xOH2 | 44 | ; 45 | ; Using | xOH1 X xOH2 | = | xOH1 | | xOH2 | sin (H1-O-H2) 46 | ; | xOH1 + xOH2 | = 2 | xOH1 | cos (H1-O-H2) 47 | ; Vsite pos x4 = x1 + a*x21 + b*x31 + c*(x21 X x31) 48 | 49 | ; Vsite from funct a b c 50 | 4 1 2 3 4 -0.344908 -0.344908 -6.4437903493 51 | 5 1 2 3 4 -0.344908 -0.344908 6.4437903493 52 | 53 | [ exclusions ] 54 | 1 2 3 4 5 55 | 2 1 3 4 5 56 | 3 1 2 4 5 57 | 4 1 2 3 5 58 | 5 1 2 3 4 59 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/tip5pe.itp: -------------------------------------------------------------------------------- 1 | [ moleculetype ] 2 | ; molname nrexcl 3 | SOL 2 4 | 5 | [ atoms ] 6 | ; id at type res nr residu name at name cg nr charge 7 | 1 opls_118e 1 SOL OW 1 0 8 | 2 opls_119 1 SOL HW1 1 0.241 9 | 3 opls_119 1 SOL HW2 1 0.241 10 | 4 opls_120 1 SOL LP1 1 -0.241 11 | 5 opls_120 1 SOL LP2 1 -0.241 12 | 13 | [ settles ] 14 | ; i funct doh dhh 15 | 1 1 0.09572 0.15139 16 | 17 | [ virtual_sites3 ] 18 | ; The position of the virtual site is computed as follows: 19 | ; 20 | ; The distance from OW to L is 0.07 nm, the geometry is tetrahedral 21 | ; (109.47 deg) 22 | ; Therefore, a = b = 0.07 * cos (109.47/2) / | xOH1 + xOH2 | 23 | ; c = 0.07 * sin (109.47/2) / | xOH1 X xOH2 | 24 | ; 25 | ; Using | xOH1 X xOH2 | = | xOH1 | | xOH2 | sin (H1-O-H2) 26 | ; | xOH1 + xOH2 | = 2 | xOH1 | cos (H1-O-H2) 27 | ; Vsite pos x4 = x1 + a*x21 + b*x31 + c*(x21 X x31) 28 | 29 | ; Vsite from funct a b c 30 | 4 1 2 3 4 -0.344908 -0.344908 -6.4437903493 31 | 5 1 2 3 4 -0.344908 -0.344908 6.4437903493 32 | 33 | [ exclusions ] 34 | 1 2 3 4 5 35 | 2 1 3 4 5 36 | 3 1 2 4 5 37 | 4 1 2 3 5 38 | 5 1 2 3 4 39 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/oplsaa/watermodels.dat: -------------------------------------------------------------------------------- 1 | tip4p TIP4P TIP 4-point, recommended 2 | tip4pew TIP4PEW TIP 4-point with Ewald 3 | tip3p TIP3P TIP 3-point 4 | tip5p TIP5P TIP 5-point (see https://gitlab.com/gromacs/gromacs/-/issues/1348 for issues) 5 | tip5pe TIP5P TIP 5-point improved for Ewald sums 6 | spc SPC simple point charge 7 | spce SPC/E extended simple point charge 8 | -------------------------------------------------------------------------------- /src/bindflow/data/gmx_water_models/water_models.yml: -------------------------------------------------------------------------------- 1 | amber: 2 | spc: spc216.gro 3 | spce: spc216.gro 4 | tip3p: spc216.gro 5 | tip4p: tip4p.gro 6 | tip4pew: tip4p.gro 7 | tip5p: tip5p.gro 8 | charmm: 9 | spc: spc216.gro 10 | spce: spc216.gro 11 | tip3p: spc216.gro 12 | tip4p: tip4p.gro 13 | tip5p: tip5p.gro 14 | tips3p: spc216.gro 15 | oplsaa: 16 | spc: spc216.gro 17 | spce: spc216.gro 18 | tip3p: spc216.gro 19 | tip4p: tip4p.gro 20 | tip4pew: tip4p.gro 21 | tip5p: tip5p.gro 22 | tip5pe: tip5p.gro 23 | -------------------------------------------------------------------------------- /src/bindflow/free_energy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/free_energy/__init__.py -------------------------------------------------------------------------------- /src/bindflow/home.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import bindflow 5 | from pathlib import Path 6 | import sys 7 | import inspect 8 | import platform 9 | 10 | 11 | def home(dataDir=None, libDir=False) -> Path: 12 | """Return the pathname of the bindflow root directory (or a data subdirectory). 13 | Parameters 14 | ---------- 15 | dataDir : str 16 | If not None, return the path to a specific data directory 17 | libDir : bool 18 | If True, return path to the lib directory 19 | Returns 20 | ------- 21 | dir : pathlib.Path 22 | The directory 23 | Example 24 | ------- 25 | .. ipython:: python 26 | 27 | from bindflow.home import home 28 | print(home()) 29 | print(home(dataDir="gmx_ff")) 30 | print(home(dataDir="gmx_ff")/"amber99sb-star-ildn.ff.tar.gz") 31 | """ 32 | 33 | homeDir = Path(inspect.getfile(bindflow)).parent 34 | try: 35 | if sys._MEIPASS: 36 | homeDir = Path(sys._MEIPASS) 37 | except Exception: 38 | pass 39 | 40 | if dataDir: 41 | return homeDir/f"data/{dataDir}" 42 | elif libDir: 43 | libdir = homeDir/f"lib{platform.system()}" 44 | if not libdir.exists(): 45 | raise FileNotFoundError("Could not find libs.") 46 | return libdir 47 | else: 48 | return homeDir 49 | 50 | 51 | if __name__ == "__main__": 52 | pass 53 | -------------------------------------------------------------------------------- /src/bindflow/mdp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/mdp/__init__.py -------------------------------------------------------------------------------- /src/bindflow/mdp/_path_handler.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from bindflow.utils import tools 3 | 4 | 5 | root_path = Path(__file__).resolve().parent 6 | 7 | __PathDir__ = { 8 | 'complex': { 9 | 'membrane': { 10 | 'equi': root_path/'templates/complex/membrane/equi', 11 | 'fep': root_path/'templates/complex/membrane/fep', 12 | 'mmpbsa': root_path/'templates/complex/membrane/mmpbsa', 13 | }, 14 | 'soluble': { 15 | 'equi': root_path/'templates/complex/soluble/equi', 16 | 'fep': root_path/'templates/complex/soluble/fep', 17 | 'mmpbsa': root_path/'templates/complex/soluble/mmpbsa', 18 | }, 19 | }, 20 | 'ligand': { 21 | 'equi': root_path/'templates/ligand/equi', 22 | 'fep': root_path/'templates/ligand/fep', 23 | } 24 | } 25 | 26 | _TemplatePath = tools.DotDict(**__PathDir__) 27 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/__init__.py: -------------------------------------------------------------------------------- 1 | from bindflow.mdp._path_handler import _TemplatePath as TemplatePath -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/00_min.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=3000;-DPOSRES -DPOSRES_FC_BB=4000.0 -DPOSRES_FC_SC=2000.0 -DPOSRES_FC_LIPID=1500.0 -DPOSRES_LIG=4000.0 2 | integrator = steep 3 | emtol = 1000.0 4 | nsteps = 5000 5 | 6 | nstxout = 0 7 | nstvout = 0 8 | nstfout = 0 9 | nstxout-compressed = 0 10 | compressed-x-precision = 0 11 | nstlog = 0 12 | nstenergy = 0 13 | nstcalcenergy = 100 14 | 15 | nstlist = 10 16 | cutoff-scheme = Verlet 17 | rlist = 1.0 18 | vdwtype = Cut-off 19 | vdw-modifier = Potential-shift-Verlet 20 | rvdw_switch = 0 21 | rvdw = 1.0 22 | coulombtype = pme 23 | rcoulomb = 1.0 24 | epsilon-r = 1 25 | epsilon-rf = 1 26 | ; 27 | constraints = h-bonds 28 | constraint_algorithm = LINCS 29 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/01_nvt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=3000;-DPOSRES -DPOSRES_FC_BB=4000.0 -DPOSRES_FC_SC=2000.0 -DPOSRES_FC_LIPID=1500.0 -DPOSRES_LIG=4000.0 2 | integrator = md 3 | dt = 0.001 4 | nsteps = 125000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | constraints = h-bonds 31 | constraint_algorithm = LINCS 32 | ; 33 | nstcomm = 100 34 | comm_mode = linear 35 | comm_grps = SOLU MEMB SOLV 36 | ; 37 | gen-vel = yes 38 | gen-temp = 298.15 39 | gen-seed = -1 40 | ; 41 | refcoord_scaling = com 42 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/02_nvt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=1500; -DPOSRES -DPOSRES_FC_BB=2000.0 -DPOSRES_FC_SC=1000.0 -DPOSRES_FC_LIPID=1000.0 -DPOSRES_LIG=2000.0 2 | integrator = md 3 | dt = 0.001 4 | nsteps = 125000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | constraints = h-bonds 31 | constraint_algorithm = LINCS 32 | continuation = yes 33 | ; 34 | nstcomm = 100 35 | comm_mode = linear 36 | comm_grps = SOLU MEMB SOLV 37 | ; 38 | refcoord_scaling = com 39 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/03_npt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=1000; -DPOSRES -DPOSRES_FC_BB=1000.0 -DPOSRES_FC_SC=500.0 -DPOSRES_FC_LIPID=400.0 -DPOSRES_LIG=1000.0 2 | integrator = md 3 | dt = 0.001 4 | nsteps = 125000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | ; 36 | constraints = h-bonds 37 | constraint_algorithm = LINCS 38 | continuation = yes 39 | ; 40 | nstcomm = 100 41 | comm_mode = linear 42 | comm_grps = SOLU MEMB SOLV 43 | ; 44 | refcoord_scaling = com 45 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/04_npt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=500; -DPOSRES -DPOSRES_FC_BB=500.0 -DPOSRES_FC_SC=200.0 -DPOSRES_FC_LIPID=200.0 -DPOSRES_LIG=500.0 2 | integrator = md 3 | dt = 0.002 4 | nsteps = 250000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | ; 36 | constraints = h-bonds 37 | constraint_algorithm = LINCS 38 | continuation = yes 39 | ; 40 | nstcomm = 100 41 | comm_mode = linear 42 | comm_grps = SOLU MEMB SOLV 43 | ; 44 | refcoord_scaling = com 45 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/05_npt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=200; -DPOSRES -DPOSRES_FC_BB=200.0 -DPOSRES_FC_SC=50.0 -DPOSRES_FC_LIPID=40.0 -DPOSRES_LIG=200.0 2 | integrator = md 3 | dt = 0.002 4 | nsteps = 250000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | ; 36 | constraints = h-bonds 37 | constraint_algorithm = LINCS 38 | continuation = yes 39 | ; 40 | nstcomm = 100 41 | comm_mode = linear 42 | comm_grps = SOLU MEMB SOLV 43 | ; 44 | refcoord_scaling = com 45 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/06_npt.mdp: -------------------------------------------------------------------------------- 1 | define = -DPOSRES -DPOSRES_DYNAMIC=50; -DPOSRES -DPOSRES_FC_BB=50.0 -DPOSRES_FC_SC=0.0 -DPOSRES_FC_LIPID=0.0 -DPOSRES_LIG=50.0 2 | integrator = md 3 | dt = 0.002 4 | nsteps = 250000 5 | nstxout = 0 6 | nstvout = 0 7 | nstfout = 0 8 | nstcalcenergy = 100 9 | nstenergy = 0 10 | nstlog = 0 11 | nstxout-compressed = 0 12 | ; 13 | cutoff-scheme = Verlet 14 | nstlist = 20 15 | rlist = 1.0 16 | vdwtype = Cut-off 17 | vdw-modifier = Potential-shift-Verlet 18 | rvdw_switch = 0 19 | rvdw = 1.0 20 | coulombtype = pme 21 | rcoulomb = 1.0 22 | epsilon-r = 1 23 | epsilon-rf = 1 24 | ; 25 | tcoupl = v-rescale 26 | tc_grps = SOLU MEMB SOLV 27 | tau_t = 1.0 1.0 1.0 28 | ref_t = 298.15 298.15 298.15 29 | ; 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | ; 36 | constraints = h-bonds 37 | constraint_algorithm = LINCS 38 | continuation = yes 39 | ; 40 | nstcomm = 100 41 | comm_mode = linear 42 | comm_grps = SOLU MEMB SOLV 43 | ; 44 | refcoord_scaling = com 45 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/equi/prod.mdp: -------------------------------------------------------------------------------- 1 | define = 2 | integrator = md 3 | dt = 0.004 4 | tinit = 0 5 | nsteps = 2500000 6 | nstcomm = 100 7 | nstxout = 0 8 | nstvout = 0 9 | nstfout = 0 10 | nstcalcenergy = 50 11 | nstenergy = 1250 12 | nstlog = 1250 13 | nstxout-compressed = 1250 14 | compressed-x-precision = 1000 15 | cutoff_scheme = Verlet 16 | nstlist = 50 17 | rlist = 1.0 18 | vdwtype = Cut-off 19 | vdw_modifier = Potential-shift-Verlet 20 | rvdw_switch = 0 21 | rvdw = 1.0 22 | coulombtype = pme 23 | rcoulomb = 1.0 24 | epsilon_r = 1 25 | epsilon_rf = 1 26 | Tcoupl = v-rescale 27 | tc_grps = SOLU MEMB SOLV 28 | tau_t = 1.0 1.0 1.0 29 | ref_t = 298.15 298.15 298.15 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | constraint_algorithm = lincs 36 | constraints = h-bonds 37 | continuation = yes 38 | gen_vel = no 39 | pbc = xyz 40 | DispCorr = EnerPres 41 | refcoord_scaling = com -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/fep/bonded/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw-q 74 | couple-lambda1 = vdw-q 75 | init-lambda-state = 76 | bonded-lambdas = 77 | nstdhdl = 0 78 | dhdl-print-energy = total 79 | calc-lambda-neighbors = -1 80 | separate-dhdl-file = yes 81 | couple-intramol = yes 82 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/fep/coul/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw 74 | couple-lambda1 = vdw-q 75 | init-lambda-state = 76 | bonded-lambdas = 77 | coul-lambdas = 78 | nstdhdl = 0 79 | dhdl-print-energy = total 80 | calc-lambda-neighbors = -1 81 | separate-dhdl-file = yes 82 | couple-intramol = yes 83 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/fep/vdw/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = none 74 | couple-lambda1 = vdw 75 | sc-alpha = 0.5 76 | sc-power = 1 77 | sc-sigma = 0.3 78 | init-lambda-state = 79 | bonded-lambdas = 80 | vdw-lambdas = 81 | nstdhdl = 0 82 | dhdl-print-energy = total 83 | calc-lambda-neighbors = -1 84 | separate-dhdl-file = yes 85 | couple-intramol = yes 86 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/membrane/mmpbsa/prod.mdp: -------------------------------------------------------------------------------- 1 | define = 2 | integrator = md 3 | dt = 0.004 4 | tinit = 0 5 | nsteps = 250000 6 | nstcomm = 100 7 | nstxout = 0 8 | nstvout = 0 9 | nstfout = 0 10 | nstcalcenergy = 50 11 | nstenergy = 125 12 | nstlog = 125 13 | nstxout-compressed = 125 14 | compressed-x-precision = 100 15 | cutoff_scheme = Verlet 16 | nstlist = 50 17 | rlist = 1.0 18 | vdwtype = Cut-off 19 | vdw_modifier = Potential-shift-Verlet 20 | rvdw_switch = 0 21 | rvdw = 1.0 22 | coulombtype = pme 23 | rcoulomb = 1.0 24 | epsilon_r = 1 25 | epsilon_rf = 1 26 | Tcoupl = v-rescale 27 | tc_grps = SOLU MEMB SOLV 28 | tau_t = 1.0 1.0 1.0 29 | ref_t = 298.15 298.15 298.15 30 | pcoupl = c-rescale 31 | pcoupltype = semiisotropic 32 | tau_p = 5.0 33 | compressibility = 4.5e-5 4.5e-5 34 | ref_p = 1.01325 1.01325 35 | constraint_algorithm = lincs 36 | constraints = h-bonds 37 | continuation = yes 38 | gen_vel = no 39 | pbc = xyz 40 | DispCorr = EnerPres 41 | refcoord_scaling = com -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/soluble/fep/bonded/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw-q 74 | couple-lambda1 = vdw-q 75 | init-lambda-state = 76 | bonded-lambdas = 77 | nstdhdl = 0 78 | dhdl-print-energy = total 79 | calc-lambda-neighbors = -1 80 | separate-dhdl-file = yes 81 | couple-intramol = yes 82 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/soluble/fep/coul/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw 74 | couple-lambda1 = vdw-q 75 | init-lambda-state = 76 | bonded-lambdas = 77 | coul-lambdas = 78 | nstdhdl = 0 79 | dhdl-print-energy = total 80 | calc-lambda-neighbors = -1 81 | separate-dhdl-file = yes 82 | couple-intramol = yes 83 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/complex/soluble/fep/vdw/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | pbc = xyz 17 | 18 | ;---------------------------------------------------- 19 | ; OUTPUT CONTROL 20 | ;---------------------------------------------------- 21 | nstxout = 0 ; save coordinates to .trr every 250 steps 22 | nstvout = 0 ; don't save velocities to .trr 23 | nstfout = 0 ; don't save forces to .trr 24 | 25 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 26 | compressed-x-precision = 0 27 | nstlog = 0 ; update log file every 500 steps 28 | nstenergy = 0 ; save energies every 500 steps 29 | nstcalcenergy = 100 30 | 31 | ;---------------------------------------------------- 32 | ; NEIGHBOR SEARCHING 33 | ;---------------------------------------------------- 34 | cutoff-scheme = Verlet 35 | ns-type = grid 36 | nstlist = 1 37 | rlist = 1.2 38 | 39 | ;---------------------------------------------------- 40 | ; BONDS 41 | ;---------------------------------------------------- 42 | constraints = none 43 | 44 | ;---------------------------------------------------- 45 | ; ELECTROSTATICS 46 | ;---------------------------------------------------- 47 | coulombtype = PME 48 | rcoulomb = 1.0 49 | pme-order = 4 50 | fourierspacing = 0.10 51 | ewald-rtol = 1e-6 52 | 53 | ;---------------------------------------------------- 54 | ; VDW 55 | ;---------------------------------------------------- 56 | vdwtype = Cut-off 57 | vdw-modifier = Potential-shift-Verlet 58 | verlet-buffer-tolerance = 0.005 59 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 60 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 61 | 62 | ;---------------------------------------------------- 63 | ; TEMPERATURE & PRESSURE COUPL 64 | ;---------------------------------------------------- 65 | tcoupl = no 66 | pcoupl = no 67 | gen-vel = no 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = none 74 | couple-lambda1 = vdw 75 | sc-alpha = 0.5 76 | sc-power = 1 77 | sc-sigma = 0.3 78 | init-lambda-state = 79 | bonded-lambdas = 80 | vdw-lambdas = 81 | nstdhdl = 0 82 | dhdl-print-energy = total 83 | calc-lambda-neighbors = -1 84 | separate-dhdl-file = yes 85 | couple-intramol = yes 86 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/ligand/fep/coul/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | 17 | ;---------------------------------------------------- 18 | ; OUTPUT CONTROL 19 | ;---------------------------------------------------- 20 | nstxout = 0 ; save coordinates to .trr every 250 steps 21 | nstvout = 0 ; don't save velocities to .trr 22 | nstfout = 0 ; don't save forces to .trr 23 | 24 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 25 | compressed-x-precision = 0 26 | nstlog = 0 ; update log file every 500 steps 27 | nstenergy = 0 ; save energies every 500 steps 28 | nstcalcenergy = 100 29 | 30 | ;---------------------------------------------------- 31 | ; NEIGHBOR SEARCHING 32 | ;---------------------------------------------------- 33 | cutoff-scheme = Verlet 34 | ns-type = grid 35 | nstlist = 1 36 | rlist = 1.0 37 | 38 | ;---------------------------------------------------- 39 | ; BONDS 40 | ;---------------------------------------------------- 41 | constraints = none 42 | 43 | ;---------------------------------------------------- 44 | ; ELECTROSTATICS 45 | ;---------------------------------------------------- 46 | coulombtype = PME 47 | rcoulomb = 1.0 48 | pme-order = 4 49 | fourierspacing = 0.10 50 | ewald-rtol = 1e-6 51 | 52 | ;---------------------------------------------------- 53 | ; VDW 54 | ;---------------------------------------------------- 55 | vdwtype = Cut-off 56 | vdw-modifier = Potential-shift-Verlet 57 | verlet-buffer-tolerance = 0.005 58 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 59 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 60 | 61 | ;---------------------------------------------------- 62 | ; TEMPERATURE & PRESSURE COUPL 63 | ;---------------------------------------------------- 64 | tcoupl = no 65 | pcoupl = no 66 | gen-vel = no 67 | pbc = xyz 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw-q 74 | couple-lambda1 = vdw 75 | init-lambda-state = 76 | coul-lambdas = 77 | nstdhdl = 0 78 | dhdl-print-energy = total 79 | calc-lambda-neighbors = -1 80 | separate-dhdl-file = yes 81 | couple-intramol = yes 82 | -------------------------------------------------------------------------------- /src/bindflow/mdp/templates/ligand/fep/vdw/00_min.mdp: -------------------------------------------------------------------------------- 1 | ;TITLE: Bromosporine setup - GROMACS 2019 - PME Order 4, Long Range Cutoff 2 | 3 | ;==================================================== 4 | ; Energy minimisation 5 | ;==================================================== 6 | 7 | ;---------------------------------------------------- 8 | ; RUN CONTROL & MINIMIZATION 9 | ;---------------------------------------------------- 10 | define = -DFLEXIBLE 11 | integrator = steep 12 | nsteps = 10000 13 | emtol = 100 14 | emstep = 0.01 15 | nstcomm = 100 16 | 17 | ;---------------------------------------------------- 18 | ; OUTPUT CONTROL 19 | ;---------------------------------------------------- 20 | nstxout = 0 ; save coordinates to .trr every 250 steps 21 | nstvout = 0 ; don't save velocities to .trr 22 | nstfout = 0 ; don't save forces to .trr 23 | 24 | nstxout-compressed = 0 ; xtc compressed trajectory output every 500 steps 25 | compressed-x-precision = 0 26 | nstlog = 0 ; update log file every 500 steps 27 | nstenergy = 0 ; save energies every 500 steps 28 | nstcalcenergy = 100 29 | 30 | ;---------------------------------------------------- 31 | ; NEIGHBOR SEARCHING 32 | ;---------------------------------------------------- 33 | cutoff-scheme = Verlet 34 | ns-type = grid 35 | nstlist = 1 36 | rlist = 1.0 37 | 38 | ;---------------------------------------------------- 39 | ; BONDS 40 | ;---------------------------------------------------- 41 | constraints = none 42 | 43 | ;---------------------------------------------------- 44 | ; ELECTROSTATICS 45 | ;---------------------------------------------------- 46 | coulombtype = PME 47 | rcoulomb = 1.0 48 | pme-order = 4 49 | fourierspacing = 0.10 50 | ewald-rtol = 1e-6 51 | 52 | ;---------------------------------------------------- 53 | ; VDW 54 | ;---------------------------------------------------- 55 | vdwtype = Cut-off 56 | vdw-modifier = Potential-shift-Verlet 57 | verlet-buffer-tolerance = 0.005 58 | rvdw = 1.0 ; short-range van der Waals cutoff (in nm) 59 | DispCorr = EnerPres ; apply long range dispersion corrections for Energy and Pressure 60 | 61 | ;---------------------------------------------------- 62 | ; TEMPERATURE & PRESSURE COUPL 63 | ;---------------------------------------------------- 64 | tcoupl = no 65 | pcoupl = no 66 | gen-vel = no 67 | pbc = xyz 68 | 69 | ; FREE ENERGY 70 | ;---------------------------------------------------- 71 | free-energy = yes 72 | couple-moltype = LIG 73 | couple-lambda0 = vdw 74 | couple-lambda1 = none 75 | sc-alpha = 0.5 76 | sc-power = 1 77 | sc-sigma = 0.3 78 | init-lambda-state = 79 | vdw-lambdas = 80 | nstdhdl = 0 81 | dhdl-print-energy = total 82 | calc-lambda-neighbors = -1 83 | separate-dhdl-file = yes 84 | couple-intramol = yes 85 | -------------------------------------------------------------------------------- /src/bindflow/mmpbsa_in/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/mmpbsa_in/__init__.py -------------------------------------------------------------------------------- /src/bindflow/orchestration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/orchestration/__init__.py -------------------------------------------------------------------------------- /src/bindflow/preparation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ale94mleon/BindFlow/ce2510e5db30a8e5fbef1f6656d9a22436e62a2c/src/bindflow/preparation/__init__.py -------------------------------------------------------------------------------- /src/bindflow/preparation/boresch.py: -------------------------------------------------------------------------------- 1 | """ 2 | define restraints for ligand in protein during the uncoupling. 3 | """ 4 | 5 | import MDAnalysis as mda 6 | from MDRestraintsGenerator import restraints, search 7 | 8 | from bindflow.utils.tools import PathLike 9 | 10 | 11 | def gen_restraint(topology: PathLike, 12 | trajectory: PathLike, 13 | ligand_selection: str = 'resname LIG and not name H*', 14 | host_selection: str = 'protein and name CA', 15 | temperature: float = 298.15, 16 | outpath: PathLike = './'): 17 | """It will generate the Boresch restraints. It use MDAnalysis and MDRestraintsGenerator. 18 | It defines restraints for ligand in protein during the uncoupling. 19 | 20 | Parameters 21 | ---------- 22 | topology : PathLike 23 | Path to the topology (binary) file. E.g: TPR, PRM7 24 | trajectory : PathLike 25 | Path to the trajectory file. E.g: XTC, NC, TRJ 26 | ligand_selection : str, optional 27 | MDAnalysis selection to define the ligand, by default 'resname LIG and not name H*' 28 | host_selection : str, optional 29 | MDAnalysis selection to define the host (receptor), by default 'protein and name CA' 30 | temperature : float 31 | simulation temperature [298.15] 32 | outpath : PathLike, optional 33 | Where the output files will be written out, by default './' 34 | """ 35 | 36 | u = mda.Universe(topology, trajectory) 37 | 38 | # exclude H* named atoms 39 | ligand_atoms = search.find_ligand_atoms(u, l_selection=ligand_selection, 40 | p_align=host_selection) 41 | 42 | # find protein atoms 43 | atom_set = [] 44 | 45 | for l_atoms in ligand_atoms: 46 | psearch = search.FindHostAtoms(u, l_atoms[0], p_selection=host_selection) 47 | psearch.run(verbose=True) 48 | atom_set.extend([(l_atoms, p) for p in psearch.host_atoms]) 49 | 50 | # Create the boresch finder analysis object 51 | boresch = restraints.FindBoreschRestraint(u, atom_set) 52 | boresch.run(verbose=True) 53 | 54 | # boresch.restraint.plot(path=args.outpath) #this is not necessary and might lead to qt errors. (can be turned on if needed) 55 | boresch.restraint.write(path=outpath) 56 | 57 | dG = boresch.restraint.standard_state(temperature=temperature) 58 | 59 | with open(f'{outpath}/dG_off.dat', 'w') as writer: 60 | writer.write(f'{dG}') 61 | 62 | 63 | if __name__ == "__main__": 64 | pass 65 | -------------------------------------------------------------------------------- /src/bindflow/rules/__init__.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | root_path = Path(__file__).resolve().parent 4 | 5 | # Path of Snakefile 6 | equi = root_path/'equi' 7 | fep = root_path/'fep' 8 | super_flow = root_path/'super_flow' 9 | -------------------------------------------------------------------------------- /src/bindflow/rules/equi/Snakefile: -------------------------------------------------------------------------------- 1 | # TODO, Not sure if needed 2 | rule equil_results_check: 3 | input: 4 | gro_complex = expand(out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/ClosestRestraintFrame.gro", ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))), 5 | top_complex = expand(out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/BoreschRestraint.top", ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))), 6 | dG_off_complex = expand(out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/dG_off.dat", ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))), 7 | finished_ligand = expand(out_approach_path+"/{ligand_name}/{replica}/ligand/equil-mdsim/prod/prod.finished", ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))), 8 | 9 | if config["complex_type"] == 'soluble': 10 | 11 | #Setup: Build dir structure of equil 12 | if config["calculation_type"] == "fep": 13 | include: 'ligand/setup.smk' 14 | include: 'complex/soluble/setup.smk' 15 | 16 | #RUN: Equil 17 | if config["calculation_type"] == "fep": 18 | include: 'ligand/simulation.smk' 19 | include: 'complex/soluble/simulation.smk' 20 | 21 | elif config["complex_type"] == 'membrane': 22 | 23 | #Setup: Build dir structure of equil 24 | if config["calculation_type"] == "fep": 25 | include: 'ligand/setup.smk' 26 | include: 'complex/membrane/setup.smk' 27 | 28 | #RUN: Equil 29 | if config["calculation_type"] == "fep": 30 | include: 'ligand/simulation.smk' 31 | include: 'complex/membrane/simulation.smk' 32 | 33 | else: 34 | rule equi_not_implemented: 35 | output: 36 | out_approach_path+"/{ligand_name}/{replica}/equi_not_implemented.txt" 37 | shell: 38 | "echo 'equi simulations, you must give complex_type = soluble or membrane' > {output}" 39 | 40 | if config["calculation_type"] == "fep": 41 | include: 'boresch.smk' 42 | -------------------------------------------------------------------------------- /src/bindflow/rules/equi/boresch.smk: -------------------------------------------------------------------------------- 1 | from bindflow.preparation import boresch 2 | 3 | rule equil_complex_get_boresch_restraints: 4 | input: 5 | finished=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/prod/prod.finished", 6 | mdp=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/prod/prod.mdp", 7 | params: 8 | in_tpr=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/prod/prod.tpr", 9 | in_xtc=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/prod/prod.xtc", 10 | run_dir=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc", 11 | output: 12 | gro=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/ClosestRestraintFrame.gro", 13 | top=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/BoreschRestraint.top", 14 | boresch_dG_off=out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/boreschcalc/dG_off.dat" 15 | run: 16 | # Fix trajectory. 17 | tools.center_xtc( 18 | tpr=params.in_tpr, 19 | xtc=params.in_xtc, 20 | run_dir=params.run_dir, 21 | host_name=config["host_name"], 22 | load_dependencies=load_dependencies 23 | ) 24 | 25 | # Getting Borech restraints 26 | mdp_params = mdp.MDP().from_file(input.mdp).parameters 27 | if 'ref-t' in mdp_params: 28 | temperature = float(mdp_params['ref-t'].split()[0]) 29 | elif 'ref_t' in mdp_params: 30 | temperature = float(mdp_params['ref_t'].split()[0]) 31 | boresch.gen_restraint( 32 | topology=params.in_tpr, 33 | trajectory=f"{params.run_dir}/center.xtc", 34 | outpath=params.run_dir, 35 | temperature=temperature, 36 | host_selection=config["host_selection"] 37 | ) 38 | # Clean 39 | (Path(params.run_dir)/"center.xtc").unlink() -------------------------------------------------------------------------------- /src/bindflow/rules/equi/complex/membrane/setup.smk: -------------------------------------------------------------------------------- 1 | rule equil_setup_complex: 2 | input: 3 | mdp=expand(str(TemplatePath.complex.membrane.equi/"{step}.mdp"), step=[step.stem for step in tools.list_if_file(TemplatePath.complex.membrane.equi, ext='.mdp')]) 4 | params: 5 | template_dir=TemplatePath.complex.membrane.equi, 6 | # Dynamically access the simulation steps based on the name of the mdp files inside template_dir. 7 | # Must be defined in this way, outside of the rule is overwrite it. 8 | steps=[step.stem for step in tools.list_if_file(TemplatePath.complex.membrane.equi, ext='.mdp')], 9 | ligand_names=config['ligand_names'], 10 | replicas=range(1,1 + config['replicas']), 11 | output: 12 | mdp=expand(out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/{step}/{step}.mdp", step=[step.stem for step in tools.list_if_file(TemplatePath.complex.membrane.equi, ext='.mdp')], ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))) 13 | run: 14 | for ligand_name in params.ligand_names: 15 | for replica in params.replicas: 16 | sim_dir=Path(out_approach_path)/f"{ligand_name}/{replica}/complex/equil-mdsim" 17 | # Create MDP template 18 | 19 | mdp_template=mdp.StepMDP(step_path = params.template_dir) 20 | 21 | # Not sure if the sorted is needed, just for safety 22 | for step in params.steps: 23 | (sim_dir/step).mkdir(exist_ok=True, parents=True) 24 | output_mdp = sim_dir/step/f"{step}.mdp" 25 | 26 | # Change to new MDP step 27 | mdp_template.set_new_step(step) 28 | 29 | # Check dt and set dt_max if needed, this will be overwrite by the parameters provided in the mdp section of the config 30 | if 'dt' in mdp_template.parameters: # Avoid min step, it assumes that the rest of the mdp templates steps have dt defined. 31 | if float(mdp_template.parameters['dt'].split(';')[0]) > config["dt_max"]: 32 | mdp_template.set_parameters(dt=config["dt_max"]) 33 | 34 | # In case of user defined MDP keywords, take those from the config 35 | try: 36 | # TODO sanity check on the passed MDP options 37 | mdp_template.set_parameters(**config['mdp']['complex']['equi'][step]) 38 | except KeyError: 39 | pass 40 | # Write MDP to the proper location 41 | mdp_template.write(output_mdp) -------------------------------------------------------------------------------- /src/bindflow/rules/equi/complex/soluble/setup.smk: -------------------------------------------------------------------------------- 1 | rule equil_setup_complex: 2 | input: 3 | mdp=expand(str(TemplatePath.complex.soluble.equi/"{step}.mdp"), step=[step.stem for step in tools.list_if_file(TemplatePath.complex.soluble.equi, ext='.mdp')]) 4 | params: 5 | template_dir=TemplatePath.complex.soluble.equi, 6 | # Dynamically access the simulation steps based on the name of the mdp files inside template_dir. 7 | # Must be defined in this way, outside of the rule is overwrite it. 8 | steps=[step.stem for step in tools.list_if_file(TemplatePath.complex.soluble.equi, ext='.mdp')], 9 | ligand_names=config['ligand_names'], 10 | replicas=range(1,1 + config['replicas']), 11 | output: 12 | mdp=expand(out_approach_path+"/{ligand_name}/{replica}/complex/equil-mdsim/{step}/{step}.mdp", step=[step.stem for step in tools.list_if_file(TemplatePath.complex.soluble.equi, ext='.mdp')], ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))) 13 | run: 14 | for ligand_name in params.ligand_names: 15 | for replica in params.replicas: 16 | sim_dir = Path(out_approach_path)/f"{ligand_name}/{replica}/complex/equil-mdsim" 17 | # Create MDP template 18 | 19 | mdp_template = mdp.StepMDP(step_path = params.template_dir) 20 | 21 | # Not sure if the sorted is needed, just for safety 22 | for step in params.steps: 23 | (sim_dir/step).mkdir(exist_ok=True, parents=True) 24 | output_mdp = sim_dir/step/f"{step}.mdp" 25 | 26 | # Change to new MDP step 27 | mdp_template.set_new_step(step) 28 | 29 | # Check dt and set dt_max if needed, this will be overwrite by the parameters provided in the mdp section of the config 30 | if 'dt' in mdp_template.parameters: # Avoid min step, it assumes that the rest of the mdp templates steps have dt defined. 31 | if float(mdp_template.parameters['dt'].split(';')[0]) > config["dt_max"]: 32 | mdp_template.set_parameters(dt=config["dt_max"]) 33 | 34 | # In case of user defined MDP keywords, take those from the config 35 | try: 36 | # TODO sanity check on the passed MDP options 37 | mdp_template.set_parameters(**config['mdp']['complex']['equi'][step]) 38 | except KeyError: 39 | pass 40 | # Write MDP to the proper location 41 | mdp_template.write(output_mdp) -------------------------------------------------------------------------------- /src/bindflow/rules/equi/ligand/setup.smk: -------------------------------------------------------------------------------- 1 | rule equil_setup_ligand: 2 | input: 3 | mdp = expand(str(TemplatePath.ligand.equi/"{step}.mdp"), step = [step.stem for step in tools.list_if_file(TemplatePath.ligand.equi, ext='.mdp')]) 4 | params: 5 | template_dir = TemplatePath.ligand.equi, 6 | # Dynamically access the simulation steps based on the name of the mdp files inside template_dir. 7 | # Must be defined in this way, outside of the rule is overwrite it. 8 | steps = [step.stem for step in tools.list_if_file(TemplatePath.ligand.equi, ext='.mdp')], 9 | ligand_names = config['ligand_names'], 10 | replicas = range(1,1 + config['replicas']), 11 | output: 12 | mdp = expand(out_approach_path+"/{ligand_name}/{replica}/ligand/equil-mdsim/{step}/{step}.mdp", step = [step.stem for step in tools.list_if_file(TemplatePath.ligand.equi, ext='.mdp')], ligand_name = config['ligand_names'], replica = list(map(str, range(1,1 + config['replicas'])))) 13 | run: 14 | for ligand_name in params.ligand_names: 15 | for replica in params.replicas: 16 | sim_dir = Path(out_approach_path)/f"{ligand_name}/{replica}/ligand/equil-mdsim" 17 | 18 | # Create MDP template 19 | mdp_template = mdp.StepMDP(step_path = params.template_dir) 20 | 21 | # Not sure if the sorted is needed, just for safety 22 | for step in params.steps: 23 | (sim_dir/step).mkdir(exist_ok=True, parents=True) 24 | output_mdp = sim_dir/step/f"{step}.mdp" 25 | 26 | # Change to new MDP step 27 | mdp_template.set_new_step(step) 28 | 29 | # Check dt and set dt_max if needed, this will be overwrite by the parameters provided in the mdp section of the config 30 | if 'dt' in mdp_template.parameters: # Avoid min step, it assumes that the rest of the mdp templates steps have dt defined. 31 | if float(mdp_template.parameters['dt'].split(';')[0]) > config["dt_max"]: 32 | mdp_template.set_parameters(dt = config["dt_max"]) 33 | 34 | # In case of user defined MDP keywords, take those from the config 35 | try: 36 | # TODO sanity check on the passed MDP options 37 | mdp_template.set_parameters(**config['mdp']['ligand']['equi'][step]) 38 | except KeyError: 39 | pass 40 | # Write MDP to the proper location 41 | mdp_template.write(output_mdp) -------------------------------------------------------------------------------- /src/bindflow/rules/fep/Snakefile: -------------------------------------------------------------------------------- 1 | #Setup: FEP dir structure and make mdp files from templates 2 | if config["complex_type"] == 'soluble': 3 | include: 'complex/soluble/setup.smk' 4 | include: 'complex/soluble/simulation.smk' 5 | 6 | elif config["complex_type"] == 'membrane': 7 | include: 'complex/membrane/setup.smk' 8 | include: 'complex/membrane/simulation.smk' 9 | 10 | else: 11 | rule fep_not_implemented: 12 | output: 13 | "fep_not_implemented.txt" 14 | shell: 15 | "echo 'fep simulations, you must give complex_type = soluble or membrane' > {output}" 16 | 17 | 18 | # Ligand 19 | include: 'ligand/setup.smk' 20 | include: 'ligand/simulation.smk' 21 | include: 'ligand/ana.smk' 22 | 23 | # Do complex analysis 24 | include: 'complex/ana.smk' 25 | 26 | # Final Result: 27 | include: "calculate_result.smk" 28 | 29 | # Gather results 30 | include: "gather_receptor_results.smk" -------------------------------------------------------------------------------- /src/bindflow/rules/fep/calculate_result.smk: -------------------------------------------------------------------------------- 1 | from bindflow.free_energy import fep_analysis 2 | 3 | rule fep_get_dg_cycle: 4 | input: 5 | complex_json=out_approach_path+"/{ligand_name}/{replica}/complex/fep/ana/dg_complex_contributions.json", 6 | ligand_json=out_approach_path+"/{ligand_name}/{replica}/ligand/fep/ana/dg_ligand_contributions.json", 7 | output: 8 | out_file_path=out_approach_path+"/{ligand_name}/{replica}/dG_results.csv", 9 | run: 10 | fep_analysis.get_dg_cycle( 11 | ligand_contributions=input.ligand_json, 12 | complex_contributions=input.complex_json, 13 | out_csv=output.out_file_path 14 | ) -------------------------------------------------------------------------------- /src/bindflow/rules/fep/gather_receptor_results.smk: -------------------------------------------------------------------------------- 1 | from bindflow.free_energy import gather_results 2 | 3 | # Gather Results 4 | rule gather_receptor_results: 5 | input: 6 | prior_result_paths=expand(out_approach_path+"/{ligand_names}/{replica}/dG_results.csv", ligand_names=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))) 7 | output: 8 | out_dg_file=out_approach_path+"/fep_results.csv", 9 | out_raw_file=out_approach_path+"/fep_results_raw.csv", 10 | run: 11 | gather_results.get_all_fep_dgs( 12 | root_folder_path=out_approach_path, 13 | out_csv=output.out_dg_file 14 | ) 15 | gather_results.get_raw_fep_data( 16 | root_folder_path=out_approach_path, 17 | out_csv=output.out_raw_file 18 | ) -------------------------------------------------------------------------------- /src/bindflow/rules/fep/ligand/ana.smk: -------------------------------------------------------------------------------- 1 | from bindflow.free_energy import fep_analysis 2 | # Ana 3 | 4 | # TODO Here is the main issue!!!! How can I isolate for each ligand and each replica 5 | # If I use them as widlcards all the simulaiton must end, and that is not what we want 6 | rule fep_ana_get_dg_ligand_contributions: 7 | input: 8 | # Make sure that the simualtion ends properly 9 | finished_vdw=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/vdw.{state}/prod/prod.finished", state=range(len(config['lambdas']['ligand']['vdw'])), allow_missing=True), 10 | finished_coul=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/coul.{state}/prod/prod.finished", state=range(len(config['lambdas']['ligand']['coul'])), allow_missing=True), 11 | # To get the simulation temperature 12 | mdp=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/{sim_type}.{state}/prod/prod.mdp", state=range(len(config['lambdas']['complex']['bonded'])), sim_type=['vdw', 'coul'], allow_missing=True) 13 | params: 14 | # TODO finished_vdw is needed to connect the rule dependencies, but xvg_vdw is the thing that I need and they could also be passed as input. if finished is there xvg should also be there. 15 | xvg_vdw=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/vdw.{state}/prod/prod.xvg", state=range(len(config['lambdas']['ligand']['vdw'])), allow_missing=True), 16 | xvg_coul=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/coul.{state}/prod/prod.xvg", state=range(len(config['lambdas']['ligand']['coul'])), allow_missing=True), 17 | ana=out_approach_path+"/{ligand_name}/{replica}/ligand/fep/ana", 18 | output: 19 | ligand_json=out_approach_path+"/{ligand_name}/{replica}/ligand/fep/ana/dg_ligand_contributions.json" 20 | threads: threads # TODO: Sometimes the rule hang for a long time 21 | run: 22 | # Make directory 23 | # Get simulation temperature from any prod.mdp file (all should have the same) 24 | mdp_params = mdp.MDP().from_file(input.mdp[0]).parameters 25 | if 'ref-t' in mdp_params: 26 | temperature = float(mdp_params['ref-t'].split()[0]) 27 | elif 'ref_t' in mdp_params: 28 | temperature = float(mdp_params['ref_t'].split()[0]) 29 | 30 | fep_analysis.get_dG_contributions( 31 | boresch_data=None, 32 | out_json_path=output.ligand_json, 33 | # Check if it is necessary to remove some initial burning simulation time 34 | lower=None, 35 | upper=None, 36 | min_samples=500, 37 | temperature=temperature, 38 | # convergency_plots_prefix = params.ana + "/ligand_", 39 | convergency_plots_prefix=None, 40 | # Sort the paths 41 | vdw=sorted(params.xvg_vdw, key=lambda x: int(Path(x).parts[-3].split('.')[-1])), 42 | coul=sorted(params.xvg_coul, key=lambda x: int(Path(x).parts[-3].split('.')[-1])), 43 | ) -------------------------------------------------------------------------------- /src/bindflow/rules/fep/ligand/setup.smk: -------------------------------------------------------------------------------- 1 | rule fep_setup_ligand: 2 | input: 3 | mdp_vdw=expand(str(TemplatePath.ligand.fep/"vdw/{step}.mdp"), step=[step.stem for step in tools.list_if_file(TemplatePath.ligand.fep/"vdw", ext='.mdp')]), 4 | mdp_coul=expand(str(TemplatePath.ligand.fep/"coul/{step}.mdp"), step=[step.stem for step in tools.list_if_file(TemplatePath.ligand.fep/"coul", ext='.mdp')]) 5 | params: 6 | template_dir=str(TemplatePath.ligand.fep), 7 | vdw_lambdas=config['lambdas']['ligand']['vdw'], 8 | coul_lambdas=config['lambdas']['ligand']['coul'], 9 | ligand_names=config['ligand_names'], 10 | replicas=range(1,1 + config['replicas']), 11 | output: 12 | mdp_vdw=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/vdw.{state}/{step}/{step}.mdp", state=range(len(config['lambdas']['ligand']['vdw'])), step=[step.stem for step in tools.list_if_file(TemplatePath.ligand.fep/"vdw", ext='.mdp')], ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))), 13 | mdp_coul=expand(out_approach_path+"/{ligand_name}/{replica}/ligand/fep/simulation/coul.{state}/{step}/{step}.mdp", state=range(len(config['lambdas']['ligand']['coul'])), step=[step.stem for step in tools.list_if_file(TemplatePath.ligand.fep/"coul", ext='.mdp')], ligand_name=config['ligand_names'], replica=list(map(str, range(1,1 + config['replicas'])))) 14 | run: 15 | 16 | # In case of user defined MDP keywords, take those from the config 17 | try: 18 | # TODO sanity check on the passed MDP options 19 | mdp_extra_kwargs = config['mdp']['ligand']['fep'] 20 | except KeyError: 21 | mdp_extra_kwargs = {} 22 | 23 | for ligand_name in params.ligand_names: 24 | for replica in params.replicas: 25 | sim_dir = f"{out_approach_path}/{ligand_name}/{replica}/ligand/fep" 26 | # Create MDP template for Van der Waals states 27 | mdp.make_fep_dir_structure( 28 | sim_dir=sim_dir, 29 | template_dir=params.template_dir, 30 | lambda_values=params.vdw_lambdas, 31 | lambda_type='vdw', 32 | sys_type='ligand', 33 | dt_max=config["dt_max"], 34 | mdp_extra_kwargs=mdp_extra_kwargs, 35 | ) 36 | 37 | # Create MDP template for Coulomb states 38 | mdp.make_fep_dir_structure( 39 | sim_dir=sim_dir, 40 | template_dir=params.template_dir, 41 | lambda_values=params.coul_lambdas, 42 | lambda_type='coul', 43 | sys_type='ligand', 44 | dt_max=config["dt_max"], 45 | mdp_extra_kwargs=mdp_extra_kwargs, 46 | ) -------------------------------------------------------------------------------- /src/bindflow/rules/mmpbsa/Snakefile: -------------------------------------------------------------------------------- 1 | include: "setup.smk" 2 | include: "simulation.smk" 3 | include: "ana.smk" 4 | 5 | # Final Result: 6 | include: "gather_receptor_results.smk" -------------------------------------------------------------------------------- /src/bindflow/rules/mmpbsa/gather_receptor_results.smk: -------------------------------------------------------------------------------- 1 | from bindflow.free_energy import gather_results 2 | 3 | # Gather Results 4 | rule gather_receptor_results: 5 | input: 6 | mmxbsa_csv=expand(out_approach_path+"/{ligand_name}/{replica}/complex/mmpbsa/simulation/rep.{sample}/mmxbsa.csv", ligand_name = config['ligand_names'], replica = list(map(str, range(1,1 + config['replicas']))), sample = list(map(str, range(1,1 + config["samples"])))) 7 | output: 8 | out_dg_file=out_approach_path+"/mmxbsa_results.csv", 9 | out_raw_file=out_approach_path+"/mmxbsa_results_raw.csv" 10 | run: 11 | full_df = gather_results.get_raw_mmxbsa_dgs( 12 | root_folder_path=out_approach_path, 13 | out_csv=output.out_raw_file 14 | ) 15 | gather_results.get_all_mmxbsa_dgs( 16 | full_df=full_df, 17 | columns_to_process=None, 18 | out_csv=output.out_dg_file 19 | ) -------------------------------------------------------------------------------- /src/bindflow/rules/super_flow/Snakefile: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from bindflow import pkg_root_path 3 | from bindflow.utils import tools 4 | from bindflow.mdp import mdp 5 | from bindflow.mdp.templates import TemplatePath 6 | import os 7 | import shutil 8 | 9 | # Definition of global variables 10 | # Common to all the sub-workflows ligand/replica 11 | out_approach_path = config["out_approach_path"] 12 | load_dependencies = config['extra_directives']['dependencies'] 13 | 14 | threads = config['threads'] 15 | retries = config['retries'] 16 | mdrun_extra = config['extra_directives']['mdrun'] 17 | 18 | # System Generation 19 | include: 'build_ligand_systems.smk' 20 | 21 | # Do Equilibration 22 | include: pkg_root_path/"rules/equi/Snakefile" 23 | 24 | if config["calculation_type"] == "fep": 25 | # Do FEP 26 | include: pkg_root_path/"rules/fep/Snakefile" 27 | elif config["calculation_type"] == "mmpbsa": 28 | # Do MMPBSA 29 | include: pkg_root_path/"rules/mmpbsa/Snakefile" -------------------------------------------------------------------------------- /src/bindflow/rules/super_flow/build_ligand_systems.smk: -------------------------------------------------------------------------------- 1 | from bindflow.preparation import system_builder as sb 2 | 3 | ligand_paths = [Path(mol['conf']) for mol in config["inputs"]["ligands"]] 4 | ligand_basenames = [p.name for p in ligand_paths] 5 | ligand_names = [p.stem for p in ligand_paths] 6 | # Create a dictionary to map name to basename 7 | ligand_dict = {ligand_name: {'basename': ligand_basename, 'definition': ligand_definition} for ligand_name, ligand_basename, ligand_definition in zip(ligand_names, ligand_basenames, config["inputs"]["ligands"])} 8 | 9 | hmr_factor = config['hmr_factor'] 10 | if hmr_factor: 11 | hmr_factor=float(hmr_factor) 12 | else: 13 | hmr_factor=None 14 | 15 | rule make_ligand_copies: 16 | input: 17 | ligand_paths=ligand_paths 18 | output: 19 | ligand_copies=expand(out_approach_path+"/{ligand_name}/input/mol/{ligand_basename}", zip, ligand_name=ligand_names, ligand_basename=ligand_basenames) 20 | run: 21 | for ligand_path, ligand_copy in zip(input.ligand_paths, output.ligand_copies): 22 | # TODO: check if the topology was provided and also copy the file 23 | # I have to use the dict object, I just need this first rule to parallelize the rules 24 | shutil.copy(ligand_path, ligand_copy) 25 | 26 | rule build_ligand_system: 27 | input: 28 | # This is just used to parallelize 29 | mol_file=lambda wildcards: out_approach_path+"/{ligand_name}/input/mol/"+ligand_dict[wildcards.ligand_name]['basename'] 30 | output: 31 | out_approach_path+"/{ligand_name}/input/complex/complex.gro", 32 | out_approach_path+"/{ligand_name}/input/complex/complex.top", 33 | out_approach_path+"/{ligand_name}/input/complex/index.ndx", 34 | out_approach_path+"/{ligand_name}/input/ligand/ligand.gro", 35 | out_approach_path+"/{ligand_name}/input/ligand/ligand.top", 36 | threads: config["threads"] 37 | run: 38 | import logging 39 | logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(name)s - %(message)s') 40 | 41 | out_ligand_path = Path(out_approach_path)/wildcards.ligand_name 42 | out_ligand_input_path = out_ligand_path/'input' 43 | 44 | # Initialize the files builder 45 | with sb.MakeInputs( 46 | protein=config["inputs"]["protein"], 47 | host_name=config["host_name"], 48 | membrane=config["inputs"]["membrane"], 49 | cofactor=config["inputs"]["cofactor"], 50 | cofactor_on_protein=config["cofactor_on_protein"], 51 | water_model=config["water_model"], 52 | custom_ff_path=config["custom_ff_path"], 53 | hmr_factor=hmr_factor, 54 | fix_protein=config["fix_protein"], 55 | builder_dir=out_ligand_path/"builder", 56 | load_dependencies=load_dependencies, 57 | ) as builder: 58 | 59 | # Create topologies and input files 60 | # Here We will use the ligand definition 61 | builder(ligand_definition=ligand_dict[wildcards.ligand_name]['definition'], out_dir=out_ligand_input_path) -------------------------------------------------------------------------------- /tests/test_fep.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import pytest 4 | 5 | 6 | @pytest.mark.filterwarnings("ignore") 7 | def test_fep(): 8 | import tarfile 9 | import tempfile 10 | # import pytest 11 | from multiprocessing import cpu_count 12 | from pathlib import Path 13 | 14 | import yaml 15 | 16 | from bindflow.home import home 17 | from bindflow.orchestration.generate_scheduler import FrontEnd 18 | from bindflow.runners import calculate 19 | 20 | with tempfile.TemporaryDirectory(dir='.', prefix='.test_fep_') as tmp: 21 | home_path = home(dataDir='ci_systems') 22 | fname = home(dataDir='ci_systems') / 'WP6.tar.gz' 23 | tar = tarfile.open(fname, "r:gz") 24 | tar.extractall(tmp) 25 | tar.close() 26 | 27 | tmp_path = Path(tmp)/"WP6" 28 | ligand_files = list((tmp_path/"guest").rglob("*sdf"))[:2] 29 | 30 | ligands = [] 31 | for ligand_file in ligand_files: 32 | ligands.append({ 33 | 'conf': ligand_file, 34 | 'ff': { 35 | 'type': 'openff' 36 | # 'type': 'espaloma', 37 | # 'code': 'espaloma-0.3.1' 38 | } 39 | }) 40 | 41 | protein = { 42 | 'conf': str(tmp_path / 'host/WP6.gro'), 43 | 'top': str(tmp_path / 'host/WP6.top'), 44 | 'ff': { 45 | 'code': 'espaloma-0.3.1', 46 | }, 47 | } 48 | 49 | with open(home_path / "config-fep.yml", "r") as c: 50 | global_config = yaml.safe_load(c) 51 | # TODO 52 | # This is needed for MacOS when GROMACS is build wth -DGMX_GPU=OpenCL 53 | # This is not needed in the cluster because CUDA is different. 54 | global_config['extra_directives']['mdrun']['all']['ntmpi'] = 1 55 | 56 | num_jobs = cpu_count() 57 | threads = min(4, num_jobs) 58 | calculate( 59 | calculation_type='fep', 60 | protein=protein, 61 | ligands=ligands, 62 | membrane=None, 63 | cofactor=None, 64 | cofactor_on_protein=True, 65 | water_model='amber/tip3p', 66 | host_name='WP6', 67 | host_selection='resname WP6', 68 | hmr_factor=3, 69 | dt_max=0.004, 70 | threads=threads, 71 | num_jobs=num_jobs, 72 | replicas=1, 73 | scheduler_class=FrontEnd, 74 | job_prefix='host_guest.test', 75 | debug=True, 76 | out_root_folder_path=str(tmp_path / "fep-frontend"), 77 | submit=True, 78 | global_config=global_config) 79 | 80 | 81 | if __name__ == '__main__': 82 | pass 83 | -------------------------------------------------------------------------------- /tests/test_mmpbsa.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import pytest 4 | 5 | 6 | @pytest.mark.filterwarnings("ignore") 7 | def test_mmpbsa(): 8 | import tarfile 9 | import tempfile 10 | # import pytest 11 | from multiprocessing import cpu_count 12 | from pathlib import Path 13 | 14 | import yaml 15 | 16 | from bindflow.home import home 17 | from bindflow.orchestration.generate_scheduler import FrontEnd 18 | from bindflow.runners import calculate 19 | 20 | with tempfile.TemporaryDirectory(dir='.', prefix='.test_mmpbsa_') as tmp: 21 | home_path = home(dataDir='ci_systems') 22 | fname = home_path / 'WP6.tar.gz' 23 | tar = tarfile.open(fname, "r:gz") 24 | tar.extractall(tmp) 25 | tar.close() 26 | 27 | tmp_path = Path(tmp)/"WP6" 28 | ligand_files = list((tmp_path/"guest").rglob("*sdf"))[:2] 29 | 30 | ligands = [] 31 | for ligand_file in ligand_files: 32 | ligands.append({ 33 | 'conf': ligand_file, 34 | 'ff': { 35 | 'type': 'openff' 36 | # 'type': 'espaloma', 37 | # 'code': 'espaloma-0.3.1' 38 | } 39 | }) 40 | 41 | protein = { 42 | 'conf': str(tmp_path / 'host/WP6.gro'), 43 | 'top': str(tmp_path / 'host/WP6.top'), 44 | 'ff': { 45 | 'code': 'espaloma-0.3.1', 46 | }, 47 | } 48 | 49 | with open(home_path / "config-mmpbsa.yml", "r") as c: 50 | global_config = yaml.safe_load(c) 51 | # TODO 52 | # This is needed for MacOS when GROMACS is build wth -DGMX_GPU=OpenCL 53 | # This is not needed in the cluster because CUDA is different. 54 | global_config['extra_directives']['mdrun']['all']['ntmpi'] = 1 55 | 56 | num_jobs = cpu_count() 57 | threads = min(4, num_jobs) 58 | calculate( 59 | calculation_type='mmpbsa', 60 | protein=protein, 61 | ligands=ligands, 62 | membrane=None, 63 | cofactor=None, 64 | cofactor_on_protein=True, 65 | water_model='amber/tip3p', 66 | host_name='WP6', 67 | hmr_factor=3, 68 | dt_max=0.004, 69 | threads=threads, 70 | num_jobs=num_jobs, 71 | replicas=2, 72 | scheduler_class=FrontEnd, 73 | debug=True, 74 | job_prefix='host_guest.test', 75 | submit=True, 76 | out_root_folder_path=str(tmp_path / "mmpbsa-frontend"), 77 | global_config=global_config) 78 | 79 | 80 | if __name__ == '__main__': 81 | pass 82 | -------------------------------------------------------------------------------- /tests/test_small.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import tempfile 4 | import sys 5 | import pytest 6 | from rdkit import Chem 7 | from toff import Parameterize 8 | 9 | tmp_dir = tempfile.TemporaryDirectory() 10 | mol = Chem.MolFromSmiles('CC') 11 | 12 | 13 | @pytest.mark.filterwarnings("ignore") 14 | def test_Parameterize_openff(): 15 | parameterizer = Parameterize(overwrite=True, out_dir=tmp_dir.name, force_field_type='openff', hmr_factor=2.5) 16 | parameterizer(input_mol=mol, mol_resi_name='OPE',) 17 | 18 | 19 | @pytest.mark.xfail(sys.platform == "darwin", reason="This test is expected to fail on macOS") 20 | @pytest.mark.filterwarnings("ignore") 21 | def test_Parameterize_gaff(): 22 | parameterizer = Parameterize(overwrite=True, out_dir=tmp_dir.name, force_field_type='gaff') 23 | parameterizer(input_mol=mol, mol_resi_name='GAF') 24 | 25 | @pytest.mark.xfail(sys.platform == "darwin", reason="This test is expected to fail on macOS") 26 | @pytest.mark.filterwarnings("ignore") 27 | def test_Parameterize_espaloma(): 28 | parameterizer = Parameterize(overwrite=True, out_dir=tmp_dir.name, force_field_type='espaloma', force_field_code='espaloma-0.3.1') 29 | parameterizer(input_mol=mol, mol_resi_name='ESP') 30 | 31 | 32 | if __name__ == '__main__': 33 | pass 34 | --------------------------------------------------------------------------------