Created
June 3, 2016 12:22
-
-
Save FHedin/07e07e3fe695a15a002850a2e44a2df9 to your computer and use it in GitHub Desktop.
R and bio3d : Dynamic Cross-Correlation from Normal Modes Analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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