skblnw / mkfep

Automatic FEP setup for Gromacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mkfep.py

License

Automatic FEP setup for Gromacs

Usage

Preparing the environment

Make sure you have the following files and directories in your working directory:

  • md.gro or md.pdb: Structure file of your system
  • pdb2fep.py: Behind-the-scenes script to generate GROMACS topology files
  • run: Script to execute the simulation, largely depends on user's local envrionment
  • mdp: Directory containing MDP files for energy minimization, NVT equilibration, and MD production

Running the script

Execute the script as follows:

# Always make sure you activate your pmx environment
conda activate pmx
# Look at your GMXLIB to make sure you have access to mutated ff
echo $GMXLIB

# Execute the main script
python mkfep_prepare.py

Analyzing the results

We have prepared an analysis script (alchemical_analysis_script_py27.py) which utilizes alchemical-analysis developed by Mobley Lab.

To do: we are in the process of migrating to alchemlyb.

# After you modify the variables inside
python alchemical_analysis_script_py27.py

Installation

Steps

Download miniconda or anaconda (e.g. Miniconda3-py38_23.1.0-1-Linux-x86_64.sh)

bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh

Install pmx

conda create -n pmx python=3.8 numpy scipy matplotlib
conda activate pmx

git clone https://github.com/deGrootLab/pmx pmx
cd pmx
git checkout develop
python setup.py install

Install alchemical_analysis

Python 2 is required

We strongly suggest that you create a new conda environment for alchemical-analysis as it requires Python 2

conda create -n alchemical_analysis python=2.7
conda activate alchemical_analysis

conda install -c conda-forge pymbar
conda install matplotlib
git clone https://github.com/MobleyLab/alchemical-analysis.git
cd alchemical-analysis
python setup.py install
pip install pathlib2

Applying the Patch

Apply the following patch to the alchemical_analysis.py file:

> diff alchemical_analysis.py alchemical_analysis.py.backup
334c334
<          O = MBAR.computeOverlap()['matrix']
---
>          O = MBAR.computeOverlap()[2]

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This library is provided under the GNU General Public License v3.0 - see the LICENSE file for details.

The very original workflow was written by Kevin C. Chan. Later versions were developed by Qinglu Zhong, Jiachen Feng, Xufan Gao, and Guanqiao Zhang.

The workflow consists of and contains a lot of inspirations from alchemistry.org and alchemical-analysis.

This project is in no way not affiliated, sponsored, or otherwise endorsed by the original mkfep authors. It was developed at Institue of Quantitative Biology lead by Ruhong Zhou @ Zhejiang University.

Contact

About

Automatic FEP setup for Gromacs

License:GNU General Public License v3.0


Languages

Language:Python 95.0%Language:Shell 5.0%