# NOT RUN {
##- Singe structure NMA
## Fetch stucture
pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") )
## Calculate normal modes
modes <- nma(pdb)
## Print modes
print(modes)
## Plot modes
plot(modes)
## Visualize modes
#m7 <- mktrj.nma(modes, mode=7, file="mode_7.pdb")
# }
# NOT RUN {
## Needs MUSCLE installed - testing excluded
##- Ensemble NMA
if(check.utility("muscle")) {
## Fetch PDB files and split to chain A only PDB files
ids <- c("1a70_A", "1czp_A", "1frd_A", "1fxi_A", "1iue_A", "1pfd_A")
files <- get.pdb(ids, split = TRUE, path = tempdir())
## Sequence Alignement
pdbs <- pdbaln(files, outfile = tempfile())
## Normal mode analysis on aligned data
modes <- nma(pdbs, rm.gaps=FALSE)
## Plot fluctuation data
plot(modes, pdbs=pdbs)
}
# }
Run the code above in your browser using DataLab