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 the OEMol. This is the molecule used in most example programs you will find in OEChem's example directories, or in the listings of this manual. An OEMol is a concrete class which can be declared and used for most molecular functions in OEChem. An OEMol contains atoms and bonds which can be accessed through iterators via the molecule API. Much of the OEMol's API is defined by the OEMolBase abstract base-class. An OEMol can be passed to any function which takes an OEMolBase argument. For efficiency, the OEMol 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 ---------------- OEMol
<- 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.