Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::match::downstream::SecondaryMatcherToDownstreamResidue Class Reference

A class for an algorithm. Given a conformation of the downstream partner, the algorithm is responsible for producing a set of hits. More...

#include <SecondaryMatcherToDownstreamResidue.hh>

Inheritance diagram for protocols::match::downstream::SecondaryMatcherToDownstreamResidue:
Inheritance graph
[legend]

Public Types

typedef DownstreamAlgorithm parent
 
typedef std::pair
< SecMatchResiduePairEvaluatorCOP,
core::Size
Evaluator_MCFI_ID_Pair
 
typedef std::list
< Evaluator_MCFI_ID_Pair
EvaluatorSet
 
- Public Types inherited from protocols::match::downstream::DownstreamAlgorithm
typedef core::Size Size
 
typedef core::Vector Vector
 

Public Member Functions

 SecondaryMatcherToDownstreamResidue (core::pose::PoseCOP upstream_pose, core::Size geom_cst_id)
 
 ~SecondaryMatcherToDownstreamResidue () override
 
DownstreamAlgorithmOP clone () const override
 
std::list< Hitbuild_hits_at_all_positions (Matcher &matcher) override
 Main driver function for hit generation. This DownstreamAlgorithm structures it's iteration over the hits from previous rounds as follows: for i = 1:this->geom_cst_id() - 1 if ( ! matcher->representative_downstream_algorithm( i )->generates_primary_hits() ) continue; for j = 1:n_build_points_for_geomcst( i ) recover_downstream_coordinates_from_previous_round( hit_subset_j ); initialize TaretRotamerCoords data for all downstream algorithms with the same geom_cst_id #omp parallel for /// All class access below this point is const and parallelizable for k = 1:n_build_positions /// call this function to start l loop: matcher.upstream_builder[ geom_cst_id() ]->build( k ) for l = 1:n_rotamers_k /// call to start m loop: downstream_algorithm->build( k, l, rotamer_l ) ) for m = 1:n_hits_in_block_j if ( respair_evaluator_->evaluate_residues( rotamer_l, rotamer_m ) hit_list.append( Hit( k, l, i, 1, hit[ m ].second() )); return hit_list There are two important consequences to this hit-generation layout. More...
 
void respond_to_primary_hitlist_change (Matcher &matcher, core::Size round_just_completed) override
 mimic the classic matcher's reset of the Occupied space hash. More...
 
void respond_to_peripheral_hitlist_change (Matcher &matcher) override
 Remove my hits if they fall into a volume of the occupied space hash that is no longer occupied. More...
 
std::list< Hitbuild (core::Size const scaffold_build_point_id, core::Size const upstream_conf_id, core::conformation::Residue const &upstream_residue) const override
 Iterate across the conformations of the downstream residue coming from hits generated in previous rounds, and add hits for each upstream residue that (Also, see comments for the build_at_all_positions method.) More...
 
bool upstream_only () const override
 returns false; this secondary matcher describes the location of the downstream partner even though it does not generate that location itself. Matches may be found by hashing the 6D coordinate of the downstream partner. More...
 
bool generates_primary_hits () const override
 This method returns 'false' since this matcher does not describe the coordinates of the downstream partner at all. More...
 
HitPtrListCOP hits_to_include_with_partial_match (match_dspos1 const &) const override
 This method is invoked by the Matcher as it enumerates matches should this class return "true" in it's upstream_only. method. The Matcher will enumerate matches placing hits into the match for all of the geometric-constraints which describe the downstream partner's 6D coordinates in their hits, and then for all other geometric constraints in ascending order. The hits for upstream residues 1 to geom_cst_id() - 1 are all valid; the hit for geom-cst i, given that i > geom_cst_id() - 1 is valid if and only if the downstream algorithm for geom-cst i returns true in it's upstream_only(). The Hit const * list should point at the Matcher's hits. Between prepare-for-match enumeration and note_match_enumeration_completed, the Matcher provides a guarantee to the downstream algorithm that it's hit lists have not changed, and therefore all Hit *'s remain valid. The Matcher is providing a "match_dspos1 const &" instead of a "match const &" because this DownstreamAlgorithm should not be examining the 6D coordinates of the downstream partner according to other geometric constraints, and because the Matcher's match_dspos1-enumeration technique could not readily construct a match, the Matcher's match-enumeration technique can readily construct a match_dspos1. Data in the input match_dspos1 relating to the downstream partner is undefined. More...
 
core::Size n_possible_hits_per_upstream_conformation () const override
 
void set_downstream_restype (core::chemical::ResidueTypeCOP downstream_restype)
 
void set_focused_geomcst_id (core::Size focused_geomcst_id)
 
void add_evaluator (SecMatchResiduePairEvaluatorCOP evaluator, core::Size mcfi_id)
 
