![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Generation of Daylight-style path fingerprints of molecular graphs. More...
Inheritance diagram for CDPL.Descr.PathFingerprintGenerator:Classes | |
| class | DefAtomDescriptorFunctor |
| The default functor for the generation of atom descriptors. More... | |
| class | DefBondDescriptorFunctor |
| The default functor for the generation of bond descriptors. More... | |
Public Member Functions | |
| None | __init__ () |
Constructs the PathFingerprintGenerator instance. | |
| None | __init__ (Chem.MolecularGraph molgraph, Util.BitSet fp) |
Constructs the PathFingerprintGenerator instance and generates the fingerprint of the molecular graph molgraph. More... | |
| None | __init__ (PathFingerprintGenerator gen) |
Initializes a copy of the PathFingerprintGenerator instance gen. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| PathFingerprintGenerator | assign (PathFingerprintGenerator gen) |
Replaces the current state of self with a copy of the state of the PathFingerprintGenerator instance gen. More... | |
| None | setAtomDescriptorFunction (Chem.SizeTypeAtomFunctor func) |
| Allows to specify a custom function for the generation of atom descriptors. More... | |
| None | setBondDescriptorFunction (Chem.UInt64BondFunctor func) |
| Allows to specify a custom function for the generation of bond descriptors. More... | |
| None | setMinPathLength (int min_length) |
| Allows to specify the minimum length a path must have to contribute to the generated fingerprint. More... | |
| None | setMaxPathLength (int max_length) |
| Allows to specify the maximum considered path length. More... | |
| int | getMinPathLength () |
| Returns the minimum length a path must have to contribute to the generated fingerprint. More... | |
| int | getMaxPathLength () |
| Returns the maximum considered path length. More... | |
| None | includeHydrogens (bool include) |
| Specifies whether hydrogens shall be considered during path enumeration. More... | |
| bool | hydrogensIncluded () |
| Tells whether hydrogens are considered during path enumeration. More... | |
| None | generate (Chem.MolecularGraph molgraph, Util.BitSet fp) |
| Generates the fingerprint of the molecular graph molgraph. More... | |
Static Public Attributes | |
| int | DEF_ATOM_PROPERTY_FLAGS = 142 |
| Specifies the default set of atomic properties considered in the generation of atom descriptors by PathFingerprintGenerator.DefAtomDescriptorFunction. | |
| int | DEF_BOND_PROPERTY_FLAGS = 14 |
| Specifies the default set of bond properties considered in the generation of bond descriptors by PathFingerprintGenerator.DefBondDescriptorFunction. | |
Properties | |
| objectID = property(getObjectID) | |
| minPathLength = property(getMinPathLength, setMinPathLength) | |
| maxPathLength = property(getMaxPathLength, setMaxPathLength) | |
| incHydrogens = property(hydrogensIncluded, includeHydrogens) | |
Generation of Daylight-style path fingerprints of molecular graphs.
The generator enumerates atom-bond-atom paths up to a configurable maximum length, derives a hash for each path from per-atom and per-bond descriptors (provided by the DefAtomDescriptorFunctor / DefBondDescriptorFunctor or user-supplied alternatives), and folds the hashes into a bitset of any size.
| None CDPL.Descr.PathFingerprintGenerator.__init__ | ( | Chem.MolecularGraph | molgraph, |
| Util.BitSet | fp | ||
| ) |
Constructs the PathFingerprintGenerator instance and generates the fingerprint of the molecular graph molgraph.
| molgraph | The molecular graph for which to generate the fingerprint. |
| fp | The generated fingerprint. |
| None CDPL.Descr.PathFingerprintGenerator.__init__ | ( | PathFingerprintGenerator | gen | ) |
Initializes a copy of the PathFingerprintGenerator instance gen.
| gen | The PathFingerprintGenerator instance to copy. |
| int CDPL.Descr.PathFingerprintGenerator.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python PathFingerprintGenerator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two PathFingerprintGenerator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| PathFingerprintGenerator CDPL.Descr.PathFingerprintGenerator.assign | ( | PathFingerprintGenerator | gen | ) |
Replaces the current state of self with a copy of the state of the PathFingerprintGenerator instance gen.
| gen | The PathFingerprintGenerator instance to copy. |
| None CDPL.Descr.PathFingerprintGenerator.setAtomDescriptorFunction | ( | Chem.SizeTypeAtomFunctor | func | ) |
Allows to specify a custom function for the generation of atom descriptors.
| func | A PathFingerprintGenerator.AtomDescriptorFunction instance that wraps the target function. |
| None CDPL.Descr.PathFingerprintGenerator.setBondDescriptorFunction | ( | Chem.UInt64BondFunctor | func | ) |
Allows to specify a custom function for the generation of bond descriptors.
| func | A PathFingerprintGenerator.BondDescriptorFunction instance that wraps the target function. |
| None CDPL.Descr.PathFingerprintGenerator.setMinPathLength | ( | int | min_length | ) |
Allows to specify the minimum length a path must have to contribute to the generated fingerprint.
Any path whose length (in number of bonds) is lower than the specified minimum length will not be represented by a corresponding bit in the generated fingerprint.
| min_length | The minimum path length in number of bonds. |
| None CDPL.Descr.PathFingerprintGenerator.setMaxPathLength | ( | int | max_length | ) |
Allows to specify the maximum considered path length.
Any path whose length (in number of bonds) is greater than the specified maximum length will not be represented by a corresponding bit in the generated fingerprint.
| max_length | The maximum path length in number of bonds. |
| int CDPL.Descr.PathFingerprintGenerator.getMinPathLength | ( | ) |
Returns the minimum length a path must have to contribute to the generated fingerprint.
| int CDPL.Descr.PathFingerprintGenerator.getMaxPathLength | ( | ) |
Returns the maximum considered path length.
| None CDPL.Descr.PathFingerprintGenerator.includeHydrogens | ( | bool | include | ) |
Specifies whether hydrogens shall be considered during path enumeration.
| include | If True, hydrogens are considered as regular atoms during fingerprint generation. |
| bool CDPL.Descr.PathFingerprintGenerator.hydrogensIncluded | ( | ) |
Tells whether hydrogens are considered during path enumeration.
True if hydrogens are considered, and False otherwise.| None CDPL.Descr.PathFingerprintGenerator.generate | ( | Chem.MolecularGraph | molgraph, |
| Util.BitSet | fp | ||
| ) |
Generates the fingerprint of the molecular graph molgraph.
| molgraph | The molecular graph for which to generate the fingerprint. |
| fp | The generated fingerprint. |