# NOT RUN {
# Redundant testing excluded
# Read sequence alignment
file <- system.file("examples/kif1a.fa",package="bio3d")
aln <- read.fasta(file)
# Read aligned PDBs
pdbs <- read.fasta.pdb(aln)
# Structure/sequence names/ids
basename( pdbs$id )
# Alignment positions 335 to 339
pdbs$ali[,335:339]
pdbs$resid[,335:339]
pdbs$resno[,335:339]
pdbs$b[,335:339]
# Alignment C-alpha coordinates for these positions
pdbs$xyz[, atom2xyz(335:339)]
# See 'fit.xyz()' function for actual coordinate superposition
# e.g. fit to first structure
# xyz <- fit.xyz(pdbs$xyz[1,], pdbs)
# xyz[, atom2xyz(335:339)]
# }
Run the code above in your browser using DataLab