Related Experiment Video
Updated: May 20, 2026

Curation of Computational Chemical Libraries Demonstrated with Alpha-Amino Acids
Published on: April 13, 2022
Systematic benchmark of substructure search in molecular graphs - From Ullmann to VF2
Hans-Christian Ehrlich1, Matthias Rarey
1Center for Bioinformatics, University of Hamburg, Bundestraße 43, 20146 Hamburg, Germany. rarey@zbh.uni-hamburg.de.
Background:
Searching for substructures in molecules belongs to the most elementary tasks in cheminformatics and is nowadays part of virtually every cheminformatics software. The underlying algorithms, used over several decades, are designed for the application to general graphs. Applied on molecular graphs, little effort has been spend on characterizing their performance. Therefore, it is not clear how current substructure search algorithms behave on such special graphs. One of the main reasons why such an evaluation was not performed in the past was the absence of appropriate data sets.
Results:
In this paper, we present a systematic evaluation of Ullmann's and the VF2 subgraph isomorphism algorithms on molecular data. The benchmark set consists of a collection of 1235 SMARTS substructure expressions and selected molecules from the ZINC database. The benchmark evaluates substructures search times for complete database scans as well as individual substructure-molecule pairs. In detail, we focus on the influence of substructure formulation and size, the impact of molecule size, and the ability of both algorithms to be used on multiple cores.
Conclusions:
The results show a clear superiority of the VF2 algorithm in all test scenarios. In general, both algorithms solve most instances in less than one millisecond, which we consider to be acceptable. Still, in direct comparison, the VF2 is most often several folds faster than Ullmann's algorithm. Additionally, Ullmann's algorithm shows a surprising number of run time outliers.
Related Concept Videos
Molecular Models
Predicting Molecular Geometry
Molecular Shapes
Two regions of electron density in a diatomic...
The Aufbau Principle and Hund's Rule
Molecular Comparison of Gases, Liquids, and Solids
π Molecular Orbitals of 1,3-Butadiene
The simplest conjugated diene is 1,3-butadiene: a four-carbon system where each carbon is sp2-hybridized and has an unhybridized p orbital that contains an unpaired electron. According to molecular orbital theory, atomic orbitals combine to form molecular orbitals such that the number...

