PathFingerprintGenerator.
More...
|
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.
|
|
◆ __init__() [1/2]
Constructs the PathFingerprintGenerator
instance and generates the fingerprint of the molecular graph molgraph.
- Parameters
-
molgraph | The molecular graph for which to generate the fingerprint. |
fp | The generated fingerprint. |
◆ __init__() [2/2]
Initializes a copy of the PathFingerprintGenerator instance gen.
- Parameters
-
gen | The PathFingerprintGenerator instance to copy. |
◆ getObjectID()
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()
.
- Returns
- The numeric ID of the internally referenced C++ class instance.
◆ assign()
Replaces the current state of self with a copy of the state of the PathFingerprintGenerator instance gen.
- Parameters
-
gen | The PathFingerprintGenerator instance to copy. |
- Returns
- self
◆ setAtomDescriptorFunction()
Allows to specify a custom function for the generation of atom descriptors.
- Parameters
-
func | A PathFingerprintGenerator.AtomDescriptorFunction instance that wraps the target function. |
- Note
- By default, atom descriptors are generated by PathFingerprintGenerator.DefAtomDescriptorFunctor.
◆ setBondDescriptorFunction()
Allows to specify a custom function for the generation of bond descriptors.
- Parameters
-
func | A PathFingerprintGenerator.BondDescriptorFunction instance that wraps the target function. |
- Note
- By default, bond descriptors are generated by PathFingerprintGenerator.DefBondDescriptorFunctor.
◆ setMinPathLength()
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.
- Parameters
-
min_length | The minimum path length in number of bonds. |
- Note
- By default, the minimum path length is set to 0.
◆ setMaxPathLength()
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.
- Parameters
-
max_length | The maximum path length in number of bonds. |
- Note
- By default, the maximum considered path length is 5.
◆ getMinPathLength()
int CDPL.Descr.PathFingerprintGenerator.getMinPathLength |
( |
| ) |
|
Returns the minimum length a path must have to contribute to the generated fingerprint.
- Returns
- The minimum path length in number of bonds.
- See also
- setMinPathLength()
◆ getMaxPathLength()
int CDPL.Descr.PathFingerprintGenerator.getMaxPathLength |
( |
| ) |
|
Returns the maximum considered path length.
- Returns
- The maximum path length in number of bonds.
- See also
- setMaxPathLength()
◆ generate()
Generates the fingerprint of the molecular graph molgraph.
- Parameters
-
molgraph | The molecular graph for which to generate the fingerprint. |
fp | The generated fingerprint. |