## Not run:
#
# ##-- Generate a small kinesin alignment and read corresponding structures
# pdbfiles <- get.pdb(c("1bg2","2ncd","1i6i","1i5s"), URLonly=TRUE)
# pdbs <- pdbaln(pdbfiles)
#
# ##-- Find 'core' positions
# core <- core.find(pdbs)
# plot(core)
#
# ##-- Fit on these relatively invarient subset of positions
# core.inds <- print(core)
# xyz <- pdbfit(pdbs, core.inds, outpath="corefit_structures")
#
# ##-- Compare to fitting on all equivalent positions
# xyz2 <- pdbfit(pdbs)
#
# ## Note that overall RMSD will be higher but RMSF will
# ## be lower in core regions, which may equate to a
# ## 'better fit' for certain applications
# gaps <- gap.inspect(pdbs$xyz)
# rmsd(xyz[,gaps$f.inds])
# rmsd(xyz2[,gaps$f.inds])
#
# plot(rmsf(xyz[,gaps$f.inds]), typ="l", col="blue", ylim=c(0,9))
# points(rmsf(xyz2[,gaps$f.inds]), typ="l", col="red")
#
# ## End(Not run)
Run the code above in your browser using DataLab