GithubHelp home page GithubHelp logo

creedxasif / md-trajectory-analysis-bio3d Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 27 KB

This tutorial provides a comprehensive walk around to performing molecular dynamics (MD) trajectory analysis using the Bio3D package in R.

License: MIT License

bio3d gromacs md-data-analysis molecular-dynamics-simulation principal-component-analysis r dynamic-cross-correlation-matrx

md-trajectory-analysis-bio3d's Introduction

MD-Trajectory-Analysis-Bio3D

Introduction

This repository contains documentation and example scripts for performing molecular dynamics (MD) trajectory analysis using the Bio3D package in R. Bio3D is an R package that provides tools for the analysis of biomolecular structure, sequence, and molecular dynamics trajectories.

After a successful MD simulation, Create a new folder named analysis within the working folder

mkdir analysis

cd analysis

Trajectory correction

gmx trjconv -s ../md.tpr -f ../md.xtc -o md_center.xtc -center -pbc mol -ur compact

Select: protein

Select: system

collect the initial structure

gmx trjconv -s ../md.tpr -f ../md.xtc -o md.gro -pbc mol -ur compact -center -dump 0

select: protein

select: system

gmx trjconv -s ../md.tpr -f ../md.xtc -o md.pdb -pbc mol -ur compact -center -dump 0

select: protein

select: system (or)

gmx editconf -f md.gro -o md.pdb

[Note: you can either convert md.gro into md.pdb using gmx editconf, or directly download the md.pdb from the trajectory using -dump 0 as above mentioned]

Trajectory conversion

mdconvert md_center.xtc -t md.gro -o md.dcd

Required files prior to do analysis using Bio3D

  1. md.dcd
  2. md.pdb

Bio3D installation

install.packages("bio3d", dependencies=TRUE)

library(bio3d)

Trajectory Preparation

pdb<-read.pdb("md.pdb")

dcd<-read.dcd("md.dcd", cell=FALSE)

Select CA atoms of the protein

ca.inds<-atom.select(pdb,"protein",elety="CA")

Fit the trajectory to the selection of protein atoms

trj<-fit.xyz(pdb$xyz, dcd, fixed.inds=ca.inds$xyz, mobile.inds=ca.inds$xyz)

Trim the PDB to include only the selected protein CA atoms

protpdb<-trim.pdb(pdb,ca.inds)

protdcd<-trim(trj, col.inds=ca.inds$xyz)

Print the trimmed PDB coordinates

print(protpdb$xyz)

Print the trimmed trajectory coordinates

print(protdcd)

Trajectory Analysis

RMSD

rd<-rmsd(protpdb, protdcd, fit=TRUE, ncore=1)

plot(rd, typ='l',ylab="RMSD (Å)",xlab="Frame No.")

points(lowess(rd), typ='l', col="red", lty=1, lwd=3)

dev.copy(jpeg,filename="rmsd.jpg")

dev.off()

RMSF

rf<-rmsf(protdcd)

plot(rf, ylab="RMSF (Å)",xlab="Residue")

dev.copy(jpeg,filename="rmsf.jpg")

dev.off()

Principal Component Analysis (PCA)

pc<-pca.xyz(protdcd)

plot(pc,col=bwr.colors(nrow(dcd)))

dev.copy(jpeg, filename="pca,jpg")

dev.off()

pca

Dynamic Cross Correlation Matrix (DCCM)

dc<-dccm.xyz(protdcd)

plot.dccm(dc)

DCCM

Acknowledgements

The MD-Trajectory-Analysis-Bio3D was documented by Mohamed Asif. 

Feel free to contribute, report issues, or suggest enhancements by creating a GitHub Issue or submitting a pull request.

Enjoy analyzing molecular dynamics trajectories with Bio3D! 😉

Citation

  1. Grant, B. J., Skjærven, L., & Yao, X. (2020). The Bio3D packages for structural bioinformatics. Protein Science, 30(1), 20–30. https://doi.org/10.1002/pro.3923

md-trajectory-analysis-bio3d's People

Contributors

creedxasif avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.