Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Chem.FragmentGenerator.FragmentationRule Class Reference
+ Inheritance diagram for CDPL.Chem.FragmentGenerator.FragmentationRule:

Public Member Functions

None __init__ (FragmentationRule rule)
 Initializes a copy of the FragmentationRule instance rule. More...
 
None __init__ (MolecularGraph match_ptn, int id)
 Initializes the FragmentationRule instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
FragmentationRule assign (FragmentationRule rule)
 Replaces the current state of self with a copy of the state of the FragmentationRule instance rule. More...
 
MolecularGraph getMatchPattern ()
 
None setMatchPattern (MolecularGraph ptn)
 
int getID ()
 
None setID (int id)
 

Properties

 objectID = property(getObjectID)
 
 matchPattern = property(getMatchPattern, setMatchPattern)
 
 id = property(getID, setID)
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Chem.FragmentGenerator.FragmentationRule.__init__ ( FragmentationRule  rule)

Initializes a copy of the FragmentationRule instance rule.

Parameters
ruleThe FragmentationRule instance to copy.

◆ __init__() [2/2]

None CDPL.Chem.FragmentGenerator.FragmentationRule.__init__ ( MolecularGraph  match_ptn,
int  id 
)

Initializes the FragmentationRule instance.

Parameters
match_ptn
id

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.FragmentGenerator.FragmentationRule.getObjectID ( )

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

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

FragmentationRule CDPL.Chem.FragmentGenerator.FragmentationRule.assign ( FragmentationRule  rule)

Replaces the current state of self with a copy of the state of the FragmentationRule instance rule.

Parameters
ruleThe FragmentationRule instance to copy.
Returns
self

◆ getMatchPattern()

MolecularGraph CDPL.Chem.FragmentGenerator.FragmentationRule.getMatchPattern ( )
Returns

◆ setMatchPattern()

None CDPL.Chem.FragmentGenerator.FragmentationRule.setMatchPattern ( MolecularGraph  ptn)
Parameters
ptn

◆ getID()

int CDPL.Chem.FragmentGenerator.FragmentationRule.getID ( )
Returns

◆ setID()

None CDPL.Chem.FragmentGenerator.FragmentationRule.setID ( int  id)
Parameters
id