## Stucture of PKA:
pdb <- read.pdb("3dnd")
## Center of mass:
com(pdb)
## Center of mass of a selection
inds <- atom.select(pdb, chain="I")
com(pdb, inds)
## Unknown atom names
pdb <- read.pdb("3dnd")
inds <- atom.select(pdb, resid="LL2")
mycom <- com(pdb, inds, rescue=TRUE)
#warnings()
## Map atom names manually
pdb <- read.pdb("3RE0")
inds <- atom.select(pdb, resno=201)
elety.cust <- list("CL2"="Cl", "PT1"="Pt")
mass.cust <- list("Cl"=35.45, "Pt"=195.08)
mycom <- com(pdb, inds, elety.custom=elety.cust, mass.custom=mass.cust,
rescue=TRUE)
Run the code above in your browser using DataLab