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

SubstructureEditor. More...

+ Inheritance diagram for CDPL.Chem.SubstructureEditor:

Public Member Functions

None __init__ ()
 Constructs the SubstructureEditor instance.
 
None __init__ (SubstructureEditor editor)
 Constructs a copy of the SubstructureEditor instance editor. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
SubstructureEditor assign (SubstructureEditor editor)
 Replaces the current state of self with a copy of the state of the SubstructureEditor instance editor. More...
 
None addSearchPattern (MolecularGraph molgraph)
 Appends a new substructure search pattern to the current set of patterns. More...
 
int getNumSearchPatterns ()
 
MolecularGraph getSearchPattern (int idx)
 
None removeSearchPattern (int idx)
 
None clearSearchPatterns ()
 Clears the current set of substructuresearch patterns.
 
None addExcludePattern (MolecularGraph molgraph)
 Appends a new substructure exclude pattern to the current set of patterns. More...
 
int getNumExcludePatterns ()
 
MolecularGraph getExcludePattern (int idx)
 
None removeExcludePattern (int idx)
 
None clearExcludePatterns ()
 Clears the current set of substructure exclude patterns.
 
None setResultPattern (MolecularGraph molgraph)
 
MolecularGraph getResultPattern ()
 
None clear ()
 Clears the current editing result pattern and the sets of substructure search and exclude patterns.
 
int edit (Molecule mol)
 
int edit (MolecularGraph molgraph, Molecule res_mol)
 

Properties

 objectID = property(getObjectID)
 
 numSearchPatterns = property(getNumSearchPatterns)
 
 numExcludePatterns = property(getNumExcludePatterns)
 
 resultPattern = property(getResultPattern, setResultPattern)
 

Detailed Description

SubstructureEditor.

Since
1.3.0

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.SubstructureEditor.__init__ ( SubstructureEditor  editor)

Constructs a copy of the SubstructureEditor instance editor.

Parameters
editorThe SubstructureEditor instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.SubstructureEditor.getObjectID ( )

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

Different Python SubstructureEditor 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 SubstructureEditor 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()

SubstructureEditor CDPL.Chem.SubstructureEditor.assign ( SubstructureEditor  editor)

Replaces the current state of self with a copy of the state of the SubstructureEditor instance editor.

Parameters
editorThe SubstructureEditor instance to copy.
Returns
self

◆ addSearchPattern()

None CDPL.Chem.SubstructureEditor.addSearchPattern ( MolecularGraph  molgraph)

Appends a new substructure search pattern to the current set of patterns.

Parameters
molgraphThe molecular graph of the substructure search pattern to add.

◆ getNumSearchPatterns()

int CDPL.Chem.SubstructureEditor.getNumSearchPatterns ( )
Returns

◆ getSearchPattern()

MolecularGraph CDPL.Chem.SubstructureEditor.getSearchPattern ( int  idx)
Parameters
idx
Returns

◆ removeSearchPattern()

None CDPL.Chem.SubstructureEditor.removeSearchPattern ( int  idx)
Parameters
idx

◆ addExcludePattern()

None CDPL.Chem.SubstructureEditor.addExcludePattern ( MolecularGraph  molgraph)

Appends a new substructure exclude pattern to the current set of patterns.

Parameters
molgraphThe molecular graph of the substructure exclude pattern to add.

◆ getNumExcludePatterns()

int CDPL.Chem.SubstructureEditor.getNumExcludePatterns ( )
Returns

◆ getExcludePattern()

MolecularGraph CDPL.Chem.SubstructureEditor.getExcludePattern ( int  idx)
Parameters
idx
Returns

◆ removeExcludePattern()

None CDPL.Chem.SubstructureEditor.removeExcludePattern ( int  idx)
Parameters
idx

◆ setResultPattern()

None CDPL.Chem.SubstructureEditor.setResultPattern ( MolecularGraph  molgraph)
Parameters
molgraph

◆ getResultPattern()

MolecularGraph CDPL.Chem.SubstructureEditor.getResultPattern ( )
Returns

◆ edit() [1/2]

int CDPL.Chem.SubstructureEditor.edit ( Molecule  mol)
Parameters
mol
Returns

◆ edit() [2/2]

int CDPL.Chem.SubstructureEditor.edit ( MolecularGraph  molgraph,
Molecule  res_mol 
)
Parameters
molgraph
res_mol
Returns