rdkit.Chem.rdFingerprintGenerator module

class rdkit.Chem.rdFingerprintGenerator.AdditionalOutput(self)

Bases: object

AllocateAtomCounts(self) None

synonym for CollectAtomCounts()

AllocateAtomToBits(self) None

synonym for CollectAtomToBits()

AllocateAtomsPerBit(self) None

synonym for CollectAtomsPerBit()

AllocateBitInfoMap(self) None

synonym for CollectBitInfoMap()

AllocateBitPaths(self) None

synonym for CollectBitPaths()

CollectAtomCounts(self) None

toggles collection of information about the number of bits each atom is involved in

CollectAtomToBits(self) None

toggle collection of information mapping each atom to the bits it is involved in.

CollectAtomsPerBit(self) None

toggles collection of information about all atoms involved in setting each bit

CollectBitInfoMap(self) None

toggles collection of information mapping each atom to more detail about the atom environment (not available from all fingerprints)

CollectBitPaths(self) None

toggles collection of information matching each atom to information about the paths it is involved in (not available from all fingerprints).

GetAtomCounts(self) object
GetAtomToBits(self) object
GetAtomsPerBit(self) object
GetBitInfoMap(self) object
GetBitPaths(self) object
class rdkit.Chem.rdFingerprintGenerator.AtomInvariantsGenerator

Bases: object

class rdkit.Chem.rdFingerprintGenerator.AtomPairFingerprintOptions

Bases: FingerprintOptions

property maxDistance

maximum distance to be included

property minDistance

minimum distance to be included

property use2D

use 2D distances

class rdkit.Chem.rdFingerprintGenerator.BondInvariantsGenerator

Bases: object

class rdkit.Chem.rdFingerprintGenerator.FPType(*values)

Bases: Enum

AtomPairFP = 0
MorganFP = 1
RDKitFP = 2
TopologicalTorsionFP = 3
class rdkit.Chem.rdFingerprintGenerator.FingerprintGenerator32

Bases: object

GetCountFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.UIntSparseIntVect

Generates a count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseIntVect containing fingerprint

GetCountFingerprintAsNumPy(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) object

Generates a count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a numpy array containing the fingerprint

GetCountFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates count fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseIntVects

GetFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.ExplicitBitVect

Generates a fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a ExplicitBitVect containing fingerprint

GetFingerprintAsNumPy(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) object

Generates a fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a numpy array containing the fingerprint

GetFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of ExplicitBitVects

GetInfoString(self) str

Returns a string containing information about the fingerprint generator

RETURNS: an information string

GetOptions(self) rdkit.Chem.rdFingerprintGenerator.FingerprintOptions

return the fingerprint options object

GetSparseCountFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.UIntSparseIntVect

Generates a sparse count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseIntVect containing fingerprint

GetSparseCountFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates sparse count fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseIntVects

GetSparseFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.SparseBitVect

Generates a sparse fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseBitVect containing fingerprint

GetSparseFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates sparse fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseBitVects

ToJSON(self) str

Serialize a FingerprintGenerator to JSON

class rdkit.Chem.rdFingerprintGenerator.FingerprintGenerator64

Bases: object

GetCountFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.UIntSparseIntVect

Generates a count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseIntVect containing fingerprint

GetCountFingerprintAsNumPy(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) object

Generates a count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a numpy array containing the fingerprint

GetCountFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates count fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseIntVects

GetFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.ExplicitBitVect

Generates a fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a ExplicitBitVect containing fingerprint

GetFingerprintAsNumPy(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) object

Generates a fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a numpy array containing the fingerprint

GetFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of ExplicitBitVects

GetInfoString(self) str

Returns a string containing information about the fingerprint generator

RETURNS: an information string

GetOptions(self) rdkit.Chem.rdFingerprintGenerator.FingerprintOptions

return the fingerprint options object

GetSparseCountFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.ULongSparseIntVect

Generates a sparse count fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseIntVect containing fingerprint

GetSparseCountFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates sparse count fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseIntVects

GetSparseFingerprint(self, mol: rdkit.Chem.rdchem.Mol, fromAtoms: object | None = None, ignoreAtoms: object | None = None, confId: int = -1, customAtomInvariants: object | None = None, customBondInvariants: object | None = None, additionalOutput: object | None = None) rdkit.DataStructs.cDataStructs.SparseBitVect

Generates a sparse fingerprint

Parameters:
  • mol (-) – molecule to be fingerprinted

  • fromAtoms (-) – only environments starting at or centered on these atoms will be included

  • ignoreAtoms (-) – environments including these atoms will be excluded

  • confId (-) – 3D confirmation to use, only used by AtomPair fingerprint

  • customAtomInvariants (-) – custom atom invariants to be used, overrides invariants from the invariant generator

  • customBondInvariants (-) – custom bond invariants to be used, overrides invariants from the invariant generator

  • additionalOutput (-) – AdditionalOutput instance used to return extra information about the bits

RETURNS: a SparseBitVect containing fingerprint

GetSparseFingerprints(self, mols: object, numThreads: int = 1) tuple

Generates sparse fingerprints for a sequence of molecules

Parameters:
  • mol (-) – molecule to be fingerprinted

  • numThreads (-) – number of threads to use

RETURNS: a tuple of SparseBitVects

ToJSON(self) str

Serialize a FingerprintGenerator to JSON

class rdkit.Chem.rdFingerprintGenerator.FingerprintOptions

Bases: object

SetCountBounds(self, bounds: object) None

set the bins for the count bounds

property countSimulation

use count simulation

property fpSize

size of the fingerprints created

property includeChirality

include chirality in atom invariants (not for all fingerprints)

property numBitsPerFeature

number of bits to set for each feature

class rdkit.Chem.rdFingerprintGenerator.MorganFingerprintOptions

Bases: FingerprintOptions

property includeRedundantEnvironments

include redundant environments in the fingerprint

property onlyNonzeroInvariants

use include atoms which have nonzero invariants

property radius

the radius of the fingerprints to generate

class rdkit.Chem.rdFingerprintGenerator.RDKitFingerprintOptions

Bases: FingerprintOptions

property branchedPaths

generate branched subgraphs, not just linear ones

property maxPath

maximum path length (in bonds) to be included

property minPath

minimum path length (in bonds) to be included

property useBondOrder

include bond orders in the path hashes

property useHs

use explicit Hs in the paths (if molecule has explicit Hs)

class rdkit.Chem.rdFingerprintGenerator.TopologicalTorsionFingerprintOptions

Bases: FingerprintOptions

property onlyShortestPaths

whether or not to only include paths which are the shortest path between the start and end atoms

property torsionAtomCount

number of atoms to be included in the paths