Copyright © 1996 by the Regents of the University of California.

Element Class Reference

The Element class provides a way to symbolically reference to elements by atomic symbol and atomic number.

Element Member Constants

Each single letter and double letter atomic symbol, from hydrogen to lawrencium, is a constant. In addition, LP stands for a lone pair (atomic number of zero), and D and T, for deuterium and tritium, are available and map to hydrogen. The type of the atomic symbol constants is Element::AS.

Element Member Functions

Element(const char *string)
Construct an Element whose atomic symbol is deduced from the given string. The first two characters in the string are examined, and a leading space, or a single character string, means that it is a single character atomic symbol.
Element(Element::AS a)
Construct an Element whose atomic symbol is given.
Element(unsigned int num)
Construct an Element whose atomic number is num.
const char *name() const
Return a string representation of the atomic symbol.
const int number() const
Return the atomic number corresponding ot the atomic symbol.
int operator==(const Element &asym) const
int operator<(const Element &asym) const
Return result of relational operator. Comparisons are made based on the corresponding atomic number.

Element Static Member Functions

float bondRadius(Element a)
Return a covalent bond radius which can be used for determining connectivity. Data is from: Elaine C. Meng and Richard A. Lewis, "Determination of Molecular Topology and Atomic Hybridization States from Heavy Atom Coordinates," Journal of Computational Chemistry, Vol. 12, No. 7, pp. 891-898 (1991).
float bondLength(Element a0, Element a1)
Return the sum of the atom's covalent bond radii. If the distance between the two atoms is less than or equal to this value then the atoms can be considered to be bonded.

Example

#include <mol/Element.h>

Element asym(Element::C);

Greg Couch, UCSF Computer Graphics Laboratory