void set_catalytic_atoms (utility::vector1< core::Size > catalytic_atoms)
 
- Public Member Functions inherited from protocols::match::downstream::DownstreamAlgorithm
 DownstreamAlgorithm (core::Size geom_cst_id)
 
 DownstreamAlgorithm (DownstreamAlgorithm const &)
 
DownstreamAlgorithm const & operator= (DownstreamAlgorithm const &)
 
 ~DownstreamAlgorithm () override
 
virtual void prepare_for_match_enumeration (Matcher const &)
 Called at the conclusion of matching, the Matcher signals to the downstream algorithm that it's time to prepare for match generation; if the downstream algorithm needs to enumerate compatible hits in response to the invokation of its hits_to_include_with_partial_match method, then now is the time to prepare for those calls. Base class has a noop implementation. More...
 
void set_bb_grid (BumpGridCOP bbgrid)
 
void set_active_site_grid (ActiveSiteGridCOP active_site_grid)
 
core::Size geom_cst_id () const
 
void set_dsbuilder (DownstreamBuilderOP dsbuilder)
 
DownstreamBuilderOP get_dsbuilder () const
 
bool are_colliding (core::conformation::Residue const &us_res, core::conformation::Residue const &ds_res, utility::vector1< core::id::AtomID > const &ds_atoms, utility::vector1< core::Size > const &catalytic_atoms) const
 

Private Member Functions

void prepare_for_hit_generation (Matcher &matcher)
 
void prepare_for_hit_generation_for_geomcst (Matcher &matcher, core::Size target_geomcst_id)
 
bool prepare_for_hit_generation_at_target_build_point (Matcher &matcher, core::Size target_geomcst_id, upstream::ScaffoldBuildPoint const &target_build_point)
 
void set_target_rotamer_coords (TargetRotamerCoordsOP target_geomcst_coords)
 Allow another SecondaryMatcherToDownstreamResidue to set my TargetRotamerCoords object so that we can share this data. More...
 
void set_ds_coords_needed (utility::vector1< core::id::AtomID > ds_coords)
 
bool ds_atom_present (core::Size index) const
 
utility::vector1
< utility::vector1
< utility::vector1< std::pair
< core::Size, core::Real > > > > 
get_min_sep_d2_from_upstream_atoms () const
 

Private Attributes

core::chemical::ResidueTypeCOP downstream_restype_
 
core::pose::PoseCOP upstream_pose_
 
EvaluatorSet respair_evaluators_
 
core::Size focused_geomcst_id_
 
Matcher::HitListConstIterator hits_for_focused_geomcst_and_build_point_begin_
 
Matcher::HitListConstIterator hits_for_focused_geomcst_and_build_point_end_
 
Matcher::HitListConstIterator hits_for_focused_geomcst_end_
 
TargetRotamerCoordsOP target_downstream_coords_
 
utility::vector1
< core::id::AtomID
downstream_atom_coordinates_needed_
 
utility::vector1< core::Sizecatalytic_atoms_
 
core::Size occspace_rev_id_at_last_update_
 

Additional Inherited Members

- Protected Member Functions inherited from protocols::match::downstream::DownstreamAlgorithm
BumpGrid const & bbgrid () const
 
bool active_site_grid_set () const
 
ActiveSiteGrid const & active_site_grid () const
 
std::list< Hitdefault_build_hits_at_all_positions (Matcher const &matcher) const
 Non-virtual, const method for generating hits by first iterating across all build points and then invoking upstream_builder->build( build_point_i ) and splicing together the results. This method is invoked by default if the derived class does not override build_hits_at_all_positions. More...
 

Detailed Description

A class for an algorithm. Given a conformation of the downstream partner, the algorithm is responsible for producing a set of hits.

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::match::downstream::SecondaryMatcherToDownstreamResidue::SecondaryMatcherToDownstreamResidue ( core::pose::PoseCOP  upstream_pose,
core::Size  geom_cst_id 
)

References catalytic_atoms_.

protocols::match::downstream::SecondaryMatcherToDownstreamResidue::~SecondaryMatcherToDownstreamResidue ( )
overridedefault

Member Function Documentation

void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::add_evaluator ( SecMatchResiduePairEvaluatorCOP  evaluator,
core::Size  mcfi_id 
)

References respair_evaluators_.

std::list< Hit > protocols::match::downstream::SecondaryMatcherToDownstreamResidue::build ( core::Size const  scaffold_build_point_id,
core::Size const  upstream_conf_id,
core::conformation::Residue const &  upstream_residue 
) const
overridevirtual

Iterate across the conformations of the downstream residue coming from hits generated in previous rounds, and add hits for each upstream residue that (Also, see comments for the build_at_all_positions method.)

