Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

masses

Mass of Chemical Elements


Description

Determine the mass of chemical elements

Usage

masses(...)

## Default S3 method:
masses(x, ...)

## S3 method for class 'pdb'
masses(x, ...)

Arguments

x

either a character or an integer vector containing element symbols or atomic numbers, or an object of class ‘pdb’ from which element symbols are determined (see details).

...

further arguments passed to or from other methods.

Details

masses is a generic function to determine the mass of chemical elements.

For objects of class ‘pdb’:

  • First the element names are converted into element symbols using the toSymbols function.

  • Then their masses are taken from the elements data set.

NA values are returned for unrecognized elements.

Value

Return a numeric vector containing the mass of chemical elements.

See Also

Examples

x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
masses(x)

masses(c("C","Cl",NA,"AA","N"))

Rpdb

Read, Write, Visualize and Manipulate PDB Files

v2.3
GPL
Authors
Julien Idé
Initial release
2014-02-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.