Graph Rewriting Based Search for Molecular Structures: Definitions, Algorithms, Hardness

  • Ernst Althaus
  • Andreas Hildebrandt
  • Domenico MoscaEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10748)


We define a graph rewriting system that is easily understandable by humans, but rich enough to allow very general queries to molecule databases. It is based on the substitution of a single node in a node- and edge-labeled graph by an arbitrary graph, explicitly assigning new endpoints to the edges incident to the replaced node. For these graph rewriting systems, we are interested in the subgraph-matching problem. We show that the problem is NP-complete, even on graphs that are stars. As a positive result, we give an algorithm which is polynomial if both rules and query graph have bounded degree and bounded cut size. We demonstrate that molecular graphs of practically relevant molecules in drug discovery conform with this property. The algorithm is not a fixed-parameter algorithm. Indeed, we show that the problem is W[1]-hard on trees with the degree as the parameter.


  1. 1.
    Ash, S., Cline, M.A., Homer, R.W., Hurst, T., Smith, G.B.: SYBYL line notation (SLN): a versatile language for chemical structure representation. J. Chem. Inf. Comput. Sci. 37(1), 71–79 (1997)CrossRefGoogle Scholar
  2. 2.
    Dehof, A.K., Lenhof, H.P., Hildebrandt, A.: Predicting protein NMR chemical shifts in the presence of ligands and ions using force field-based features. In: Proceedings of German Conference on Bioinformatics 2011 (2011)Google Scholar
  3. 3.
    Dehof, A.K., Rurainski, A., Bui, Q.B.A., Böcker, S., Lenhof, H.-P., Hildebrandt, A.: Automated bond order assignment as an optimization problem. Bioinformatics 27(5), 619–625 (2011)CrossRefGoogle Scholar
  4. 4.
    Dietzen, M., Zotenko, E., Hildebrandt, A., Lengauer, T.: Correction to on the applicability of elastic network normal modes in small-molecule docking. J. Chem. Inf. Model. 54(12), 3453 (2014)CrossRefGoogle Scholar
  5. 5.
    Ehrlich, H.-C., Rarey, M.: Systematic benchmark of substructure search in molecular graphs - from Ullmann to VF2. J. Cheminform. 4, 13 (2012)CrossRefGoogle Scholar
  6. 6.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, New York (1979)zbMATHGoogle Scholar
  7. 7.
    Lautemann, C.: The complexity of graph languages generated by hyperedge replacement. Acta Inf. 27(5), 399–421 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Pietrzak, K.: On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems. J. Comput. Syst. Sci. 67(4), 757–771 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Rozenberg, G. (ed.): Handbook of Graph Grammars and Computing by Graph Transformations: Foundations, vol. 1. World Scientific, Singapore (1997)zbMATHGoogle Scholar
  10. 10.
    Schaefer, T.J.: The complexity of satisfiability problems. In: Lipton, R.J., Burkhard, W.A., Savitch, W.J., Friedman, E.P., Aho, A.V. (eds.) Proceedings of 10th Annual ACM Symposium on Theory of Computing, 1–3 May 1978, San Diego, California, USA, pp. 216–226. ACM (1978)Google Scholar
  11. 11.
    Zamora, A.: An algorithm for finding the smallest set of smallest rings. J. Chem. Inf. Comput. Sci. 16, 40–43 (1976)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2018

Authors and Affiliations

  • Ernst Althaus
    • 1
  • Andreas Hildebrandt
    • 1
  • Domenico Mosca
    • 1
    Email author
  1. 1.Johannes Gutenberg-Universität MainzMainzGermany

Personalised recommendations