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
