Rosetta 3.5
|
A class for an algorithm. Given a conformation of the upstream partner, the algorithm is responsible for producing a set of hits. More...
#include <DownstreamAlgorithm.hh>
Public Types | |
typedef core::Size | Size |
typedef core::Vector | Vector |
Public Member Functions | |
DownstreamAlgorithm (Size geom_cst_id) | |
DownstreamAlgorithm (DownstreamAlgorithm const &) | |
DownstreamAlgorithm const & | operator= (DownstreamAlgorithm const &) |
virtual | ~DownstreamAlgorithm () |
virtual DownstreamAlgorithmOP | clone () const =0 |
virtual std::list< Hit > | build_hits_at_all_positions (Matcher &matcher) |
Main driver function for hit generation. The algorithm is responsible for generating hits at all scaffold build points that are valid for this geometric constraint. The base class provides an iterate-across-all-positions-and-splice-together-hit-lists implementation, however, derived classes may overload this function. The base class function is parallelizable with OpenMP. The returned hit list must be in sorted order by 1) hit.scaffold_build_id() and then by 2) hit.upstream_conf_id(). More... | |
virtual void | respond_to_primary_hitlist_change (Matcher &matcher, Size round_just_completed) |
Reset appropriate Matcher data to spawn the deletion of hits from other rounds following either hit generation by this geometric constraint, or following hit generation by another geometric constraint which caused the deletion of hits from this geometric constraint. The classic match algorithm, for example, resets the occupied-space hash so that other classic-match algorithms can delete their non-viable hits in subsequent calls to respond_to_peripheral_hitlist_change. More... | |
virtual void | respond_to_peripheral_hitlist_change (Matcher &matcher) |
Following the change in the number of hits of some other round – either from the conclusion of that round in which a new set of hits has been generated, or from the cascading change to the hits from round A which were deleted after the conclusion of round B. More... | |
virtual std::list< Hit > | build (Size const scaffold_build_point_id, Size const upstream_conf_id, core::conformation::Residue const &upstream_residue) const =0 |
Return a set of hits given a conformation of an upstream residue. This method must be bit-wise constant and parallelizable in derived classes. More... | |
virtual bool | upstream_only () const =0 |
This method returns 'false' if the hits generated by this DownstreamAlgorithm store the 6-dimensional coordinate of the downstream partner in hit.second(), and therefore intend for the Matcher to find matches for this algorithm's hits by hashing the 6-dimensional coordinate. This method returns 'true' if the DownstreamAlgorithm does not use hit.second to store a point in 6D and instead intends the Matcher to find matches by querying this DownstreamAlgorithm's hits_to_include_with_partial_match method. More... | |
virtual bool | generates_primary_hits () const =0 |
This method returns 'true' if the Real6 portion of the returned hits are "original" descriptions of the downstream coordinates, and not merely duplicates of the downstream coordinates from previous rounds. This method returns 'false' if the downstream portion of the returned hits are duplications of previous-round geometries or if the hits returned by this class do not describe the geometry of the downstream coordinates. More... | |
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... | |
virtual HitPtrListCOP | hits_to_include_with_partial_match (match_dspos1 const &m) const =0 |
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... | |
void | set_bb_grid (BumpGridCOP bbgrid) |
void | set_active_site_grid (ActiveSiteGridCOP active_site_grid) |
virtual Size | n_possible_hits_per_upstream_conformation () const =0 |
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 |
Protected Member Functions | |
BumpGrid const & | bbgrid () const |
bool | active_site_grid_set () const |
ActiveSiteGrid const & | active_site_grid () const |
std::list< Hit > | default_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... | |
Private Attributes | |
Size | geom_cst_id_ |
BumpGridCOP | bbgrid_ |
ActiveSiteGridCOP | active_site_grid_ |
DownstreamBuilderOP | dsbuilder_ |
A class for an algorithm. Given a conformation of the upstream partner, the algorithm is responsible for producing a set of hits.
protocols::match::downstream::DownstreamAlgorithm::DownstreamAlgorithm | ( | Size | geom_cst_id) |
protocols::match::downstream::DownstreamAlgorithm::DownstreamAlgorithm | ( | DownstreamAlgorithm const & | other) |
|
virtual |
|
inlineprotected |
References active_site_grid_.
Referenced by protocols::match::downstream::ClassicMatchAlgorithm::build_from_three_coords(), and set_active_site_grid().
|
inlineprotected |
References active_site_grid_.
Referenced by protocols::match::downstream::ClassicMatchAlgorithm::build_from_three_coords().
bool protocols::match::downstream::DownstreamAlgorithm::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 |
References core::conformation::Residue::atom_type_index(), bbgrid(), core::kinematics::tree::distance_squared(), core::conformation::Residue::first_sidechain_atom(), core::conformation::Residue::nheavyatoms(), protocols::match::probe_radius_for_atom_type(), protocols::match::BumpGrid::required_separation_distance(), and core::conformation::Residue::xyz().
Referenced by protocols::match::downstream::SecondaryMatcherToDownstreamResidue::build().
|
inlineprotected |
References bbgrid_.
Referenced by are_colliding(), protocols::match::downstream::ClassicMatchAlgorithm::build_from_three_coords(), and set_bb_grid().
|
pure virtual |
Return a set of hits given a conformation of an upstream residue. This method must be bit-wise constant and parallelizable in derived classes.
Implemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, protocols::match::output::WriteUpstreamCoordinateKinemage, and protocols::match::downstream::ClassicMatchAlgorithm.
|
virtual |
Main driver function for hit generation. The algorithm is responsible for generating hits at all scaffold build points that are valid for this geometric constraint. The base class provides an iterate-across-all-positions-and-splice-together-hit-lists implementation, however, derived classes may overload this function. The base class function is parallelizable with OpenMP. The returned hit list must be in sorted order by 1) hit.scaffold_build_id() and then by 2) hit.upstream_conf_id().
By initializing local std::list< Hit > variables inside the loop over all of the build points, and then splicing them into a central vector of hit lists, I can avoid expensive list-copy operations while guaranteeing OpenMP thread saftey.
Reimplemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, and protocols::match::downstream::ClassicMatchAlgorithm.
References default_build_hits_at_all_positions().
|
pure virtual |
|
protected |
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.
References core::sequence::end, geom_cst_id_, protocols::match::Matcher::per_constraint_build_points(), and protocols::match::Matcher::upstream_builder().
Referenced by protocols::match::downstream::ClassicMatchAlgorithm::build_hits_at_all_positions(), and build_hits_at_all_positions().
|
pure virtual |
This method returns 'true' if the Real6 portion of the returned hits are "original" descriptions of the downstream coordinates, and not merely duplicates of the downstream coordinates from previous rounds. This method returns 'false' if the downstream portion of the returned hits are duplications of previous-round geometries or if the hits returned by this class do not describe the geometry of the downstream coordinates.
Implemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, protocols::match::output::WriteUpstreamCoordinateKinemage, and protocols::match::downstream::ClassicMatchAlgorithm.
DownstreamAlgorithm::Size protocols::match::downstream::DownstreamAlgorithm::geom_cst_id | ( | ) | const |
References geom_cst_id_.
Referenced by protocols::match::downstream::ClassicMatchAlgorithm::build_hits_at_all_positions(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::build_hits_at_all_positions(), protocols::match::downstream::SecondaryMatcherToUpstreamResidue::build_hits_at_all_positions(), protocols::match::Matcher::erase_hit(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation(), protocols::match::downstream::SecondaryMatcherToUpstreamResidue::prepare_for_hit_generation(), protocols::match::downstream::SecondaryMatcherToUpstreamResidue::prepare_for_hit_generation_at_target_build_point(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation_for_geomcst(), protocols::match::downstream::SecondaryMatcherToUpstreamResidue::prepare_for_match_enumeration(), protocols::match::downstream::ClassicMatchAlgorithm::respond_to_peripheral_hitlist_change(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::respond_to_peripheral_hitlist_change(), protocols::match::downstream::SecondaryMatcherToUpstreamResidue::respond_to_peripheral_hitlist_change(), protocols::match::downstream::ClassicMatchAlgorithm::respond_to_primary_hitlist_change(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::respond_to_primary_hitlist_change(), and protocols::match::downstream::SecondaryMatcherToUpstreamResidue::respond_to_primary_hitlist_change().
DownstreamBuilderOP protocols::match::downstream::DownstreamAlgorithm::get_dsbuilder | ( | ) | const |
References dsbuilder_.
Referenced by protocols::match::downstream::SecondaryMatcherToDownstreamResidue::build(), protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation_at_target_build_point(), and protocols::match::downstream::SecondaryMatcherToDownstreamResidue::prepare_for_hit_generation_for_geomcst().
|
pure virtual |
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.
Implemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, protocols::match::output::WriteUpstreamCoordinateKinemage, and protocols::match::downstream::ClassicMatchAlgorithm.
|
pure virtual |
DownstreamAlgorithm const & protocols::match::downstream::DownstreamAlgorithm::operator= | ( | DownstreamAlgorithm const & | rhs) |
References active_site_grid_, bbgrid_, and geom_cst_id_.
|
virtual |
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.
no-op
Reimplemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue.
|
virtual |
Following the change in the number of hits of some other round – either from the conclusion of that round in which a new set of hits has been generated, or from the cascading change to the hits from round A which were deleted after the conclusion of round B.
Noop in base class.
Reimplemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, and protocols::match::downstream::ClassicMatchAlgorithm.
|
virtual |
Reset appropriate Matcher data to spawn the deletion of hits from other rounds following either hit generation by this geometric constraint, or following hit generation by another geometric constraint which caused the deletion of hits from this geometric constraint. The classic match algorithm, for example, resets the occupied-space hash so that other classic-match algorithms can delete their non-viable hits in subsequent calls to respond_to_peripheral_hitlist_change.
Noop in base class.
Reimplemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, and protocols::match::downstream::ClassicMatchAlgorithm.
void protocols::match::downstream::DownstreamAlgorithm::set_active_site_grid | ( | ActiveSiteGridCOP | active_site_grid) |
References active_site_grid(), and active_site_grid_.
void protocols::match::downstream::DownstreamAlgorithm::set_bb_grid | ( | BumpGridCOP | bbgrid) |
void protocols::match::downstream::DownstreamAlgorithm::set_dsbuilder | ( | DownstreamBuilderOP | dsbuilder) |
|
pure virtual |
This method returns 'false' if the hits generated by this DownstreamAlgorithm store the 6-dimensional coordinate of the downstream partner in hit.second(), and therefore intend for the Matcher to find matches for this algorithm's hits by hashing the 6-dimensional coordinate. This method returns 'true' if the DownstreamAlgorithm does not use hit.second to store a point in 6D and instead intends the Matcher to find matches by querying this DownstreamAlgorithm's hits_to_include_with_partial_match method.
Implemented in protocols::match::downstream::SecondaryMatcherToUpstreamResidue, protocols::match::downstream::SecondaryMatcherToDownstreamResidue, protocols::match::output::WriteUpstreamCoordinateKinemage, and protocols::match::downstream::ClassicMatchAlgorithm.
|
private |
Referenced by active_site_grid(), active_site_grid_set(), operator=(), and set_active_site_grid().
|
private |
Referenced by bbgrid(), operator=(), and set_bb_grid().
|
private |
Referenced by get_dsbuilder(), and set_dsbuilder().
|
private |
Referenced by default_build_hits_at_all_positions(), geom_cst_id(), and operator=().