#37 2D template handling uses fingerprint screens

Rajarshi Guha
Rajarshi Guha

Since the 2D layout code uses subgraph isomoprhism to identify when template coordinates can be used for a given query molecule, the use of fingerprint screening helps to avoid unnecessary isomorphism tests.

The current patch provides for the following:

  1. Added a text file containing GraphOnlyFingerprint results for the current template molecules
  2. Added a build target (makefp2d) that can be run from the CLI to regenerate this above fp file
  3. Updated TemplateHandler to have
  4. main() that generates the template fp's
  5. mapTemplates now generates a fingerprint for the incoming molecule and only performs subgraph matching a template fingerprint is a subset of the incoming molecules' fingerprint
  6. Added a test case to specifically check when molecules pass the fingerprint screen. Requires a protected variable in the main code - but since it won't show inthe API, it's useful to keep it there for testing purposes

You can get the changes by

git pull git://rguha.ath.cx/cdk fp2d


  • Rajarshi asked me to put up the branch on a machine here in Uppsala, as his ath.cx machine is going down, so please check the patch from:

    git pull http://pele.farmbio.uu.se/git/rajarshi.git/ fp2d

  • Rajarshi, what should we do with this one? Can you perhaps update the patch to the current master?

    • Branch: --> master
    • Group: --> Needs_Revision
  • John May
    John May

    Ah I thought I remember a patch for this. This is really needed the SDG uses templates by default and worst of all loads them from CML! for every single structure. Some of the cuff tests on chebi.

    useTemplates(false): 6220 structures 8585 ms (724.47 s-1)
    useTemplates(true): 350 structures 10020 ms (34.93 s-1) DEFAULT