# NOT RUN {
##- PCA example
attach(transducin)
# Calculate principal components
pc.xray <- pca(pdbs, fit=TRUE)
# Write PC trajectory of pc=1
outfile = tempfile()
a <- mktrj(pc.xray, file = outfile)
outfile
detach(transducin)
##- NMA example
## Fetch stucture
pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") )
## Calculate (vibrational) normal modes
modes <- nma(pdb)
## Visualize modes
outfile = file.path(tempdir(), "mode_7.pdb")
mktrj(modes, mode=7, pdb=pdb, file = outfile)
outfile
# }
Run the code above in your browser using DataLab