A simple python script to facilitate the analysis of the MD trajectory of protein-ligand complexes produced by OpenMM and Gromacs.
This python script provides a simple way to perform the routine analysis of MD trajectory of protein or protein-ligand complexes generated by OpenMM and Gromacs. The periodic boundary conditions (PBC) will be corrected before the analysis were performed, and 5 functions were provided as followed:
(1) rmsd: Calculate the RMSD of protein heavy atoms, backbone, Cα, and ligand of the MD trajectory. The result will be saved as a png file and a csv file containing the corresponding row data. (2) extract complex: Extract frames from the MD trajectory within the specified time range and save them as a PDB file. (3) distance analysis: Calculate the distance changes between two atoms, indicated by atom label, in the MD trajectory. The result will be saved as a png file and a csv file containing the corresponding row data. (4) ligand rmsf: Calculate the RMSF of the ligand in a MD simulation. The result will be saved as a png file and a csv file containing the corresponding row data. (5) protein-ligand fingerprint: Calculate the interaction of between the protein and ligand in the MD trajectory.
The following installation is built on the previous installation, with one additional package, ProLif, required for the calculation of protein-ligand fingerprint. Please use the following command:
# create a new virtual environment:
conda create -n mdanalyzer python=3.9
# activate virtual environment
conda activate mdanalyzer
#install mdanalysis
conda install -c conda-forge mdanalysis
# install prolif
conda install -c conda-forge prolif
- Please put this script outside of the folder containing your MD results. For example, the MD topology file and MD trajectory are located at /data/usr/md1, please put this script to /data/usr
- Go to the directory:
cd /data/usr
- Type:
conda activate openmm
to activate the virtual environment - Type: python md_analyzer.py, and the following message will show:
please input the name of working directory:
- Type the name of the MD folder: md1 and the following message will show:
please specify the name of the pdb file and dcd file e.g. com.prmtop, traj.dcd
- For MD result produced by OpenMM, please use the .prmtop/.pdb and .dcd as:
com.prmtop,com.dcd
orcom.pdb,com.dcd
For MD result produced by Gromacs, please use the .gro and .xtc file as:com.gro,com.xtc
The following message will show:apo structure? (1) Yes (2) No
- For a protein-ligand complex, please type 2 and the following message will show after the load of data is finished. Please select the analysis by type 0-5 to perform your analysis.
please select the mode:
(1) rmsd
(2) extract complex
(3) distance analysis
(4) ligand rmsf
(5) protein-ligand fingerprint
(0) quit
- The results will be saved in the /data/usr/md1/analysis