# NOT RUN {
atom.names <- c("CA", "O", "N", "OXT")
atom2ele(atom.names)
# }
# NOT RUN {
# PDB server connection required - testing excluded
## Get atomic symbols from a PDB object with a customized data set
pdb <- read.pdb("3RE0",verbose=FALSE)
lig <- trim(pdb, "ligand")
## maps PT1 to Pt, CL2 to Cl, C4A to C
atom2ele(lig)
## map atom name to element manually
myelety <- data.frame(name = "CL2", symb = "Cl")
atom2ele(lig, elety.custom = myelety)
# }
Run the code above in your browser using DataLab