liveBook · Manning

Hashed fingerprint

As explained in Build AI Drug Discovery Pipelines

A path-based hashed fingerprint encodes linear molecular paths by hashing them into a fixed-length bit representation.

A hashed fingerprint converts a molecule’s two-dimensional structure into a fixed-length bit vector. Unlike structural keys, it needs no predefined fragment dictionary, making it more flexible for virtual screening and similarity searching. section 2.4.2 section 2.4

A path-based hashed fingerprint enumerates linear molecular paths up to a chosen atom or bond length, starting from every possible atom. Each path enters a hash function that sets several bits in a fingerprint typically containing 512, 1,024, or 2,048 bits. section 2.4.2

Interpret the resulting bits with these practical caveats:

  • A bit set to 1 indicates that one or more hashed structural patterns mapped to it; a 0 indicates no mapped pattern. section 2.4.2 section 2.4
  • Collisions occur when different paths set overlapping bits. Setting multiple bits per path reduces, but does not eliminate, ambiguity. section 2.4.2
  • In screening, collisions can allow a false positive through, but cannot create a false negative for a matching query molecule. section 2.4.2

A path beginning at chlorine

For a molecule containing C, Cl, and O, paths of length 0 include those atoms; longer paths include patterns such as C-C, C=O, and C-Cl. Extending the maximum path length captures larger linear structures before hashing them into the bit vector. section 2.4.2

Figure 2.12 Example of hashed fingerprint computation for paths of up to length 4 bonds starting from the chlorine atom. In reality, we decompose the molecule into all possible fragments originating from every atom. Each path sets multiple bits and hash collisions are possible. The more bits allowed, and the more bits set per pattern, the lower the likelihood that all of the bits of a given pattern collide. If all of a pattern’s bits result in collision, then that pattern is erased by the bits of the colliding patterns.

Trace how paths are enumerated and mapped to multiple bits, including where hash collisions can erase or obscure a structural pattern. section 2.4.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains path enumeration, hash-based bit setting, fingerprint sizes, collisions, and screening consequences.
Examples
Uses paths beginning at chlorine, including C-C, C=O, and C-Cl, then illustrates multi-bit hashing and collisions.
What it assumes
Assumes basic molecular structures, atoms, bonds, linear paths, and binary bit vectors.
What you can do after
Apply it via fingerprint similarity to screen compound libraries against a query molecule.
How it connects
Contrasts with structural keys and relates to circular fingerprints, Morgan fingerprints, virtual screening, and similarity searching.

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.