R: Amino Acid Residues to Mass Converter

aa2mass {bio3d} | R Documentation

## Amino Acid Residues to Mass Converter

### Description

Convert a sequence of amino acid residue names to mass.

### Usage

    aa2mass(pdb, inds=NULL, mass.custom=NULL, addter=TRUE, mmtk=FALSE)

### Arguments

`pdb` | a character vector containing the atom names to convert to atomic masses. Alternatively, a object of type `pdb` can be provided.
`inds` | atom and xyz coordinate indices obtained from `atom.select` that selects the elements of `pdb` upon which the calculation should be based.
`mass.custom` | a list of amino acid residue names and their corresponding masses.
`addter` | logical, if TRUE terminal atoms are added to final masses.
`mmtk` | logical, if TRUE use the exact aminoacid residue masses as provided with the MMTK database (for testing purposes).

### Details

This function converts amino acid residue names to their corresponding masses. In the case of a non-standard amino acid residue name `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.

### Value

Returns a numeric vector of masses.

### Note

When object of type `pdb` is provided, non-calpha atom records are omitted from the selection.

### Author(s)

Lars Skjaerven

### References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

### See Also

`atom.index`, `atom2mass`, `aa.index`

### Examples

    resi.names <- c("LYS", "ALA", "CYS", "HIS")
    masses <- aa2mass(resi.names, addter=FALSE)

    ## Not run:
    ## 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)

    ## End(Not run)

[Package bio3d version 2.4-2 Index]