Iterate across the hits from a particular upstream build point i that were generated in a previous round, and see if the geometry of the input upstream_residue has "satisfactory interactions" with the hits from upstream-build-point i; if so, it appends a Hit to the hitlist returned at the end of the method. (Also, see comments for the build_at_all_positions method.)

Implements protocols::match::downstream::DownstreamAlgorithm.

References protocols::match::downstream::DownstreamAlgorithm::are_colliding(), catalytic_atoms_, downstream_atom_coordinates_needed_, downstream_restype_, protocols::match::Hit::first(), protocols::match::downstream::DownstreamAlgorithm::get_dsbuilder(), respair_evaluators_, protocols::match::Hit::second(), core::conformation::Residue::seqpos(), core::conformation::Residue::set_xyz(), target_downstream_coords_, and upstream_pose_.

std::list< Hit > protocols::match::downstream::SecondaryMatcherToDownstreamResidue::build_hits_at_all_positions ( Matcher matcher)
overridevirtual

Main driver function for hit generation. This DownstreamAlgorithm structures it's iteration over the hits from previous rounds as follows: for i = 1:this->geom_cst_id() - 1 if ( ! matcher->representative_downstream_algorithm( i )->generates_primary_hits() ) continue; for j = 1:n_build_points_for_geomcst( i ) recover_downstream_coordinates_from_previous_round( hit_subset_j ); initialize TaretRotamerCoords data for all downstream algorithms with the same geom_cst_id #omp parallel for /// All class access below this point is const and parallelizable for k = 1:n_build_positions /// call this function to start l loop: matcher.upstream_builder[ geom_cst_id() ]->build( k ) for l = 1:n_rotamers_k /// call to start m loop: downstream_algorithm->build( k, l, rotamer_l ) ) for m = 1:n_hits_in_block_j if ( respair_evaluator_->evaluate_residues( rotamer_l, rotamer_m ) hit_list.append( Hit( k, l, i, 1, hit[ m ].second() )); return hit_list There are two important consequences to this hit-generation layout.

  1. The coordinates for rotamer_l are computed sum( i, n_build_points_for_geomcst( i )) times.
  2. The number of downstream target coordinates that live in memory at the same time is bound by some constant (10K). This is a clear trade-off between performance and memory NOTE: the most time consuming portion will likely be the m loop, and not the repeated construction of coordinates in the j loop. Reguardless of how many times we rebuild coordinates for rotamer j, the expense will primarily lie in the same place: the call to evaluate_residues( rotamer_l, rotamer_m ). NOTE: if there are ways to iterate across the j loop differently, it likely possible to prune m/l combinations early and thereby improve running time.

Reimplemented from protocols::match::downstream::DownstreamAlgorithm.

References protocols::fldsgn::topology::compare(), core::sequence::end, focused_geomcst_id_, protocols::match::downstream::DownstreamAlgorithm::geom_cst_id(), protocols::match::Matcher::per_constraint_build_points(), prepare_for_hit_generation(), prepare_for_hit_generation_at_target_build_point(), prepare_for_hit_generation_for_geomcst(), protocols::match::Matcher::representative_downstream_algorithm(), protocols::match::downstream::TR(), and protocols::match::Matcher::upstream_builder().

DownstreamAlgorithmOP protocols::match::downstream::SecondaryMatcherToDownstreamResidue::clone ( ) const
overridevirtual
bool protocols::match::downstream::SecondaryMatcherToDownstreamResidue::ds_atom_present ( core::Size  index) const
private
bool protocols::match::downstream::SecondaryMatcherToDownstreamResidue::generates_primary_hits ( ) const
overridevirtual

This method returns 'false' since this matcher does not describe the coordinates of the downstream partner at all.

Implements protocols::match::downstream::DownstreamAlgorithm.

utility::vector1< utility::vector1< utility::vector1< std::pair< core::Size, core::Real > > > > protocols::match::downstream::SecondaryMatcherToDownstreamResidue::get_min_sep_d2_from_upstream_atoms ( ) const
private
HitPtrListCOP protocols::match::downstream::SecondaryMatcherToDownstreamResidue::hits_to_include_with_partial_match ( match_dspos1 const &  m) const
overridevirtual

This method is invoked by the Matcher as it enumerates matches should this class return "true" in it's upstream_only. method. The Matcher will enumerate matches placing hits into the match for all of the geometric-constraints which describe the downstream partner's 6D coordinates in their hits, and then for all other geometric constraints in ascending order. The hits for upstream residues 1 to geom_cst_id() - 1 are all valid; the hit for geom-cst i, given that i > geom_cst_id() - 1 is valid if and only if the downstream algorithm for geom-cst i returns true in it's upstream_only(). The Hit const * list should point at the Matcher's hits. Between prepare-for-match enumeration and note_match_enumeration_completed, the Matcher provides a guarantee to the downstream algorithm that it's hit lists have not changed, and therefore all Hit *'s remain valid. The Matcher is providing a "match_dspos1 const &" instead of a "match const &" because this DownstreamAlgorithm should not be examining the 6D coordinates of the downstream partner according to other geometric constraints, and because the Matcher's match_dspos1-enumeration technique could not readily construct a match, the Matcher's match-enumeration technique can readily construct a match_dspos1. Data in the input match_dspos1 relating to the downstream partner is undefined.

