|
Rosetta
|
#include <ReactionBasedAnalogSampler.hh>

Classes | |
| struct | Product |
| struct | Reagent |
Public Member Functions | |
| ReactionBasedAnalogSampler () | |
| ~ReactionBasedAnalogSampler () override | |
| void | apply (core::chemical::MutableResidueType &) override |
| Modify the passed ResidueType. More... | |
| 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 | reset_spl_ratio () |
| void | load_reactions (std::string const &reaction_dir, std::string const &filename) |
| load reaction files from a designated path (deprecated) More... | |
| void | load_reactions (std::string const &filename) |
| load reactions from a single file 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 Member Functions | |
| void | load_all_reagents () |
| load reagents through corresponding reactions (deprecated) More... | |
| void | load_all_reagents (std::string const &filename) |
| load reagents from a single file More... | |
| bool | check_reagent_validity (::RDKit::ROMOL_SPTR reag) const |
| check if the reagent contains bad structures that would later fail RDKit More... | |
| utility::vector1< Product > | sample (std::list< std::pair< core::Real, core::Size > > &score_idx_set) const |
| Draw samples given a list of fragment similarity to reference input. More... | |
| utility::vector1< Product > | sample_fragment (utility::vector1< std::list< std::pair< core::Real, core::Size > > > &score_idx_set) const |
| Draw samples given lists of fragment similarity to first round product reagents. More... | |
| Product | sample_candidate (const utility::vector1< Product > &candidate_set, const ::RDKit::RWMOL_SPTR rdmol) |
| Draw a product from the given candidate set. More... | |
| std::shared_ptr<::RDKit::SparseIntVect< unsigned int > > | getMorganFingerprint (::RDKit::ROMol const &mol, bool useFeatures=false) const |
| A helper function to easily switch between using ECFP and FCFP. More... | |
| core::chemical::IndexIndexMapping | find_O3A_mapping (::RDKit::ROMOL_SPTR from, ::RDKit::ROMOL_SPTR to) const |
| Find a common substructure mapping using RDKit Open3DAlign method. More... | |
| void | geometric_sampling (numeric::random::WeightedSampler &sampler, core::Size N) |
| Setup weights for a sampler. Weighted sampling with geometric distribution; common ratio dynamically decided by population size. More... | |
| utility::vector1< Product > | analog_search (const ReactionBasedAnalogSampler::Product &prod) const |
| Return analogs of the chosen product, can be itself. More... | |
| void | pair (core::Size r_no, utility::vector1< utility::vector1< core::Size > > const &sets, utility::vector1< Product > &candidates, int &revisits) const |
| Find all pair of reagents that can undergo the specific reaction from the current sets. More... | |
| void | pair (core::Size curr_no, core::Size r_no, utility::vector1< core::Size > single_pair, utility::vector1< utility::vector1< core::Size > > &all_pairs, utility::vector1< utility::vector1< core::Size > > const &sets) const |
| Helper function for pairing. Use a DFS to generate all pairs. More... | |
| Product | run_reaction (utility::vector1< core::Size > const &reagents) const |
| Run the reaction given the list of reagent indices. More... | |
Static Private Member Functions | |
| static bool | sortbySim (const std::pair< core::Real, core::Size > &a, const std::pair< core::Real, core::Size > &b) |
| helper function for comparing score_index paires More... | |
Private Attributes | |
| std::unordered_set< Product, Product::HashFunction > | visited_ |
| std::string | last_smiles_ |
| std::unordered_map< std::string, ChemicalReactionOP > | rxns_ |
| utility::vector1< Reagent > | reagents_ |
| numeric::random::WeightedSampler | reagent_sampler_ |
| core::Real | geo_spl_ratio_ |
| bool | dynamic_sampling_ |
| utility::vector1< core::Real > | dynamic_spl_ratios_ |
| core::Size | minCandidates_ |
| core::chemical::VDVDMapping | mapping_ |
| protocols::drug_design::ReactionBasedAnalogSampler::ReactionBasedAnalogSampler | ( | ) |
|
override |
|
private |
Return analogs of the chosen product, can be itself.
References protocols::drug_design::ReactionBasedAnalogSampler::Reagent::fp_, protocols::drug_design::ReactionBasedAnalogSampler::Product::frags_, reagents_, sample_fragment(), and protocols::hybridization::score.
|
overridevirtual |
Modify the passed ResidueType.
if you have a Pose, call the one which takes the Pose context
Implements protocols::chemistries::Chemistry.
References core::chemical::ResidueTypeBase::add_string_property(), core::chemical::MutableResidueType::atom_name(), core::chemical::MutableResidueType::bonded_heavyatoms(), core::chemical::AtomRefMapping< FromRef, ToRef >::clear(), core::chemical::combine(), dynamic_sampling_, dynamic_spl_ratios_, core::chemical::AtomRefMapping< FromRef, ToRef >::empty(), core::chemical::modifications::FAIL_DO_NOT_RETRY, find_O3A_mapping(), core::chemical::rdkit::RDMolToRestype::generate_restype(), geo_spl_ratio_, geometric_sampling(), core::chemical::AtomRefMapping< FromRef, ToRef >::identity(), core::chemical::rdkit::RDMolToRestype::index_to_vd(), core::chemical::AtomRefMapping< FromRef, ToRef >::invalid_entry(), core::chemical::INVALID_VD, core::chemical::rdkit::label_with_index(), last_smiles_, mapping_, protocols::mean_field::min(), core::chemical::rdkit::RestypeToRDMol::Mol(), core::chemical::MutableResidueType::nbr_vertex(), core::pack::dunbrack::product(), core::chemical::ResidueTypeBase::properties(), reagent_sampler_, reagents_, reset_spl_ratio(), rxns_, sample(), sample_candidate(), protocols::hybridization::score, core::chemical::modifications::ChemistryBase::set_last_status(), core::chemical::rdkit::RDMolToRestype::set_nbr(), core::chemical::ResidueProperties::string_properties(), core::chemical::modifications::SUCCESS, core::id::to_string(), protocols::drug_design::TR(), core::chemical::rdkit::RestypeToRDMol::vd_to_index(), and visited_.
|
private |
check if the reagent contains bad structures that would later fail RDKit
Referenced by load_all_reagents().
|
static |
|
private |
Find a common substructure mapping using RDKit Open3DAlign method.
References core::chemical::rdkit::convert_match_vect_to_index_index_map(), core::chemical::AtomRefMapping< FromRef, ToRef >::reverse(), protocols::hybridization::score, and protocols::drug_design::TR().
Referenced by apply().
|
private |
Setup weights for a sampler. Weighted sampling with geometric distribution; common ratio dynamically decided by population size.
References geo_spl_ratio_, protocols::mean_field::max(), core::chemical::element::N, and core::chemical::rings::q.
Referenced by apply(), load_all_reagents(), and sample_candidate().
|
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.
Reimplemented from core::chemical::modifications::ChemistryBase.
References mapping_.
|
private |
A helper function to easily switch between using ECFP and FCFP.
|
private |
load reagents through corresponding reactions (deprecated)
References protocols::drug_design::ReactionBasedAnalogSampler::Reagent::fp_, geometric_sampling(), protocols::drug_design::ReactionBasedAnalogSampler::Reagent::no_, protocols::drug_design::ReactionBasedAnalogSampler::Reagent::rdmol_, reagent_sampler_, reagents_, protocols::drug_design::ReactionBasedAnalogSampler::Reagent::rxn_, rxns_, and protocols::drug_design::TR().
Referenced by parse_my_tag().
|
private |
load reagents from a single file
References check_reagent_validity(), protocols::abinitio::filename(), protocols::drug_design::ReactionBasedAnalogSampler::Reagent::fp_, geometric_sampling(), protocols::drug_design::ReactionBasedAnalogSampler::Reagent::no_, protocols::drug_design::ReactionBasedAnalogSampler::Reagent::rdmol_, reagent_sampler_, reagents_, protocols::drug_design::ReactionBasedAnalogSampler::Reagent::rxn_, and protocols::drug_design::TR().
| void protocols::drug_design::ReactionBasedAnalogSampler::load_reactions | ( | std::string const & | filename | ) |
load reactions from a single file
References protocols::abinitio::filename(), rxns_, and protocols::drug_design::TR().
| void protocols::drug_design::ReactionBasedAnalogSampler::load_reactions | ( | std::string const & | reaction_dir, |
| std::string const & | filename | ||
| ) |
load reaction files from a designated path (deprecated)
References protocols::abinitio::filename(), rxns_, and protocols::drug_design::TR().
Referenced by parse_my_tag().
|
private |
Helper function for pairing. Use a DFS to generate all pairs.
References pair().
|
private |
Find all pair of reagents that can undergo the specific reaction from the current sets.
References protocols::drug_design::ReactionBasedAnalogSampler::Product::rdmol_, run_reaction(), and visited_.
Referenced by pair(), sample(), and sample_fragment().
|
overridevirtual |
Initialize any data members of this instance from an input tag and a DataMap object.
Implements protocols::chemistries::Chemistry.
References dynamic_sampling_, dynamic_spl_ratios_, geo_spl_ratio_, last_smiles_, load_all_reagents(), load_reactions(), minCandidates_, and protocols::drug_design::TR().
|
static |
|
inline |
References dynamic_spl_ratios_, and geo_spl_ratio_.
Referenced by apply().
|
private |
Run the reaction given the list of reagent indices.
References protocols::drug_design::ReactionBasedAnalogSampler::Product::fp_, protocols::drug_design::ReactionBasedAnalogSampler::Product::frags_, core::chemical::rdkit::neutralize_rdmol(), protocols::drug_design::ReactionBasedAnalogSampler::Product::rdmol_, reagents_, rxns_, protocols::drug_design::ReactionBasedAnalogSampler::Product::smiles_, and protocols::drug_design::TR().
Referenced by pair().
|
private |
Draw samples given a list of fragment similarity to reference input.
References core::sequence::end, minCandidates_, pair(), reagent_sampler_, reagents_, rxns_, and protocols::drug_design::TR().
Referenced by apply(), and sample_fragment().
|
private |
Draw a product from the given candidate set.
References geometric_sampling(), protocols::drug_design::ReactionBasedAnalogSampler::Product::smiles_, sortbySim(), and protocols::drug_design::TR().
Referenced by apply().
|
private |
Draw samples given lists of fragment similarity to first round product reagents.
References core::sequence::end, minCandidates_, pair(), reagent_sampler_, reagents_, rxns_, sample(), and protocols::drug_design::TR().
Referenced by analog_search().
|
staticprivate |
helper function for comparing score_index paires
References core::pose::motif::a(), and protocols::match::upstream::b.
Referenced by sample_candidate().
|
private |
Referenced by apply(), and parse_my_tag().
|
private |
Referenced by apply(), parse_my_tag(), and reset_spl_ratio().
|
private |
Referenced by apply(), geometric_sampling(), parse_my_tag(), and reset_spl_ratio().
|
private |
Referenced by apply(), and parse_my_tag().
|
private |
Referenced by apply(), and get_mapping().
|
private |
Referenced by parse_my_tag(), sample(), and sample_fragment().
|
private |
Referenced by apply(), load_all_reagents(), sample(), and sample_fragment().
|
private |
Referenced by analog_search(), apply(), load_all_reagents(), run_reaction(), sample(), and sample_fragment().
|
private |
Referenced by apply(), load_all_reagents(), load_reactions(), run_reaction(), sample(), and sample_fragment().
|
private |