Abstract. Graph rewrite systems are powerful tools to model and study complex problems in various fields of research. Their successful application to chemical reaction modelling on a molecular level was shown but no appropriate and simple system is available at the moment. The presented Graph Grammar Library (GGL) implements a generic Double Push Out approach for general graph rewrite systems. The framework focuses on a high level of modularity as well as high performance, using state-of-the-art algorithms and data structures, and comes with extensive documentation. The large GGL chemistry module enables extensive and detailed studies of chemical systems. It well meets the requirements and abilities envisioned by Yadav et al. (2004) for such chemical rewrite systems. Here, molecules are represented as undirected labeled graphs while chemical reactions are described by according graph grammar rules. Beside the graph transformation, the GGL offers advanced cheminformatics algorithms for instance to estimate energies ofmolecules or aromaticity perception. These features are illustrated using a set of reactions from polyketide chemistry a huge class of natural compounds of medical relevance. The graph grammar based simulation of chemical reactions offered by the GGL is a powerful tool for extensive cheminformatics studies on a molecular level. The GGL already provides rewrite rules for all enzymes listed in the KEGG LIGAND database is freely available at http://www.tbi.univie.ac.at/software/GGL/.
BackgroundGraphs are powerful tools to represent and study all kind of data in any field of research. In order to generate graph structures of interest or to alter them according to some directive, graph transformations can be applied. A common approach is to formulate such transformations in terms of graph grammars or graph rewrite systems [5,7,37]. This enables a compact but very expressive representation of allowed alterations and allows for sound mathematical analyses of the problems [2,19].Here, we present our Graph Grammar Library (GGL), a fast and generic C++ framework to formulate and apply graph grammars. Beside the general graph rewrite system, we provide a specialized module to enable efficient graph grammar applications in chemical context. The power of such systems for chemical studies was highlighted by Yadav et al. [49] who emphasized the lack and need for an efficient implementation. The requirements and abilities sketched by Yadav et al. are well met by the capabilites of the GGL framework as presented within this manuscript.To represent molecules in graph notation is well known in chemistry and found in any text book. Therein, atoms are represented by labeled nodes in the graph and the connecting chemical bonds are depicted by according edges (see Fig. 1 a) and b)). Such molecule graphs can be used to model chemical reactions by the application of graph grammar rules as shown in Fig. 1 c) and d). This small example shows already the power of graph rewrite systems, since a single graph grammar rule encodes...