## Not run:
# ##--- Read aligned PDB coordinates (CA only)
# aln <- read.fasta(system.file("examples/kif1a.fa",package="bio3d"))
# pdbs <- read.fasta.pdb(aln)
#
# ##--- Read the topology file of MD simulations
# ##--- For illustration, here we read another pdb file (all atoms)
# pdb <- read.pdb("2kin")
#
# #--- Map the non-gap positions to PDB C-alpha atoms
# #pc.inds <- gap.inspect(pdbs$ali)
# #npc.inds <- pdb2aln.ind(aln=pdbs, pdb=pdb, inds=pc.inds$f.inds)
#
# #npc.inds$a
# #npc.inds$b
#
# #--- Or, map the non-gap positions with a known close sequence in the alignment
# #npc.inds <- pdb2aln.ind(aln=pdbs, pdb=pdb, aln.id="1bg2", inds=pc.inds$f.inds)
#
# #--- Map core positions
# core <- core.find(pdbs)
# core.inds <- pdb2aln.ind(aln=pdbs, pdb=pdb, inds = core$c1A.atom)
#
# core.inds$a
# core.inds$b
#
# ##--- Fit simulation trajectories to one of the X-ray structures based on
# ##--- core positions
# #xyz <- fit.xyz(pdbs$xyz[1,], pdb$xyz, core.inds$a$xyz, core.inds$b$xyz)
#
# ##--- Do PCA of trajectories based on non-gap positions
# #pc.traj <- pca(xyz[, npc.inds$b$xyz])
#
# ## End(Not run)
Run the code above in your browser using DataLab