Implements protocols::match::downstream::DownstreamAlgorithm.

SecondaryMatcherToDownstreamResidue::Size protocols::match::downstream::SecondaryMatcherToDownstreamResidue::n_possible_hits_per_upstream_conformation ( ) const
overridevirtual
void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation ( Matcher matcher)
private
bool protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation_at_target_build_point ( Matcher matcher,
core::Size  target_geomcst_id,
upstream::ScaffoldBuildPoint const &  target_build_point 
)
private
void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation_for_geomcst ( Matcher matcher,
core::Size  target_geomcst_id 
)
private
void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::respond_to_peripheral_hitlist_change ( Matcher matcher)
overridevirtual

Remove my hits if they fall into a volume of the occupied space hash that is no longer occupied.

Drop hits that had previously seemed viable after another round completed; during that round, certain previously occupied regions of 6D were not filled with new hits. Any previously-generated hit that falls into a region of 6D which is no longer occupied should be elminated since it could not ever result in a match; it is inviable.

Reimplemented from protocols::match::downstream::DownstreamAlgorithm.

References protocols::match::Matcher::erase_hit(), protocols::match::downstream::DownstreamAlgorithm::geom_cst_id(), protocols::match::Matcher::hit_list_begin(), protocols::match::Matcher::hit_list_end(), protocols::match::Matcher::hits(), protocols::match::Matcher::occ_space_hash(), occspace_rev_id_at_last_update_, and protocols::match::downstream::TR().

void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::respond_to_primary_hitlist_change ( Matcher matcher,
core::Size  round_just_completed 
)
overridevirtual
void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::set_catalytic_atoms ( utility::vector1< core::Size catalytic_atoms)
inline

References catalytic_atoms_.

void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::set_downstream_restype ( core::chemical::ResidueTypeCOP  downstream_restype)

References downstream_restype_.

void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::set_ds_coords_needed ( utility::vector1< core::id::AtomID ds_coords)
inlineprivate
void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::set_focused_geomcst_id ( core::Size  focused_geomcst_id)

References focused_geomcst_id_.

void protocols::match::downstream::SecondaryMatcherToDownstreamResidue::set_target_rotamer_coords ( TargetRotamerCoordsOP  target_geomcst_coords)
private

Allow another SecondaryMatcherToDownstreamResidue to set my TargetRotamerCoords object so that we can share this data.

References target_downstream_coords_.

bool protocols::match::downstream::SecondaryMatcherToDownstreamResidue::upstream_only ( ) const
overridevirtual

returns false; this secondary matcher describes the location of the downstream partner even though it does not generate that location itself. Matches may be found by hashing the 6D coordinate of the downstream partner.

Implements protocols::match::downstream::DownstreamAlgorithm.

Member Data Documentation

utility::vector1< core::Size > protocols::match::downstream::SecondaryMatcherToDownstreamResidue::catalytic_atoms_
private
utility::vector1< core::id::AtomID > protocols::match::downstream::SecondaryMatcherToDownstreamResidue::downstream_atom_coordinates_needed_
private
core::chemical::ResidueTypeCOP protocols::match::downstream::SecondaryMatcherToDownstreamResidue::downstream_restype_
private
core::Size protocols::match::downstream::SecondaryMatcherToDownstreamResidue::focused_geomcst_id_
private
Matcher::HitListConstIterator protocols::match::downstream::SecondaryMatcherToDownstreamResidue::hits_for_focused_geomcst_and_build_point_begin_
private
Matcher::HitListConstIterator protocols::match::downstream::SecondaryMatcherToDownstreamResidue::hits_for_focused_geomcst_and_build_point_end_
private
Matcher::HitListConstIterator protocols::match::downstream::SecondaryMatcherToDownstreamResidue::hits_for_focused_geomcst_end_
private
core::Size protocols::match::downstream::SecondaryMatcherToDownstreamResidue::occspace_rev_id_at_last_update_
private
EvaluatorSet protocols::match::downstream::SecondaryMatcherToDownstreamResidue::respair_evaluators_
private

Referenced by add_evaluator(), and build().

TargetRotamerCoordsOP protocols::match::downstream::SecondaryMatcherToDownstreamResidue::target_downstream_coords_
mutableprivate
core::pose::PoseCOP protocols::match::downstream::SecondaryMatcherToDownstreamResidue::upstream_pose_
private

Referenced by build().


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