GGL (Graph Grammar Library)


The GGL (Graph Grammar Library) is an object oriented ANSI C++ library to implement and apply graph rewrite systems. It implements a Double Push Out (DPO) approach. The library is highly modular and uses state-of-the-art algorithms and data structures. To this end, it uses the Boost Graph Library (BGL) for the internal graph representation and efficient (sub)graph isomorphism approaches as the VF2 algorithm.

GGL logo

Beside its general applicability, it features an extensive chemistry module to handle grammar-based graph transformation in Chemistry. Since a chemical reaction can be viewed as graph transformation from the set of educt graphs to the set of product graphs, the GGL can be used to iteratively expand the topology of chemical reaction network, starting from a set of chemical reactions (graph rewrite rules) and set of molecules (vertex and edge labeled graphs) using the general DPO framework of the GGL.

Furthermore, the GGL chemistry module sports efficient cheminformatics algorithms, for instance to estimate reaction rates or a molecule's energy or aromaticity. Furthermore, it comes with a port to the well established Open Babel Library.

The GGL can processes molecules in SMILES or GML format. Graph rewrite rules are usually formulated in GML.


The latest source code is now hosted on GitHub

The library comes as GNU autotools source code distributions together with a set of utility tools compiled along with the library. Furthermore, API and tutorial generation is part of the source code package as well.