## Not run: 
#  pdb <- read.pdb("1bg2")
#  crdfile <- paste(tempfile(), '.crd', sep='')
#  write.crd(pdb, file=crdfile)
#  crd <- read.crd(crdfile, ext=FALSE)
#  ca.inds <- which(crd$calpha)
#  crd$atom[ca.inds[1:20],c("x","y","z")]
# # write.pdb(crd, file=tempfile())
# ## End(Not run)
Run the code above in your browser using DataLab