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

FragmentGenerator. More...

+ Inheritance diagram for CDPL.Chem.FragmentGenerator:

Classes

class  ExcludePattern
 
class  FragmentationRule
 
class  FragmentLink
 

Public Member Functions

None __init__ ()
 Constructs the FragmentGenerator instance.
 
None __init__ (FragmentGenerator gen)
 Initializes a copy of the FragmentGenerator instance gen. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
FragmentGenerator assign (FragmentGenerator gen)
 Replaces the current state of self with a copy of the state of the FragmentGenerator instance gen. More...
 
None addFragmentationRule (MolecularGraph match_ptn, int rule_id)
 
None addFragmentationRule (FragmentationRule rule)
 
None removeFragmentationRule (int idx)
 
FragmentationRule getFragmentationRule (int idx)
 
None clearFragmentationRules ()
 
int getNumFragmentationRules ()
 
None addExcludePattern (MolecularGraph match_ptn, int rule_id)
 
None addExcludePattern (ExcludePattern excl_ptn)
 
None removeExcludePattern (int idx)
 
ExcludePattern getExcludePattern (int idx)
 
None clearExcludePatterns ()
 
int getNumExcludePatterns ()
 
None setFragmentFilterFunction (BoolConstMolecularGraphFunctor func)
 
BoolConstMolecularGraphFunctor getFragmentFilterFunction ()
 
None generate (MolecularGraph molgraph, FragmentList frag_list, bool append=False)
 
FragmentLink getFragmentLink (int idx)
 
int getNumFragmentLinks ()
 
None includeSplitBonds (bool include)
 

Properties

 objectID = property(getObjectID)
 
 fragmentFilterFunction = property(getFragmentFilterFunction, setFragmentFilterFunction)
 
 incSplitBonds = property(splitBondsIncluded, includeSplitBonds)
 
 numFragmentationRules = property(getNumFragmentationRules)
 
 numExcludePatterns = property(getNumExcludePatterns)
 
 numFragmentLinks = property(getNumFragmentLinks)
 

Detailed Description

FragmentGenerator.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.FragmentGenerator.__init__ ( FragmentGenerator  gen)

Initializes a copy of the FragmentGenerator instance gen.

Parameters
genThe FragmentGenerator instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.FragmentGenerator.getObjectID ( )

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

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

FragmentGenerator CDPL.Chem.FragmentGenerator.assign ( FragmentGenerator  gen)

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

Parameters
genThe FragmentGenerator instance to copy.
Returns
self

◆ addFragmentationRule() [1/2]

None CDPL.Chem.FragmentGenerator.addFragmentationRule ( MolecularGraph  match_ptn,
int  rule_id 
)
Parameters
match_ptn
rule_id

◆ addFragmentationRule() [2/2]

None CDPL.Chem.FragmentGenerator.addFragmentationRule ( FragmentationRule  rule)
Parameters
rule

◆ removeFragmentationRule()

None CDPL.Chem.FragmentGenerator.removeFragmentationRule ( int  idx)
Parameters
idx

◆ getFragmentationRule()

FragmentationRule CDPL.Chem.FragmentGenerator.getFragmentationRule ( int  idx)
Parameters
idx
Returns

◆ getNumFragmentationRules()

int CDPL.Chem.FragmentGenerator.getNumFragmentationRules ( )
Returns

◆ addExcludePattern() [1/2]

None CDPL.Chem.FragmentGenerator.addExcludePattern ( MolecularGraph  match_ptn,
int  rule_id 
)
Parameters
match_ptn
rule_id

◆ addExcludePattern() [2/2]

None CDPL.Chem.FragmentGenerator.addExcludePattern ( ExcludePattern  excl_ptn)
Parameters
excl_ptn

◆ removeExcludePattern()

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

◆ getExcludePattern()

ExcludePattern CDPL.Chem.FragmentGenerator.getExcludePattern ( int  idx)
Parameters
idx
Returns

◆ getNumExcludePatterns()

int CDPL.Chem.FragmentGenerator.getNumExcludePatterns ( )
Returns

◆ setFragmentFilterFunction()

None CDPL.Chem.FragmentGenerator.setFragmentFilterFunction ( BoolConstMolecularGraphFunctor  func)
Parameters
func

◆ getFragmentFilterFunction()

BoolConstMolecularGraphFunctor CDPL.Chem.FragmentGenerator.getFragmentFilterFunction ( )
Returns

◆ generate()

None CDPL.Chem.FragmentGenerator.generate ( MolecularGraph  molgraph,
FragmentList  frag_list,
bool   append = False 
)
Parameters
molgraph
frag_list
append

◆ getFragmentLink()

FragmentLink CDPL.Chem.FragmentGenerator.getFragmentLink ( int  idx)
Parameters
idx
Returns

◆ getNumFragmentLinks()

int CDPL.Chem.FragmentGenerator.getNumFragmentLinks ( )
Returns

◆ includeSplitBonds()

None CDPL.Chem.FragmentGenerator.includeSplitBonds ( bool  include)
Parameters
include