15.1 Integer Atom Types and Type Names

Atom typing, or the task of classifying each atom in a molecule by its immediate chemical environment, is a common task in computational chemistry applications. Atoms of the same ``type'' are assumed to behave similarly or have similar properties within different molecules or at different locations within the same molecule. The most common uses of atom types are for molecular mechanics force fields and some property prediction algorithms.

The OEChem library supports both atom and bond typing with two independent properties on each OEAtomBase and OEBondBase respectively. They are the signed integer form of the atom type, and the string form of the atom type name. Typically, the integer property tends to be used computationally and is often derived algorithmically, whereas the string name is often the ``type'' as read in from an input file, or set based upon the perceived integer type before writing to a particular file format.

The integer atom type is set using the OEAtomBase::SetIntType method and is retrieved with the OEAtomBase::GetIntType method. The atom type name string is set with OEAtomBase::SetType and retrieved with OEAtomBase::GetType. The equivalent functions also existing in OEBondBase for setting and retrieving the integer bond type and the bond type name string.

Note that the atom type name string is not the same as the atom name. To give an example, a Sybyl .mol2 file may contain an atom with name ``N9'' but with atom type name ``N.pl3''. The use of two separate properties allows these fields to be preserved, and a mol2 file written out with exactly the same atom name and atom type name. Example bond type names might include ``am'' or ``ar''.

One major use of integer bond types is encoding the aromatic form of a connection table before calling OEKekulize. The semantics of OEKekulize require that integer bond types 1 through 4 represent single, double, triple and quadruple bonds, and that integer bond type 5 represents an aromatic bond. Given these integer bond types as input, OEKekulize determines a (possibly arbitrary) Kekulé form, and sets the bond order properties of the bonds of a molecule appropriately (using OEBondBase::SetOrder).