# NOT RUN {
# Read PDB file
pdb <- read.pdb( system.file("examples/1hel.pdb", package="bio3d") )
# DM
d <- dm(pdb,"calpha")
# Plot DM
##filled.contour(d, nlevels = 4)
##plot(d)
plot(d,
resnum.1 = pdb$atom[pdb$calpha,"resno"],
color.palette = mono.colors,
xlab="Residue Number", ylab="Residue Number")
# }
# NOT RUN {
# Download and align two PDB files
pdbs <- pdbaln( get.pdb( c( "4q21", "521p"), path=tempdir(), overwrite=TRUE))
# Get distance matrix
a <- dm.xyz(pdbs$xyz[1,])
b <- dm.xyz(pdbs$xyz[2,])
# Calculate DDM
c <- a - b
# Plot DDM
plot(c,key=FALSE, grid=FALSE)
plot(c, axis.tick.space=10,
resnum.1=pdbs$resno[1,],
resnum.2=pdbs$resno[2,],
grid.col="black",
xlab="Residue No. (4q21)", ylab="Residue No. (521p)")
# }
Run the code above in your browser using DataLab