Chemical Data Processing Library Python API - Version 1.2.0
Classes | Public Member Functions | Properties | List of all members
CDPL.Chem.SubstructureHistogramCalculator Class Reference

SubstructureHistogramCalculator. More...

+ Inheritance diagram for CDPL.Chem.SubstructureHistogramCalculator:

Classes

class  Pattern
 

Public Member Functions

None __init__ ()
 Initializes the SubstructureHistogramCalculator instance.
 
None __init__ (SubstructureHistogramCalculator calc)
 Initializes a copy of the SubstructureHistogramCalculator instance calc. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None addPattern (MolecularGraph structure, int id=0, int priority=0, bool all_matches=True, bool unique_matches=True)
 
None addPattern (Pattern ptn)
 
Pattern getPattern (int idx)
 
None removePattern (int idx)
 
None clear ()
 
int getNumPatterns ()
 
None calculate (MolecularGraph molgraph, object histo)
 
SubstructureHistogramCalculator assign (SubstructureHistogramCalculator calc)
 Replaces the current state of self with a copy of the state of the SubstructureHistogramCalculator instance calc. More...
 

Properties

 objectID = property(getObjectID)
 
 numPatterns = property(getNumPatterns)
 

Detailed Description

SubstructureHistogramCalculator.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.SubstructureHistogramCalculator.__init__ ( SubstructureHistogramCalculator  calc)

Initializes a copy of the SubstructureHistogramCalculator instance calc.

Parameters
calcThe SubstructureHistogramCalculator instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.SubstructureHistogramCalculator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python SubstructureHistogramCalculator 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 SubstructureHistogramCalculator 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.

◆ addPattern() [1/2]

None CDPL.Chem.SubstructureHistogramCalculator.addPattern ( MolecularGraph  structure,
int   id = 0,
int   priority = 0,
bool   all_matches = True,
bool   unique_matches = True 
)
Parameters
structure
id
priority
all_matches
unique_matches

◆ addPattern() [2/2]

None CDPL.Chem.SubstructureHistogramCalculator.addPattern ( Pattern  ptn)
Parameters
ptn

◆ getPattern()

Pattern CDPL.Chem.SubstructureHistogramCalculator.getPattern ( int  idx)
Parameters
idx
Returns

◆ removePattern()

None CDPL.Chem.SubstructureHistogramCalculator.removePattern ( int  idx)
Parameters
idx

◆ getNumPatterns()

int CDPL.Chem.SubstructureHistogramCalculator.getNumPatterns ( )
Returns

◆ calculate()

None CDPL.Chem.SubstructureHistogramCalculator.calculate ( MolecularGraph  molgraph,
object  histo 
)
Parameters
molgraph
histo

◆ assign()

SubstructureHistogramCalculator CDPL.Chem.SubstructureHistogramCalculator.assign ( SubstructureHistogramCalculator  calc)

Replaces the current state of self with a copy of the state of the SubstructureHistogramCalculator instance calc.

Parameters
calcThe SubstructureHistogramCalculator instance to copy.
Returns
self