![]() |
Rosetta Protocols
2014.35
|
Produce hits by hashing building the coordinates of the downstream partner The downstream partner is responsible for building itself from the coordinate frame of three of its atoms. The ExternalGeomSampler describes the ways to orient the downstream partner given the coordinates of the upstream partner. More...
#include <ClassicMatchAlgorithm.hh>
Public Types | |
typedef DownstreamAlgorithm | parent |
typedef core::Size | Size |
typedef core::Real | Real |
typedef numeric::HomogeneousTransform < Real > | HTReal |
![]() | |
typedef core::Size | Size |
typedef core::Vector | Vector |
Public Member Functions | |
ClassicMatchAlgorithm (Size geom_cst_id) | |
virtual | ~ClassicMatchAlgorithm () |
virtual DownstreamAlgorithmOP | clone () const |
void | set_build_round1_hits_twice () |
Enable a strategy where the first round hits are discarded after they are generated and then, after the second round completes, they are regenerated but respecting the occ-space hash, thereby decreasing the memory use dramatically. That is, the hits for the first geometric constraint (round 1 hits) are discarded, but their presence in the occupied space hash is recorded. Then the hits for the second round are collected, but only the ones that fall into the regions of 6D where the hits from the first round fell. At the end of round 2, the occ-space hash is updated to reflect the regions of 6D where both rounds produced hits. Then the round 1 hits are generated a second time, and this time saved. More... | |
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... | |
std::list< Hit > | build_and_discard_first_round_hits_at_all_positions (Matcher &matcher) |
virtual void | respond_to_primary_hitlist_change (Matcher &matcher, Size round_just_completed) |
Reset the occupied space grid for the matcher so that only those regions which contain hits from this geometric constraint are marked as occupied. More... | |
virtual void | respond_to_peripheral_hitlist_change (Matcher &matcher) |
Delete hits for this geometric constraint if they fall into now-empty regions of 6D. This step can be avoided if the occupied-space-grid's revision ID has not changed since the last time this function was invoked. More... | |
virtual std::list< Hit > | build (Size const scaffold_build_point_id, Size const upstream_conf_id, core::conformation::Residue const &upstream_residue) const |
Iterate across the external geom samplers that describe the rigid body orientations of the downstream partner from the coordinates of the upstream partner. More... | |
virtual bool | upstream_only () const |
This method returns 'false' since the classic match algorithm builds coordinates of the downstream partner and its hits should be hashed in 6D to generate matches. More... | |
virtual bool | generates_primary_hits () const |
This method returns 'true' since the classic matcher builds the downstream coordinates from scratch. More... | |
virtual HitPtrListCOP | hits_to_include_with_partial_match (match_dspos1 const &m) const |
This method should not be invoked on the ClassicMatchAlgorithm, since it returns "false" in its upstream_only method. More... | |
virtual Size | n_possible_hits_per_upstream_conformation () const |
std::list< Hit > | build_from_three_coords (Size const which_external_sampler, Size const scaffold_build_point_id, Size const upstream_conf_id, core::conformation::Residue const &upstream_residue) const |
This function completes the building of the downstream conformation once the coordinates of the upstream conformation are known (and deemed non-colliding or, generally, pass any filter the upstream builder would use). More... | |
void | set_residue_type (core::chemical::ResidueTypeCOP restype) |
void | add_external_geom_sampler (toolbox::match_enzdes_util::ExternalGeomSampler const &sampler, Size const exgeom_id, std::string const &atom1, std::string const &atom2, std::string const &atom3, DownstreamBuilderCOP downstream_builder) |
void | clear_external_geom_samplers () |
core::chemical::ResidueType const & | restype () const |
Accessors. More... | |
toolbox::match_enzdes_util::ExternalGeomSampler const & | external_sampler (Size external_geom_id) const |
Size | launch_atom (Size external_geom_id, Size which_point) const |
Size | n_external_samplers () const |
![]() | |
DownstreamAlgorithm (Size geom_cst_id) | |
DownstreamAlgorithm (DownstreamAlgorithm const &) | |
DownstreamAlgorithm const & | operator= (DownstreamAlgorithm const &) |
virtual | ~DownstreamAlgorithm () |
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) |
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 Attributes | |
core::chemical::ResidueTypeCOP | restype_ |
utility::vector1 < toolbox::match_enzdes_util::ExternalGeomSampler > | external_samplers_ |
utility::vector1 < utility::fixedsizearray1 < Size, 3 > > | launch_points_ |
utility::vector1 < DownstreamBuilderCOP > | dsbuilders_ |
utility::vector1< Size > | exgeom_ids_ |
Size | occspace_rev_id_at_last_update_ |
bool | build_round1_hits_twice_ |
control whether this algorithm expects to rebuild round 1 hits after round 2 completes. Only used if the geom_cst_id() for this instance is 1. More... | |
bool | completed_first_round1_hit_building_ |
Additional Inherited Members | |
![]() | |
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... | |
Produce hits by hashing building the coordinates of the downstream partner The downstream partner is responsible for building itself from the coordinate frame of three of its atoms. The ExternalGeomSampler describes the ways to orient the downstream partner given the coordinates of the upstream partner.
typedef numeric::HomogeneousTransform< Real > protocols::match::downstream::ClassicMatchAlgorithm::HTReal |
protocols::match::downstream::ClassicMatchAlgorithm::ClassicMatchAlgorithm | ( | Size | geom_cst_id | ) |
Referenced by clone().
|
virtual |
void protocols::match::downstream::ClassicMatchAlgorithm::add_external_geom_sampler | ( | toolbox::match_enzdes_util::ExternalGeomSampler const & | sampler, |
Size const | exgeom_id, | ||
std::string const & | atom1, | ||
std::string const & | atom2, | ||
std::string const & | atom3, | ||
DownstreamBuilderCOP | dsbuilder | ||
) |
Precompute transforms for the external geom sampler as it is added so that the transforms are ready when build() is called.
References dsbuilders_, exgeom_ids_, external_samplers_, has, launch_points_, restype(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::set_dis_D1D2(), and utility_exit_with_message.
Referenced by protocols::match::Matcher::add_external_geometry_samples_for_constraint().
|
virtual |
Iterate across the external geom samplers that describe the rigid body orientations of the downstream partner from the coordinates of the upstream partner.
Implements protocols::match::downstream::DownstreamAlgorithm.
References build_from_three_coords(), external_samplers_, utility::pointer::owning_ptr< T >::get(), n_external_samplers(), core::conformation::Residue::name(), restype_, core::conformation::Residue::type(), and utility_exit_with_message.
std::list< Hit > protocols::match::downstream::ClassicMatchAlgorithm::build_from_three_coords | ( | Size const | which_external_sampler, |
Size const | scaffold_build_point_id, | ||
Size const | upstream_conf_id, | ||
core::conformation::Residue const & | upstream_residue | ||
) | const |
This function completes the building of the downstream conformation once the coordinates of the upstream conformation are known (and deemed non-colliding or, generally, pass any filter the upstream builder would use).
References protocols::match::downstream::DownstreamAlgorithm::active_site_grid(), protocols::match::downstream::DownstreamAlgorithm::active_site_grid_set(), protocols::match::downstream::DownstreamAlgorithm::bbgrid(), dsbuilders_, exgeom_ids_, external_samplers_, protocols::toolbox::match_enzdes_util::HT_ang_U1D2, protocols::toolbox::match_enzdes_util::HT_ang_U2D1, protocols::toolbox::match_enzdes_util::HT_tor_U1D3, protocols::toolbox::match_enzdes_util::HT_tor_U2D2, protocols::toolbox::match_enzdes_util::HT_tor_U3D1, launch_atom(), nn, numeric::HomogeneousTransform< T >::point(), numeric::HomogeneousTransform< T >::walk_along_z(), core::conformation::Residue::xyz(), and protocols::match::ZERO.
Referenced by build().
|
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 from protocols::match::downstream::DownstreamAlgorithm.
References build_and_discard_first_round_hits_at_all_positions(), build_round1_hits_twice_, completed_first_round1_hit_building_, protocols::match::downstream::DownstreamAlgorithm::default_build_hits_at_all_positions(), protocols::match::Matcher::downstream_builders(), protocols::match::downstream::DownstreamAlgorithm::geom_cst_id(), and protocols::match::Matcher::occ_space_hash().
void protocols::match::downstream::ClassicMatchAlgorithm::clear_external_geom_samplers | ( | ) |
References dsbuilders_, external_samplers_, and launch_points_.
|
virtual |
Implements protocols::match::downstream::DownstreamAlgorithm.
References ClassicMatchAlgorithm().
|
inline |
References external_samplers_.
|
virtual |
This method returns 'true' since the classic matcher builds the downstream coordinates from scratch.
Implements protocols::match::downstream::DownstreamAlgorithm.
|
virtual |
This method should not be invoked on the ClassicMatchAlgorithm, since it returns "false" in its upstream_only method.
If this function is causing an exit, then there is a bug within the Matcher's match-enumeration logic. There is no meaningful way forward after this function is invoked. It should not be invoked.
Implements protocols::match::downstream::DownstreamAlgorithm.
References empty, and utility_exit_with_message.
|
inline |
References launch_points_.
Referenced by build_from_three_coords().
|
inline |
References external_samplers_.
Referenced by build(), and n_possible_hits_per_upstream_conformation().
|
virtual |
Implements protocols::match::downstream::DownstreamAlgorithm.
References dsbuilders_, external_samplers_, protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_ang_U1D2_samples(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_ang_U2D1_samples(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_dis_U1D1_samples(), n_external_samplers(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_tor_U1D3_samples(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_tor_U2D2_samples(), protocols::toolbox::match_enzdes_util::ExternalGeomSampler::n_tor_U3D1_samples(), and protocols::analysis::total.
|
virtual |
Delete hits for this geometric constraint if they fall into now-empty regions of 6D. This step can be avoided if the occupied-space-grid's revision ID has not changed since the last time this function was invoked.
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.
|
virtual |
Reset the occupied space grid for the matcher so that only those regions which contain hits from this geometric constraint are marked as occupied.
Reset the occupied space hash that the matcher uses so that it reflects the hits generated this round; this will cause the invalidation of hits generated in previous rounds. These invalidated hits will be deleted in calls to respond_to_peripheral_hitlist_change.
Reimplemented from protocols::match::downstream::DownstreamAlgorithm.
References build_round1_hits_twice_, protocols::match::downstream::DownstreamAlgorithm::geom_cst_id(), protocols::match::Matcher::hits(), protocols::match::Matcher::occ_space_hash(), occspace_rev_id_at_last_update_, and protocols::match::downstream::TR.
|
inline |
void protocols::match::downstream::ClassicMatchAlgorithm::set_build_round1_hits_twice | ( | ) |
Enable a strategy where the first round hits are discarded after they are generated and then, after the second round completes, they are regenerated but respecting the occ-space hash, thereby decreasing the memory use dramatically. That is, the hits for the first geometric constraint (round 1 hits) are discarded, but their presence in the occupied space hash is recorded. Then the hits for the second round are collected, but only the ones that fall into the regions of 6D where the hits from the first round fell. At the end of round 2, the occ-space hash is updated to reflect the regions of 6D where both rounds produced hits. Then the round 1 hits are generated a second time, and this time saved.
References build_round1_hits_twice_, and protocols::match::downstream::DownstreamAlgorithm::geom_cst_id().
void protocols::match::downstream::ClassicMatchAlgorithm::set_residue_type | ( | core::chemical::ResidueTypeCOP | restype | ) |
References external_samplers_, launch_points_, restype(), and restype_.
|
virtual |
This method returns 'false' since the classic match algorithm builds coordinates of the downstream partner and its hits should be hashed in 6D to generate matches.
Implements protocols::match::downstream::DownstreamAlgorithm.
|
private |
control whether this algorithm expects to rebuild round 1 hits after round 2 completes. Only used if the geom_cst_id() for this instance is 1.
Referenced by build_hits_at_all_positions(), respond_to_primary_hitlist_change(), and set_build_round1_hits_twice().
|
private |
Referenced by build_hits_at_all_positions().
|
private |
|
private |
Referenced by add_external_geom_sampler(), and build_from_three_coords().
|
private |
|
private |
Referenced by add_external_geom_sampler(), clear_external_geom_samplers(), launch_atom(), and set_residue_type().
|
private |
Referenced by respond_to_peripheral_hitlist_change(), and respond_to_primary_hitlist_change().
|
private |
Referenced by build(), restype(), and set_residue_type().