Skip to content

Instantly share code, notes, and snippets.

@FHedin
Created June 3, 2016 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FHedin/07e07e3fe695a15a002850a2e44a2df9 to your computer and use it in GitHub Desktop.
Save FHedin/07e07e3fe695a15a002850a2e44a2df9 to your computer and use it in GitHub Desktop.
R and bio3d : Dynamic Cross-Correlation from Normal Modes Analysis
# if bio3d not installed uncomment this
# install.packages('bio3d')
library('bio3d')
## Fetch stucture from RCSB
pdb <- read.pdb("1hel")
# or from local file
# pdb <- read.pdb('my.pdb')
#----------------------------------------------------------------------------------------
## Dynamic Cross-Correlation from Normal Modes Analysis
## Calculate normal modes
modes <- nma(pdb)
## Calculate correlation matrix
cm <- dccm.nma(modes)
plot(cm, sse = pdb, contour = FALSE, col.regions = bwr.colors(20), at = seq(-1, 1, 0.1))
#----------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment