1.3 Getting Started with OEChem Molecules

For those of you who just picked up the OEChem manual for the first time and are looking for somewhere to get started, let us consider the OEGraphMol.  This is the object representing a molecule used in most example programs you will find in OEChem's example directories, or in the listings of this manual. An OEGraphMol is a concrete class which can be declared and used for most molecular functions in OEChem. An OEGraphMol contains atoms and bonds which can be accessed through iterators via its API. Much of an OEGraphMol's API is defined by the OEMolBase abstract base-class. An OEGraphMol can be passed to any function which takes an OEMolBase argument. For efficiency, the OEGraphMol does not inherit from OEMolBase. This pattern will be discussed in more detail later in this manual. This is an over-simplistic view of the OEChem molecular hierarchy, but it provides a useful starting point for understanding and using OEChem.

Simplistic OEChem inheritance scheme:
                OEBase
                 /|\
                  |
                  |
                OEMolBase ---------------- OEGraphMol
<- indicates inheritance
-- indicates API correspondence without inheritance

Further information on OEChem molecules and OEChem design decisions can be found in the chapters entitled OEMols and OEGraphMols, OEQMols and Queries in OEChem Design Decisions.