Open Babel Documentation

2.0.2

Introduction and History

It is fair to say that Open Babel is a direct result of the original Babel. Application development is facilitated by building software on top of libraries rich in functionality. Babel was the first experience for Matt Stahl in designing a molecule library. In addition to developing Babel, Pat Walters and Matt developed `OBabel' at Vertex Pharmaceuticals, a first attempt at developing an object oriented molecule library. Matt later designed a new molecule class library, OELib -- designed to be flexible, extensible, portable, and efficient.

OELib was released under the GNU General Public License (GPL) by Matt Stahl and Open Eye Scientific Software, Inc. to take advantage of many of the "great minds writing chemical software." Open Babel took up where OELib and Babel left off, starting from the existing GPL version of OELib, and has continued to evolve and improve into a separate high-quality chemistry class library and tool. Open Babel is now a separate project and library and has changed considerably from the OELib days.

Thanks to all who have helped with Babel, OBabel, OELib and Open Babel. The list is long and growing.

Key Modules

The heart of Open Babel lies in the OBMol, OBAtom, and OBBond classes, which handle operations on atoms, bonds and molecules. Newcomers should start with looking at the OBMol class, designed to store the basic information in a molecule and to perceive information about a molecule.

One of the key philosophies in the code is that transformations and automatic perception of properties are performed in a "lazy" manner. That is, until you call for partial atomic charges, no charges are calculated. This ensures faster transformations of chemical data -- properties that are not needed for your code will typically not be calculated. When such data is needed, appropriate routines are called, and a "flag" is set (e.g., via OBMol::SetFlag or OBAtom::SetFlag etc.) so that the code is only run once.

Arbitrary custom data and text descriptors can be stored in any atom, bond, molecule, or residue using the OBGenericData or OBPairData classes.

Conversion between various chemical file formats is accomplished through the OBConversion and OBFormat classes, often through use of the OBMoleculeFormat subclass which is designed for easy read/write access to one or more OBMol objects. The philosophy of the file format codes is to parse as much chemical information from a given file as possible (no data left behind) and ideally any perception or transformations will occur when writing to some other format later.