Rosetta
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::drug_design::ReactionChemistry Class Referenceabstract

#include <ReactionChemistry.hh>

Inheritance diagram for protocols::drug_design::ReactionChemistry:
Inheritance graph
[legend]

Public Member Functions

 ReactionChemistry (std::string const &type)
 
void apply (core::chemical::MutableResidueType &) override=0
 Modify the passed ResidueType. More...
 
virtual void reaction_file (std::string filename, bool append=false)
 The file which contains the reactions which to use. More...
 
virtual void add_reaction (::RDKit::ChemicalReactionOP rxn, core::Real weight)
 Add a reaction to the list of reactions known by this Chemistry. More...
 
void prefilter_reactions (utility::vector1< ::RDKit::ROMolOP > const &reactants, bool exclude_first=true)
 Filter reaction list for those compatible with the given reactants. More...
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &datacache) override=0
 Initialize any data members of this instance from an input tag and a DataMap object. More...
 
core::chemical::VDVDMapping get_mapping () const override=0
 Get the vertex mapping that was used for the last apply() or get_additional_output() This is a mapping FROM the vds in the BEFORE MutableResidueType TO the vds in the AFTER MutableResidueType. The base class implementation defaults to an identity mapping. More...
 
- Public Member Functions inherited from protocols::chemistries::Chemistry
 Chemistry (std::string const &name)
 
virtual void apply (core::chemical::MutableResidueType &restype, core::pose::Pose const &)
 Modify the passed ResidueType, context sensitive. More...
 
- Public Member Functions inherited from core::chemical::modifications::ChemistryBase
 ChemistryBase (std::string const &name)
 
std::string name () const
 Return the name of this Chemistry object. More...
 
virtual bool has_additional_output () const
 Are there alternate ResidueTypes which are availible from the last time we called apply? (That is, will get_addtional_output() return non-null?) More...
 
virtual core::chemical::MutableResidueTypeOP get_additional_output ()
 Get additional generated ResidueTypes, if any. This allows for 1-to-many Chemistries. More...
 
ChemistryStatus get_last_status () const
 What was the status of the last call to apply()/get_additional_output() More...
 
void set_last_status (ChemistryStatus setting)
 Set the status of the chemistry object. More...
 

Protected Member Functions

void filter_reactions (::RDKit::ROMol const &rdmol, utility::vector1< ::RDKit::ChemicalReactionOP > &rxns, numeric::random::WeightedSampler &rxn_sampler) const
 Filter the reactions to just the ones which can be applied to rdmol If the reactions are multi-component, is assumed that the rdmol (derived from input residue passed to apply()) will be passed as the first reactant to the reaction. More...
 
bool cleanup_product (::RDKit::RWMol &prod) const
 attempt to clean up the product of an RDKit reaction Modifies the RWMol in place - if modification unsuccessful, it will return true. More...
 
utility::vector1< std::pair< ::RDKit::ChemicalReactionOP, core::Real > > const & get_reactions () const
 

Private Member Functions

 ReactionChemistry ()
 

Private Attributes

utility::vector1< std::pair< ::RDKit::ChemicalReactionOP, core::Real > > reactions_
 The chemical reactions to use. More...
 

Constructor & Destructor Documentation

◆ ReactionChemistry() [1/2]

protocols::drug_design::ReactionChemistry::ReactionChemistry ( )
private

◆ ReactionChemistry() [2/2]

protocols::drug_design::ReactionChemistry::ReactionChemistry ( std::string const &  type)

Member Function Documentation

◆ add_reaction()

void protocols::drug_design::ReactionChemistry::add_reaction ( ::RDKit::ChemicalReactionOP  rxn,
core::Real  weight 
)
virtual

◆ apply()

void protocols::drug_design::ReactionChemistry::apply ( core::chemical::MutableResidueType )
overridepure virtual

Modify the passed ResidueType.

if you have a Pose, call the one which takes the Pose context

Implements protocols::chemistries::Chemistry.

Implemented in protocols::drug_design::ReactionMultiTransform, protocols::drug_design::ReactionGrow, and protocols::drug_design::ReactionFragment.

◆ cleanup_product()

bool protocols::drug_design::ReactionChemistry::cleanup_product ( ::RDKit::RWMol &  prod) const
protected

attempt to clean up the product of an RDKit reaction Modifies the RWMol in place - if modification unsuccessful, it will return true.

References core::chemical::rdkit::get_forcefield(), and protocols::drug_design::TR().

Referenced by protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), and protocols::drug_design::ReactionMultiTransform::apply().

◆ filter_reactions()

void protocols::drug_design::ReactionChemistry::filter_reactions ( ::RDKit::ROMol const &  rdmol,
utility::vector1< ::RDKit::ChemicalReactionOP > &  rxns,
numeric::random::WeightedSampler &  rxn_sampler 
) const
protected

Filter the reactions to just the ones which can be applied to rdmol If the reactions are multi-component, is assumed that the rdmol (derived from input residue passed to apply()) will be passed as the first reactant to the reaction.

References reactions_.

Referenced by protocols::drug_design::ReactionFragment::apply(), protocols::drug_design::ReactionGrow::apply(), and protocols::drug_design::ReactionMultiTransform::apply().

◆ get_mapping()

core::chemical::VDVDMapping protocols::drug_design::ReactionChemistry::get_mapping ( ) const
overridepure virtual

Get the vertex mapping that was used for the last apply() or get_additional_output() This is a mapping FROM the vds in the BEFORE MutableResidueType TO the vds in the AFTER MutableResidueType. The base class implementation defaults to an identity mapping.

Get the vertex mapping that was used for the last apply() The base class implementation defaults to an identity mapping.

Reimplemented from core::chemical::modifications::ChemistryBase.

Implemented in protocols::drug_design::ReactionMultiTransform, protocols::drug_design::ReactionGrow, and protocols::drug_design::ReactionFragment.

◆ get_reactions()

utility::vector1< std::pair<::RDKit::ChemicalReactionOP, core::Real > > const & protocols::drug_design::ReactionChemistry::get_reactions ( ) const
protected

◆ parse_my_tag()

void protocols::drug_design::ReactionChemistry::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap datacache 
)
overridepure virtual

Initialize any data members of this instance from an input tag and a DataMap object.

Implements protocols::chemistries::Chemistry.

Implemented in protocols::drug_design::ReactionMultiTransform, protocols::drug_design::ReactionGrow, and protocols::drug_design::ReactionFragment.

◆ prefilter_reactions()

void protocols::drug_design::ReactionChemistry::prefilter_reactions ( utility::vector1< ::RDKit::ROMolOP > const &  reactants,
bool  exclude_first = true 
)

Filter reaction list for those compatible with the given reactants.

Discarded reactions will be discarded permanently. Only call with the finalized fragment list.

References reactions_, core::id::swap(), and protocols::drug_design::TR().

Referenced by protocols::drug_design::ReactionGrow::prefilter_reactions().

◆ reaction_file()

void protocols::drug_design::ReactionChemistry::reaction_file ( std::string  filename,
bool  append = false 
)
virtual

Member Data Documentation

◆ reactions_

utility::vector1< std::pair< ::RDKit::ChemicalReactionOP, core::Real > > protocols::drug_design::ReactionChemistry::reactions_
private

The chemical reactions to use.

Referenced by add_reaction(), filter_reactions(), get_reactions(), prefilter_reactions(), and reaction_file().


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