RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::MacroMolTemplateBuilder Class Reference

Collects and validates the pieces needed to create a MacroMolTemplate. More...

#include <MacroMolTemplate.h>

Public Member Functions

 MacroMolTemplateBuilder (const ROMol &mol, MonomerClass monomerClass, std::string name, std::string symbol, std::string originalData)
 
RWMol & getMol ()
 Returns the mutable molecule being prepared for the template.
 
MacroMolTemplateBuilder & setMainGroup (std::vector< unsigned int > &&atomIdxs)
 Defines the atoms retained as the main monomer group.
 
MacroMolTemplateBuilder & addLeavingGroup (MacroMolLeavingGroup &&leavingGroup)
 Adds a leaving group and its attachment-point definition.
 
MacroMolTemplateBuilder & setSubclass (std::string subclass)
 Sets the optional SCSR subclass.
 
std::unique_ptr< MacroMolTemplate > build () const
 Validates the complete definition and returns an immutable template.
 

Detailed Description

Collects and validates the pieces needed to create a MacroMolTemplate.

Main-group and leaving-group definitions depend on one another, so the builder holds the incomplete definition until build() can validate it as a whole. build() returns a complete template without modifying the builder, allowing callers to use the normal builder.build() syntax.

Definition at line 120 of file MacroMolTemplate.h.

Constructor & Destructor Documentation

◆ MacroMolTemplateBuilder()

RDKit::MacroMolTemplateBuilder::MacroMolTemplateBuilder ( const ROMol & mol,
MonomerClass monomerClass,
std::string name,
std::string symbol,
std::string originalData )
inline

Definition at line 122 of file MacroMolTemplate.h.

References symbol.

Referenced by addLeavingGroup(), setMainGroup(), and setSubclass().

Member Function Documentation

◆ addLeavingGroup()

MacroMolTemplateBuilder & RDKit::MacroMolTemplateBuilder::addLeavingGroup ( MacroMolLeavingGroup && leavingGroup)

Adds a leaving group and its attachment-point definition.

References MacroMolTemplateBuilder().

◆ build()

std::unique_ptr< MacroMolTemplate > RDKit::MacroMolTemplateBuilder::build ( ) const

Validates the complete definition and returns an immutable template.

◆ getMol()

RWMol & RDKit::MacroMolTemplateBuilder::getMol ( )
inline

Returns the mutable molecule being prepared for the template.

Structural edits should be completed before defining the main and leaving groups.

Definition at line 136 of file MacroMolTemplate.h.

◆ setMainGroup()

MacroMolTemplateBuilder & RDKit::MacroMolTemplateBuilder::setMainGroup ( std::vector< unsigned int > && atomIdxs)

Defines the atoms retained as the main monomer group.

References MacroMolTemplateBuilder().

◆ setSubclass()

MacroMolTemplateBuilder & RDKit::MacroMolTemplateBuilder::setSubclass ( std::string subclass)

Sets the optional SCSR subclass.

References MacroMolTemplateBuilder().


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