# NOT RUN {
##- pymol with a 'pdbs' object
attach(transducin)
# build a pymol session containing all structures in the PDBs object
pymol(pdbs)
# color by invariant core (
# core <- core.find(pdbs)
pymol(pdbs, col=core)
# color by RMSF
pymol(pdbs, col="rmsf")
# color by clustering
rd <- rmsd(pdbs$xyz)
hc <- hclust(as.dist(rd))
grps <- cutree(hc, k=3)
pymol(pdbs, col=grps)
##- pymol with a 'dccm' object
## Fetch stucture
pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") )
## Calculate normal modes
modes <- nma(pdb)
## Calculate correlation matrix
cm <- dccm.nma(modes)
pymol(cm, modes$xyz)
##- pymol with a 'nma' or 'pca' object
pymol(modes, mode=7)
detach(transducin)
# }
Run the code above in your browser using DataLab