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

PatternAtomTyper. More...

+ Inheritance diagram for CDPL.Chem.PatternAtomTyper:

Classes

class  Pattern
 

Public Member Functions

None __init__ ()
 Initializes the PatternAtomTyper instance.
 
None __init__ (PatternAtomTyper typer)
 Initializes a copy of the PatternAtomTyper instance typer. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None addPattern (MolecularGraph structure, int atom_label=0, int priority=0, bool all_matches=True, bool unique_matches=False)
 
None addPattern (Pattern ptn)
 
Pattern getPattern (int idx)
 
None removePattern (int idx)
 
None clear ()
 
int getNumPatterns ()
 
int getAtomLabel (int idx)
 
int getPatternIndex (int idx)
 
bool hasAtomLabel (int idx)
 
None execute (MolecularGraph molgraph)
 
PatternAtomTyper assign (PatternAtomTyper typer)
 Replaces the current state of self with a copy of the state of the PatternAtomTyper instance typer. More...
 

Properties

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

Detailed Description

PatternAtomTyper.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.PatternAtomTyper.__init__ ( PatternAtomTyper  typer)

Initializes a copy of the PatternAtomTyper instance typer.

Parameters
typerThe PatternAtomTyper instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.PatternAtomTyper.getObjectID ( )

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

Different Python PatternAtomTyper 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 PatternAtomTyper 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.PatternAtomTyper.addPattern ( MolecularGraph  structure,
int   atom_label = 0,
int   priority = 0,
bool   all_matches = True,
bool   unique_matches = False 
)
Parameters
structure
atom_label
priority
all_matches
unique_matches

◆ addPattern() [2/2]

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

◆ getPattern()

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

◆ removePattern()

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

◆ getNumPatterns()

int CDPL.Chem.PatternAtomTyper.getNumPatterns ( )
Returns

◆ getAtomLabel()

int CDPL.Chem.PatternAtomTyper.getAtomLabel ( int  idx)
Parameters
idx
Returns

◆ getPatternIndex()

int CDPL.Chem.PatternAtomTyper.getPatternIndex ( int  idx)
Parameters
idx
Returns

◆ hasAtomLabel()

bool CDPL.Chem.PatternAtomTyper.hasAtomLabel ( int  idx)
Parameters
idx
Returns

◆ execute()

None CDPL.Chem.PatternAtomTyper.execute ( MolecularGraph  molgraph)
Parameters
molgraph

◆ assign()

PatternAtomTyper CDPL.Chem.PatternAtomTyper.assign ( PatternAtomTyper  typer)

Replaces the current state of self with a copy of the state of the PatternAtomTyper instance typer.

Parameters
typerThe PatternAtomTyper instance to copy.
Returns
self