ErtlFunctionalGroupsFinder: automated rule-based functional group detection with the Chemistry Development Kit (CDK)

Sebastian Fritsch, Stefan Neumann, Jonas Schaub, Christoph Steinbeck, Achim ZielesnyJournal of Cheminformatics 2019 · DOI

TL;DR

This paper presents a new Java implementation of the Ertl algorithm for automated functional group (FG) detection in organic molecules, built upon the Chemistry Development Kit (CDK). The implementation is highly efficient, processing over 150 million molecules per hour on a single workstation core, and demonstrates the significant impact of CDK's aromaticity models on FG identification.

What Problem Does This Paper Address?

Identifying functional groups (FGs) in organic molecules is a fundamental task in chemistry, crucial for understanding reactivity, categorizing molecules, and building predictive models like Quantitative Structure-Activity Relationships (QSAR). Traditionally, this has been a manual process performed by chemists. While algorithmic approaches exist, this paper addresses the need for a robust, efficient, and open-source implementation of a purely rule-driven FG detection method. Specifically, it aims to provide a tool that can handle large chemical databases quickly and accurately, while also exploring the nuances of how different chemical perception models (like aromaticity) influence the results.

Methods

The core of this work is the implementation of the Ertl algorithm within the Chemistry Development Kit (CDK) framework, creating a new Java class called ErtlFunctionalGroupsFinder. The algorithm proceeds in three steps:

  1. Atom Marking: Atoms within a molecule are identified and marked based on a set of Ertl rules. This involves querying atomic connectivity and using CDK's GraphUtil for efficiency. Special attention is given to heteroatoms and carbonyl carbons.
  2. FG Detection and Extraction: A breadth-first search (BFS) is employed to group connected marked atoms into FGs. The "environment" of each FG (neighboring atoms and their properties) is also captured.
  3. Generalization: A generalization scheme is applied to the detected FGs. This step simplifies the FG representation by replacing certain atoms (like explicit hydrogens on heteroatoms) with generic "R-atoms" and removing most environmental carbon information, except for specific cases like carbonyls. An alternative "no-generalization" mode is also offered, preserving more environmental detail.

The paper also investigates the impact of different CDK aromaticity models (specifically, four "electron donation types") and various "cycle finder" algorithms on the FG detection results.

Datasets

The primary dataset used for evaluation is the ChEMBL database, a large collection of bioactive molecules. The authors analyzed approximately 1.8 million compounds from ChEMBL to assess the performance and compare the results of their implementation with other methods. No new benchmark datasets were introduced.

Key Insights and Ideas

  • CDK Aromaticity Models Matter: The choice of aromaticity model within CDK significantly influences the detected FGs. Different models can lead to variations in how rings are perceived and how electron contributions are assigned, resulting in different FG assignments for the same molecule. For instance, the daylight electron donation type can lead to a more nuanced FG identification compared to others.
  • Efficiency is Key: The ErtlFunctionalGroupsFinder is remarkably fast, achieving processing speeds of over 50 million molecules per hour on a single CPU core. This efficiency is crucial for analyzing large chemical datasets.
  • Open-Source Advantage: Providing an open-source implementation within the widely-used CDK framework democratizes access to advanced FG detection capabilities for the research community.
  • Comparison Reveals Nuances: Comparing the CDK implementation with the RDKit implementation highlights differences in FG representation (generalized vs. pseudo-SMILES) and reveals subtle variations in detection outcomes, underscoring the complexity of chemical perception.

Key Results

  • Performance: The ErtlFunctionalGroupsFinder can process over 150 million molecules per hour using four parallelized threads on a standard workstation. Even a single thread achieves a speed of over 50 million molecules per hour.
  • FG Frequency Analysis: Analysis of 1.8 million ChEMBL compounds revealed common FGs such as tertiary amines, ethers, and amides. The frequency of these FGs varied depending on the chosen CDK electron donation type.
  • Comparison with RDKit: While generally in good agreement, the comparison with IFG RDKit showed differences in the number of unique FGs detected and their representations. The CDK implementation, with its generalization step, produced a more structured output.

Limitations and Future Work

  • Charge Neutralization: The paper acknowledges that the current charge neutralization scheme (zeroing formal charges and adding hydrogens) can sometimes produce chemically "wrong" structures (e.g., a nitro group becoming [H]O[N](=O)R). An improved scheme is desired for future implementations.
  • Rare FG Detection Issues: The ErtlFunctionalGroupsFinder failed to detect certain FGs, such as the RN*(R)N*(R)R (two bonded aromatic nitrogen atoms) found by RDKit. This is attributed to the Ertl algorithm's rule for handling aromatic heteroatoms. Further investigation into these rare problems could lead to improved preprocessing or extensions to the Ertl rules.
  • Integration into CDK: The authors request integration of the ErtlFunctionalGroupsFinder into future CDK releases, which would further enhance its accessibility and adoption.
  • Machine Learning Applications: The authors suggest that FGs can serve as "feature vectors" or "fingerprints" for molecular comparison, clustering, and classification, potentially improving QSAR/QSPR research and machine learning approaches.

Summary updated

Abstract

The Ertl algorithm for automated functional groups (FG) detection and extraction of organic molecules is implemented on the basis of the Chemistry Development Kit (CDK). A distinct impact of the chosen CDK aromaticity model is demonstrated by an FG analysis of the ChEMBL database compounds. The average performance of less than a millisecond for a single-molecule FG extraction allows for fast processing of even large compound databases.
BibTeX
@article{fritsch2019ertlfunctionalgroupsfinder,
  author = {Sebastian Fritsch and Stefan Neumann and Jonas Schaub and Christoph Steinbeck and Achim Zielesny},
  title = {{ErtlFunctionalGroupsFinder: automated rule-based functional group detection with the Chemistry Development Kit (CDK)}},
  journal = {Journal of Cheminformatics},
  year = {2019},
  doi = {10.1186/s13321-019-0361-8},
}

Loading related content...

Figure