Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Chem::BRICSFragmentGenerator Class Reference

Chem::FragmentGenerator preconfigured with the 16 BRICS bond-cleavage rules and the associated exclude patterns for combinatorial fragmentation of organic molecules. More...

#include <BRICSFragmentGenerator.hpp>

+ Inheritance diagram for CDPL::Chem::BRICSFragmentGenerator:

Public Types

typedef std::shared_ptr< BRICSFragmentGeneratorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated BRICSFragmentGenerator instances. More...
 
- Public Types inherited from CDPL::Chem::FragmentGenerator
typedef std::shared_ptr< FragmentGeneratorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentGenerator instances. More...
 
typedef std::function< bool(const MolecularGraph &)> FragmentFilterFunction
 Type of a predicate accepting/rejecting a generated fragment. More...
 
typedef FragmentationRuleList::const_iterator ConstFragmentationRuleIterator
 A constant iterator over the registered fragmentation rules. More...
 
typedef FragmentationRuleList::iterator FragmentationRuleIterator
 A mutable iterator over the registered fragmentation rules. More...
 
typedef ExcludePatternList::const_iterator ConstExcludePatternIterator
 A constant iterator over the registered exclude patterns. More...
 
typedef ExcludePatternList::iterator ExcludePatternIterator
 A mutable iterator over the registered exclude patterns. More...
 
typedef FragmentLinkList::const_iterator ConstFragmentLinkIterator
 A constant iterator over the generated fragment links. More...
 

Public Member Functions

 BRICSFragmentGenerator ()
 Constructs the BRICSFragmentGenerator instance with the full BRICS rule and exclude-pattern set registered. More...
 
- Public Member Functions inherited from CDPL::Chem::FragmentGenerator
 FragmentGenerator ()
 Constructs the FragmentGenerator instance. More...
 
 FragmentGenerator (const FragmentGenerator &gen)
 Constructs a copy of the FragmentGenerator instance gen. More...
 
virtual ~FragmentGenerator ()
 Virtual destructor. More...
 
FragmentGeneratoroperator= (const FragmentGenerator &gen)
 Replaces the state of this generator by a copy of the state of gen. More...
 
void addFragmentationRule (const MolecularGraph::SharedPointer &match_ptn, unsigned int rule_id)
 Registers a new fragmentation rule by its SMARTS match pattern and rule ID. More...
 
void addFragmentationRule (const FragmentationRule &rule)
 Appends a copy of the pre-built fragmentation rule rule. More...
 
const FragmentationRulegetFragmentationRule (std::size_t idx) const
 Returns the fragmentation rule at index idx. More...
 
FragmentationRulegetFragmentationRule (std::size_t idx)
 Returns the fragmentation rule at index idx. More...
 
ConstFragmentationRuleIterator getFragmentationRulesBegin () const
 Returns a constant iterator pointing to the first registered fragmentation rule. More...
 
ConstFragmentationRuleIterator getFragmentationRulesEnd () const
 Returns a constant iterator pointing one past the last registered fragmentation rule. More...
 
FragmentationRuleIterator getFragmentationRulesBegin ()
 Returns a mutable iterator pointing to the first registered fragmentation rule. More...
 
FragmentationRuleIterator getFragmentationRulesEnd ()
 Returns a mutable iterator pointing one past the last registered fragmentation rule. More...
 
void removeFragmentationRule (std::size_t idx)
 Removes the fragmentation rule at index idx. More...
 
std::size_t getNumFragmentationRules () const
 Returns the number of registered fragmentation rules. More...
 
void clearFragmentationRules ()
 Removes all registered fragmentation rules. More...
 
void addExcludePattern (const MolecularGraph::SharedPointer &match_ptn, unsigned int rule_id)
 Registers a rule-specific exclude pattern. More...
 
void addExcludePattern (const MolecularGraph::SharedPointer &match_ptn)
 Registers a generic exclude pattern (applies to all fragmentation rules). More...
 
void addExcludePattern (const ExcludePattern &excl_ptn)
 Appends a copy of the pre-built exclude pattern excl_ptn. More...
 
const ExcludePatterngetExcludePattern (std::size_t idx) const
 Returns the exclude pattern at index idx. More...
 
ExcludePatterngetExcludePattern (std::size_t idx)
 Returns the exclude pattern at index idx. More...
 
ConstExcludePatternIterator getExcludePatternsBegin () const
 Returns a constant iterator pointing to the first registered exclude pattern. More...
 
ConstExcludePatternIterator getExcludePatternsEnd () const
 Returns a constant iterator pointing one past the last registered exclude pattern. More...
 
ExcludePatternIterator getExcludePatternsBegin ()
 Returns a mutable iterator pointing to the first registered exclude pattern. More...
 
ExcludePatternIterator getExcludePatternsEnd ()
 Returns a mutable iterator pointing one past the last registered exclude pattern. More...
 
void removeExcludePattern (std::size_t idx)
 Removes the exclude pattern at index idx. More...
 
std::size_t getNumExcludePatterns () const
 Returns the number of registered exclude patterns. More...
 
void clearExcludePatterns ()
 Removes all registered exclude patterns. More...
 
bool splitBondsIncluded () const
 Tells whether the split (cleaved) bonds are retained in the output fragments. More...
 
void includeSplitBonds (bool include)
 Specifies whether the split (cleaved) bonds shall be retained in the output fragments. More...
 
const FragmentFilterFunctiongetFragmentFilterFunction () const
 Returns the predicate used to filter the generated fragments. More...
 
void setFragmentFilterFunction (const FragmentFilterFunction &func)
 Sets the predicate used to filter the generated fragments (fragments for which the predicate returns false are discarded). More...
 
void generate (const MolecularGraph &molgraph, FragmentList &frag_list, bool append=false)
 Performs the fragmentation of molgraph and writes the resulting fragments to frag_list. More...
 
std::size_t getNumFragmentLinks () const
 Returns the number of fragment links produced by the most recent generate() call. More...
 
const FragmentLinkgetFragmentLink (std::size_t idx) const
 Returns the fragment link at index idx. More...
 
ConstFragmentLinkIterator getFragmentLinksBegin () const
 Returns a constant iterator pointing to the first fragment link. More...
 
ConstFragmentLinkIterator getFragmentLinksEnd () const
 Returns a constant iterator pointing one past the last fragment link. More...
 

Detailed Description

Chem::FragmentGenerator preconfigured with the 16 BRICS bond-cleavage rules and the associated exclude patterns for combinatorial fragmentation of organic molecules.

The rule and exclude-pattern set follows the original Breaking of Retrosynthetically Interesting Chemical Substructures publication. Each rule has the corresponding Chem::BRICSRuleID value.

See also
[BRICS]

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated BRICSFragmentGenerator instances.

Constructor & Destructor Documentation

◆ BRICSFragmentGenerator()

CDPL::Chem::BRICSFragmentGenerator::BRICSFragmentGenerator ( )

Constructs the BRICSFragmentGenerator instance with the full BRICS rule and exclude-pattern set registered.


The documentation for this class was generated from the following file: