# NOT RUN {
## Read a PDB file from the RCSB online database
pdb <- read.pdb("1bg2")
## Select calpha atoms
sele <- atom.select(pdb, "calpha")
## Trim XYZ
trim(pdb$xyz, col.inds=sele$xyz)
## Equals to
pdb$xyz[, sele$xyz, drop=FALSE]
# }
Run the code above in your browser using DataLab