## Not run:
# ##-- Read example trajectory file
# trtfile <- system.file("examples/hivp.dcd", package="bio3d")
# trj <- read.dcd(trtfile)
#
# ## Read the starting PDB file to determine atom correspondence
# pdbfile <- system.file("examples/hivp.pdb", package="bio3d")
# pdb <- read.pdb(pdbfile)
#
# ## select residues 24 to 27 and 85 to 90 in both chains
# inds <- atom.select(pdb, resno=c(24:27,85:90), elety='CA')
#
# ## lsq fit of trj on pdb
# xyz <- fit.xyz(pdb$xyz, trj, fixed.inds=inds$xyz, mobile.inds=inds$xyz)
#
# ## Dynamic cross-correlations of atomic displacements
# cij <- dccm(xyz)
#
# ## Default plot
# plot.dccm(cij)
#
# ## Change the color scheme and the range of colored data levels
# plot.dccm(cij, contour=FALSE, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01) )
#
# ## Add secondary structure annotation to plot margins
# sse <- dssp(read.pdb("1W5Y"), resno=FALSE)
# plot.dccm(cij, sse=sse)
#
# ## Add additional margin annotation for chains..
# ch <- ifelse(pdb$atom[pdb$calpha,"chain"]=="A", 1,2)
# plot.dccm(cij, sse=sse, margin.segments=ch)
#
# ## Plot with cluster annotation from dynamic network analysis
# #net <- cna(cij)
# #plot.dccm(cij, margin.segments=net$raw.communities$membership)
#
# ## Focus on major communities (i.e. exclude those below a certain total length)
# #plot.dccm(cij, margin.segments=net$raw.communities$membership, segment.min=25)
#
# ## End(Not run)
Run the code above in your browser using DataLab