liveBook · Manning

Extended-connectivity fingerprint

As explained in Build AI Drug Discovery Pipelines

An extended-connectivity fingerprint is a molecular fingerprint that encodes atom-centered neighborhoods expanded through successive bond-connectivity diameters.

An extended-connectivity fingerprint (ECFP) converts a molecule’s atom-centered neighborhoods into a fixed-length bit vector. ECFP6 considers circular neighborhoods extending three bonds from each atom—the 6 denotes diameter—and hashes them into 1,024 bits, creating a compact structural summary. section 1.2.3 section 2.4.2

Use the fingerprint as a machine-learning or similarity-search representation, while checking its limitations:

  • Generate Morgan fingerprints in RDKit by setting a radius and fingerprint size; radius 2 is roughly equivalent to ECFP4, while radius 3 produces ECFP6. section 1.2.3 section 2.4.2
  • Apply the resulting vectors to chemical-space exploration with PCA or to classification with logistic regression, such as distinguishing USAN drug stems. section 1.2.3
  • Treat binary bits as presence indicators: they do not record whether a motif occurs once or repeatedly, and poorly chosen parameters can make different molecules collide. section 2.4.2
  • Use count-based Morgan fingerprints when repeated local environments matter; counts preserve multiplicity but produce a denser representation. section 2.4.2
from rdkit.Chem.rdFingerprintGenerator import GetMorganGenerator
morgan_gen = GetMorganGenerator(radius=2, fpSize=2048)
binary_fp = morgan_gen.GetFingerprint(example_mol)
count_fp = morgan_gen.GetCountFingerprint(example_mol)

Compare RDKit code for binary and count-based Morgan fingerprints, then vary radius and fingerprint size for a molecule. section 2.4.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains neighborhood construction, hashing, parameter choices, binary counts, and collisions, while deferring deeper fingerprint treatment.
Examples
Uses FDA-approved drugs, USAN stem classes, PCA projections, logistic-regression boundaries, and RDKit binary or count fingerprints.
What it assumes
Assumes basic molecules and bonds, while defining molecular fingerprints, circular neighborhoods, radius, diameter, and bit vectors.
What you can do after
Apply it via RDKit to encode molecules for chemical-space visualization, similarity screening, or classification.
How it connects
Connects molecular fingerprints with Morgan fingerprints, RDKit, PCA, logistic regression, chemical space, and similarity searching.

Related concepts

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.