Rosetta
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
protocols::drug_design::ReactionGrow Class Reference

#include <ReactionGrow.hh>

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

Public Member Functions

 ReactionGrow ()
 
void apply (core::chemical::MutableResidueType &) override
 Modify the passed ResidueType. More...
 
void fragment_database (std::string filename, bool append=false)
 The file which contains the fragments to add to input residue type. More...
 
void prefilter_fragments ()
 Reduce the fragment set to those which are compatible with the reactions. More...
 
void prefilter_reactions ()
 Filter reaction list for those compatible with the given fragments. More...
 
void weight_by_property (std::string const &setting)
 If not empty, use property weighting based on the given property. More...
 
std::string const & weight_by_property () const
 
void parse_my_tag (utility::tag::TagCOP tag, basic::datacache::DataMap &datacache) override
 Initialize any data members of this instance from an input tag and a DataMap object. More...
 
core::chemical::VDVDMapping get_mapping () const override
 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...
 
void add_reaction (::RDKit::ChemicalReactionOP rxn, core::Real weight) override
 Add a reaction to the list of reactions to use. Reaction should be written in the synthetic direction with a single product. More...
 
- Public Member Functions inherited from protocols::drug_design::ReactionChemistry
 ReactionChemistry (std::string const &type)
 
virtual void reaction_file (std::string filename, bool append=false)
 The file which contains the reactions which to use. 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...
 
- 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...
 

Static Public Member Functions

static std::string class_name ()
 
static void provide_xml_schema (utility::tag::XMLSchemaDefinition &xsd)
 

Private Attributes

utility::vector1< ::RDKit::ROMolOPfragments_
 The fragments to apply. More...
 
std::string property_name_
 If not empty, pick fragments based on the weighting by the given property. More...
 
core::chemical::VDVDMapping mapping_
 

Additional Inherited Members

- Protected Member Functions inherited from protocols::drug_design::ReactionChemistry
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
 

Constructor & Destructor Documentation

◆ ReactionGrow()

protocols::drug_design::ReactionGrow::ReactionGrow ( )

Member Function Documentation

◆ add_reaction()

void protocols::drug_design::ReactionGrow::add_reaction ( ::RDKit::ChemicalReactionOP  rxn,
core::Real  weight 
)
overridevirtual

Add a reaction to the list of reactions to use. Reaction should be written in the synthetic direction with a single product.

Reimplemented from protocols::drug_design::ReactionChemistry.

References protocols::drug_design::ReactionChemistry::add_reaction(), and protocols::drug_design::TR().

◆ apply()

void protocols::drug_design::ReactionGrow::apply ( core::chemical::MutableResidueType )
overridevirtual

◆ class_name()

std::string protocols::drug_design::ReactionGrow::class_name ( )
static

◆ fragment_database()

void protocols::drug_design::ReactionGrow::fragment_database ( std::string  filename,
bool  append = false 
)

The file which contains the fragments to add to input residue type.

References protocols::abinitio::filename(), fragments_, core::chemical::rdkit::load_sdf(), and protocols::drug_design::TR().

Referenced by parse_my_tag().

◆ get_mapping()

core::chemical::VDVDMapping protocols::drug_design::ReactionGrow::get_mapping ( ) const
overridevirtual

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.

Implements protocols::drug_design::ReactionChemistry.

References mapping_.

◆ parse_my_tag()

void protocols::drug_design::ReactionGrow::parse_my_tag ( utility::tag::TagCOP  tag,
basic::datacache::DataMap datacache 
)
overridevirtual

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

Implements protocols::drug_design::ReactionChemistry.

References fragment_database(), prefilter_fragments(), prefilter_reactions(), protocols::drug_design::ReactionChemistry::reaction_file(), and weight_by_property().

◆ prefilter_fragments()

void protocols::drug_design::ReactionGrow::prefilter_fragments ( )

Reduce the fragment set to those which are compatible with the reactions.

Discarded fragments are discarded permanently. Only call after all reactions are finalized for this Chemistry

References fragments_, protocols::drug_design::ReactionChemistry::get_reactions(), core::id::swap(), and protocols::drug_design::TR().

Referenced by parse_my_tag().

◆ prefilter_reactions()

void protocols::drug_design::ReactionGrow::prefilter_reactions ( )
inline

Filter reaction list for those compatible with the given fragments.

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

References fragments_, and protocols::drug_design::ReactionChemistry::prefilter_reactions().

Referenced by parse_my_tag().

◆ provide_xml_schema()

void protocols::drug_design::ReactionGrow::provide_xml_schema ( utility::tag::XMLSchemaDefinition &  xsd)
static

◆ weight_by_property() [1/2]

std::string const& protocols::drug_design::ReactionGrow::weight_by_property ( ) const
inline

References property_name_.

Referenced by parse_my_tag().

◆ weight_by_property() [2/2]

void protocols::drug_design::ReactionGrow::weight_by_property ( std::string const &  setting)
inline

If not empty, use property weighting based on the given property.

References property_name_.

Member Data Documentation

◆ fragments_

utility::vector1< ::RDKit::ROMolOP > protocols::drug_design::ReactionGrow::fragments_
private

The fragments to apply.

Referenced by apply(), fragment_database(), prefilter_fragments(), and prefilter_reactions().

◆ mapping_

core::chemical::VDVDMapping protocols::drug_design::ReactionGrow::mapping_
private

Referenced by apply(), and get_mapping().

◆ property_name_

std::string protocols::drug_design::ReactionGrow::property_name_
private

If not empty, pick fragments based on the weighting by the given property.

Referenced by apply(), and weight_by_property().


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