Chemical Data Processing Library Python API - Version 1.2.0
Classes | Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Descr.PathFingerprintGenerator Class Reference

PathFingerprintGenerator. 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 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)
 

Detailed Description

PathFingerprintGenerator.

See also
[DTPFP]

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Descr.PathFingerprintGenerator.__init__ ( Chem.MolecularGraph  molgraph,
Util.BitSet  fp 
)

Constructs the PathFingerprintGenerator instance and generates the fingerprint of the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to generate the fingerprint.
fpThe generated fingerprint.

◆ __init__() [2/2]

None CDPL.Descr.PathFingerprintGenerator.__init__ ( PathFingerprintGenerator  gen)

Initializes a copy of the PathFingerprintGenerator instance gen.

Parameters
genThe PathFingerprintGenerator instance to copy.

Member Function Documentation

◆ 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()

PathFingerprintGenerator CDPL.Descr.PathFingerprintGenerator.assign ( PathFingerprintGenerator  gen)

Replaces the current state of self with a copy of the state of the PathFingerprintGenerator instance gen.

Parameters
genThe PathFingerprintGenerator instance to copy.
Returns
self

◆ setAtomDescriptorFunction()

None CDPL.Descr.PathFingerprintGenerator.setAtomDescriptorFunction ( Chem.SizeTypeAtomFunctor  func)

Allows to specify a custom function for the generation of atom descriptors.

Parameters
funcA PathFingerprintGenerator.AtomDescriptorFunction instance that wraps the target function.
Note
By default, atom descriptors are generated by PathFingerprintGenerator.DefAtomDescriptorFunctor.

◆ setBondDescriptorFunction()

None CDPL.Descr.PathFingerprintGenerator.setBondDescriptorFunction ( Chem.UInt64BondFunctor  func)

Allows to specify a custom function for the generation of bond descriptors.

Parameters
funcA 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_lengthThe 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_lengthThe 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()

None CDPL.Descr.PathFingerprintGenerator.generate ( Chem.MolecularGraph  molgraph,
Util.BitSet  fp 
)

Generates the fingerprint of the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to generate the fingerprint.
fpThe generated fingerprint.