rdkit.Chem.Draw.SimilarityMaps module — The RDKit 2025.03.3 documentation (original) (raw)
rdkit.Chem.Draw.SimilarityMaps.GetAPFingerprint(mol, atomId=-1, fpType='normal', nBits=2048, minLength=1, maxLength=30, nBitsPerEntry=4, **kwargs)¶
Calculates the atom pairs fingerprint with the torsions of atomId removed.
Parameters:
- interest (mol -- the molecule of) –
- for (atomId -- the atom to remove the pairs) –
- fingerprint (fpType -- the type of AP) –
- vector (nBits -- the size of the bit) –
- pair (nBitsPerEntry -- the number of bits available for each) –
- pair –
- pair –
rdkit.Chem.Draw.SimilarityMaps.GetAtomicWeightsForFingerprint(refMol, probeMol, fpFunction, metric=<Boost.Python.function object>)¶
Calculates the atomic weights for the probe molecule based on a fingerprint function and a metric.
Parameters:
- molecule (probeMol -- the probe) –
- molecule –
- function (fpFunction -- the fingerprint) –
- metric (metric -- the similarity) –
Note
If fpFunction needs additional parameters, use a lambda construct
rdkit.Chem.Draw.SimilarityMaps.GetAtomicWeightsForModel(probeMol, fpFunction, predictionFunction)¶
Calculates the atomic weights for the probe molecule based on a fingerprint function and the prediction function of a ML model.
Parameters:
- molecule (probeMol -- the probe) –
- function (fpFunction -- the fingerprint) –
- model (predictionFunction -- the prediction function of the ML) –
rdkit.Chem.Draw.SimilarityMaps.GetMorganFingerprint(mol, atomId=-1, radius=2, fpType='bv', nBits=2048, useFeatures=False, **kwargs)¶
Calculates the Morgan fingerprint with the environments of atomId removed.
Parameters:
- interest (mol -- the molecule of) –
- radius (radius -- the maximum) –
- fingerprint (fpType -- the type of Morgan) – ‘count’ or ‘bv’
- for (atomId -- the atom to remove the environments) –
- vector (nBits -- the size of the bit) –
- false (useFeatures -- if) – ConnectivityMorgan, if true: FeatureMorgan
any additional keyword arguments will be passed to the fingerprinting function.
rdkit.Chem.Draw.SimilarityMaps.GetRDKFingerprint(mol, atomId=-1, fpType='bv', nBits=2048, minPath=1, maxPath=5, nBitsPerHash=2, **kwargs)¶
Calculates the RDKit fingerprint with the paths of atomId removed.
Parameters:
- interest (mol -- the molecule of) –
- for (atomId -- the atom to remove the paths) –
- fingerprint (fpType -- the type of RDKit) – ‘bv’
- vector (nBits -- the size of the bit) –
- length (maxPath -- maximum path) –
- length –
- path (nBitsPerHash -- number of to set per) –
rdkit.Chem.Draw.SimilarityMaps.GetSimilarityMapForFingerprint(refMol, probeMol, fpFunction, draw2d, metric=<Boost.Python.function object>, **kwargs)¶
Generates the similarity map for a given reference and probe molecule, fingerprint function and similarity metric.
Parameters:
- molecule (probeMol -- the probe) –
- molecule –
- function (fpFunction -- the fingerprint) –
- metric. (metric -- the similarity) –
- drawing (kwargs -- additional arguments for) –
rdkit.Chem.Draw.SimilarityMaps.GetSimilarityMapForModel(probeMol, fpFunction, predictionFunction, draw2d, **kwargs)¶
Generates the similarity map for a given ML model and probe molecule, and fingerprint function.
Parameters:
- molecule (probeMol -- the probe) –
- function (fpFunction -- the fingerprint) –
- model (predictionFunction -- the prediction function of the ML) –
- drawing (kwargs -- additional arguments for) –
rdkit.Chem.Draw.SimilarityMaps.GetSimilarityMapFromWeights(mol, weights, draw2d, colorMap=None, scale=-1, size=(250, 250), sigma=None, coordScale=1.5, step=0.01, colors='k', contourLines=10, alpha=0.5, gridResolution=0.1, extraGridPadding=0.5, useFillThreshold=False, fillThreshold=0.01, fillThresholdIsFraction=True, **kwargs)¶
Generates the similarity map for a molecule given the atomic weights.
Parameters:
- interest (mol -- the molecule of) –
- use (weights -- the weights to) –
- object (draw2d -- the RDKit drawing) –
- scheme (colorMap -- the matplotlib color map) –
- map (default is custom PiWG color) –
- scaling (scale -- the) – scale < 0 -> the absolute maximum weight is used as maximum scale scale = double -> this is the maximum scale
- figure (size -- the size of the) –
- Gaussians (sigma -- the sigma for the) –
- coordinates (coordScale -- scaling factor for the) –
- calcAtomGaussian (step -- the step for) –
- lines (alpha -- the alpha blending value for the contour) –
- N (contourLines -- if integer number) – N contour lines are drawn if list(numbers): contour lines at these numbers are drawn
- lines –
- grid (extraGridPadding -- the extra padding of the) –
- grid –
- filled (useFillThreshold -- use a magnitude threshold to determine if a grid box is) –
- boxes (fillThreshold -- the magnitude threshold for filling grid) –
- True (fillThresholdIsFraction -- if) –
- range (the fillThreshold is a fraction of the data) –
- drawing (kwargs -- additional arguments for) –
rdkit.Chem.Draw.SimilarityMaps.GetStandardizedWeights(weights)¶
Normalizes the weights, such that the absolute maximum weight equals 1.0.
Parameters:
weights (weights -- the list with the atomic) –
rdkit.Chem.Draw.SimilarityMaps.GetTTFingerprint(mol, atomId=-1, fpType='normal', nBits=2048, targetSize=4, nBitsPerEntry=4, **kwargs)¶
Calculates the topological torsion fingerprint with the pairs of atomId removed.
Parameters:
- interest (mol -- the molecule of) –
- for (atomId -- the atom to remove the torsions) –
- fingerprint (fpType -- the type of TT) –
- vector (nBits -- the size of the bit) –
- pair (maxLength -- the maxmimum path length for an atom) –
- pair –
- torsion (nBitsPerEntry -- the number of bits available for each) –
any additional keyword arguments will be passed to the fingerprinting function.