aa2mass(pdb, inds=NULL, mass.custom=NULL, addter=TRUE, mmtk=FALSE)
pdb
can be
provided.atom.select
that selects the elements of pdb
upon which the calculation
should be based.mass.custom
can be used to map the residue to the correct
mass. User-defined amino acid masses (with argument mass.custom
)
will override mass entries obtained from the database. See examples for more details.
atom.index
, atom2mass
,
aa.index
resi.names <- c("LYS", "ALA", "CYS", "HIS")
masses <- aa2mass(resi.names, addter=FALSE)
## Fetch atomic masses in a PDB object
pdb <- read.pdb("3dnd")
masses <- aa2mass(pdb)
## or
masses <- aa2mass(pdb$atom[1:10,"resid"])
## Dealing with unconventional residues
#pdb <- read.pdb("1xj0")
#mass.cust <- list("CSX"=122.166)
#masses <- aa2mass(pdb, mass.custom=mass.cust)
Run the code above in your browser using DataLab