An open-access study published in Algorithms for Molecular Biology introduces laveau, a software tool that converts the RCLASS annotations of the KEGG reaction database into explicit double-pushout (DPO) graph transformation rules and, from those, complete atom-to-atom maps (AAMs) for enzyme-catalyzed reactions. Starting from 3195 RCLASSes, the algorithm generated 1232 DPO rules and 1594 global atom-to-atom maps, together with 253 partial maps that cover only a subset of the molecules participating in a reaction. The work, authored by Nora Beier, Thomas Gatter, Jakob L. Andersen, Peter F. Stadler and colleagues, addresses a long-standing gap: KEGG, one of the key resources for metabolic network data, describes the local chemical changes of its reactions but never publishes the explicit atom-by-atom correspondences that many downstream applications require.
Atom-to-atom maps record which atom in a reactant molecule ends up as which atom in a product molecule. They matter enormously in practice, because they form the starting point for constructing atom transition networks, which in turn play a key role in isotope tracing experiments and in atom-level models of metabolic networks. Yet obtaining such maps is notoriously difficult for biochemical reactions. Enzyme mechanisms are often complex and can involve atoms of the enzyme itself in intermediate stages that are invisible in the overall reaction written on the page. Because of this, enzymatic reactions differ significantly from uncatalyzed organic reactions and fall outside the training scope of modern machine-learning prediction tools. The authors report that in a recent evaluation, the rule-based tool RDTool outperformed machine-learning approaches but still achieved an accuracy below 65 percent, which is why expert-curated mapping data for biochemical reactions remains a resource that purely computational methods cannot currently replace.
What KEGG offers instead of explicit maps is the RCLASS system, a pattern-based description built from so-called RDM codes. Each RDM code specifies a correspondence between a local pattern in one reactant molecule and a corresponding pattern in one product molecule, with every atom described by a label drawn from 68 different neighborhood classes that capture compositional information about the atom’s chemical surroundings. This information is usually available only for a subset of all reactant-product pairs in a reaction, and multiple reactions sharing the same mechanism are grouped under a single RCLASS. The authors emphasize that this representation is very difficult to use for anything other than classifying reactions; retrieving the partial atom-to-atom map implicitly encoded in an RCLASS is a non-trivial task.
The mathematical heart of the new approach is the connection between reaction rules and a graph-theoretical reconstruction problem. In the DPO framework, a rule is written as a span of three graphs, L, K and R, where L is the pattern in the reactant that gets transformed, R is the corresponding pattern in the product, and K is an unchanged context isomorphic to a subgraph of both. Applying such a rule to a molecule graph means finding a match of L, deleting the parts of the match not preserved in K, and gluing in the new parts of R. Because chemical reactions preserve atoms, chemical DPO transformations only delete, insert, or relabel bonds, which drastically simplifies the applicability conditions. The authors prove that any subgraph of a reaction’s Imaginary Transition State (ITS) graph that covers all reaction edges defines a unique chemical DPO rule capable of transforming the reactants into the products. The ITS graph, also known in the machine-learning literature as a Condensed Graph of Reaction, contains an edge between two atoms whenever a bond exists in either the reactant or the product, with labels marking bonds that are broken, formed, or changed.
Reconstructing that rule graph from RCLASS data is, however, far from trivial, and the authors place it squarely in the tradition of the graph reconstruction conjecture, the still-open mathematical statement that graphs with enough vertices are uniquely determined by their deleted-vertex or deleted-edge subgraphs. There is no theoretical reason to expect RCLASSes to specify unique rules in all cases, and indeed non-uniqueness had to be handled explicitly at every step. The translation from RDM codes to pattern graphs alone is ambiguous: beyond five graph representations where the KEGG database itself indicates alternatives, the authors identified 20 additional cases requiring multiple interpretations, with some symbols needing up to four distinct alternatives. Within-ring bonds may be interpreted as aromatic bonds and vice versa, bonds involving oxygen do not distinguish single from double bonds, and changes in atomic charges can make different patterns share the same RDM code.
The laveau workflow proceeds stepwise. First, each RDM code is expanded into a pair of ordered trees rooted at the R-atom and then converted into RDM pattern graphs by replacing atom-type labels with their chemical structures, merging adjacent type graphs in a branch-and-bound search that respects bond types. Second, all possible embeddings of these pattern graphs into the actual molecular graphs stored in KEGG are enumerated, with consistency conditions imposed wherever embeddings overlap. Third, the pairwise pattern graphs of all RCLASSes belonging to one reaction are combined: if their union of partial matchings is itself a valid matching, it defines subgraphs L and R of the reactants and products and hence a DPO rule. Finally, the rule is applied to the reactants and the partial map is extended to a complete atom-to-atom map using a variant of the VF2 subgraph isomorphism algorithm, with an Integer Linear Program minimizing the number of remaining bond changes where needed. The authors deliberately made no attempt to resolve ambiguities by altering or ignoring KEGG’s own annotations.
The quantitative outcome, based on KEGG release 109.1 from March 2024, shows both the power and the limits of the approach. Of the 3195 RCLASSes, 2960, or 92.6 percent, could be converted into RDM pattern graphs; the remaining 235 contain undefined atoms that do not define local structures. Almost a fifth of the tractable cases, 588, yielded more than one pattern graph, and in 644 cases, about 29 percent of the tractable data, more than one rule was consistent with the RDM information. On the reaction side, 1495 KEGG reactions link to no RCLASS at all and 1102 link only to RCLASSes with undefined atoms, while 2880 reactions were filtered out because exhaustively enumerating all matching combinations was infeasible. Of the 4676 reactions remaining, DPO rules were generated for 3612, and 1594 reactions received complete global atom-to-atom maps.
Residual ambiguities turned out to be rare. For only 12 reactions did multiple validated solutions survive filtering, with symmetric molecules responsible in five cases and tautomerism in six; in a single reaction, R03930, two different DPO rules representing two genuinely different reaction mechanisms could both be validated. For 77 reactions, several maps differed only in the number of hydrogen exchanges and were filtered to the minimum. Where RCLASSes are missing for some reactant-product pairs, as in reaction R00912 where only three of nine possible RCLASSes are listed, the tool extracts D-atom subgraphs and uses VF2 to construct candidate completions of the reaction center, a procedure that recovered maps for 312 otherwise intractable reactions, though only 29 of those had a unique map. Because no gold-standard dataset exists, the authors note that correctness cannot be conclusively verified, but the completion step guarantees consistency with the associated KEGG reactions, and a comparison with the widely used RXNMapper showed that certain enzymatic mechanisms captured by laveau cannot be represented by such machine-learning methods.
The study also documents its limitations candidly. Embedding failed in 727 cases, particularly for reactions forming or breaking three-membered rings such as epoxides, because RDM data encodes such structures as paths in which two wildcard residues would need to match the same atom. RCLASSes with many similar R-atom environments or heavy branching, such as polymer-like entries with 16 R-atoms, trigger combinatorial explosions of possible embeddings; 164 RDM codes exceeded 1000 distinct embedding variations. Unbalanced KEGG reactions in which entire reactants are missing from the product side, such as R07733 where the released glucose is absent, prevented meaningful rules for 1064 reactions, and some chemically modified proteins lack molecular graphs altogether. The software and data are publicly available on GitHub, and the authors hope that the extracted DPO rules and atom-to-atom maps, now usable directly in atom-level metabolic network models built with the MØD software package, will reduce the need for expert-curated maps to be prepared reaction by reaction.
Subject of Research: Converting KEGG RCLASS reaction annotations into graph transformation rules and atom-to-atom maps
Article Title: Computing double-pushout graph transformation rules and atom-to-atom maps from KEGG RCLASS data
Article References: Beier, N., Gatter, T., Andersen, J. L., & Stadler, P. F. (2026). Computing double-pushout graph transformation rules and atom-to-atom maps from KEGG RCLASS data. Algorithms for Molecular Biology, 21(1), Article 3. https://doi.org/10.1186/s13015-025-00294-6
Image Credits: AI Generated
DOI: 10.1186/s13015-025-00294-6
Keywords: bioinformatics, cheminformatics, KEGG, atom-to-atom mapping, graph transformation, metabolic networks, reaction rules, enzyme-catalyzed reactions, graph reconstruction, DPO rules, Computing, double-pushout
News Source: Gregory Coleman. (October 29, 2026). New Tool Turns KEGG Reaction Class Data into Explicit Atom-to-Atom Maps. Scienmag.



