Rosetta  2020.37
 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::upstream::ProteinUpstreamBuilder Class Reference

#include <ProteinUpstreamBuilder.hh>

Inheritance diagram for protocols::match::upstream::ProteinUpstreamBuilder:
Inheritance graph
[legend]

Public Types

typedef core::Vector Vector
 
typedef core::Real Real
 
typedef
numeric::HomogeneousTransform
< Real
HTReal
 
typedef
core::pack::dunbrack::DunbrackRotamerSampleData 
DunbrackRotamerSampleData
 
typedef utility::vector1
< DunbrackRotamerSampleData
DunbrackRotamerSampleDataVector
 
- Public Types inherited from protocols::match::upstream::UpstreamBuilder
typedef core::Size Size
 
typedef core::Vector Vector
 

Public Member Functions

 ProteinUpstreamBuilder ()
 
 ~ProteinUpstreamBuilder () override
 
UpstreamBuilderOP clone () const override
 
std::list< Hitbuild (ScaffoldBuildPoint const &build_point) const override
 Iterate across possible conformations for the upstream half of the hit, and for each (non-coliding) conformation, sample all external geometries specified by the external_sampler to construct the three coordinates of the downstream sampler. Return a list of hits. More...
 
void recover_hit (Hit const &hit, ScaffoldBuildPoint const &build_point, UpstreamResidueProcessor &processor) const override
 Regenerate the rotamer for a particular hit and give that rotamer to the UpstreamResidueProcessor. More...
 
void recover_hits (std::list< Hit >::const_iterator hits_begin, std::list< Hit >::const_iterator hits_end, ScaffoldBuildPoint const &build_point, UpstreamResidueProcessor &processor) const override
 Regenerate a set of rotamers for a subset of hits bound by the two input hit-list iterators. More...
 
core::Size n_restypes_to_build () const override
 
core::chemical::ResidueTypeCOP restype (core::Size which_restype) const override
 
bool compatible (Hit const &my_hit, ScaffoldBuildPoint const &build_point_mine, UpstreamBuilder const &other, Hit const &other_hit, ScaffoldBuildPoint const &build_point_other, bool first_dispatch=true) const override
 The side chain for two. More...
 
bool compatible (Hit const &my_hit, ScaffoldBuildPoint const &build_point_mine, ProteinUpstreamBuilder const &other, Hit const &other_hit, ScaffoldBuildPoint const &build_point_other, bool first_dispatch=true) const override
 
void add_build_set (BuildSet const &build_set)
 
core::Size n_build_sets () const
 
BuildSet const & build_set (core::chemical::ResidueTypeCOP restype) const
 
BuildSetbuild_set (core::chemical::ResidueTypeCOP restype)
 
void set_sampler (ProteinSCSamplerCOP sampler)
 
void set_use_input_sidechain (bool setting)
 
void set_native_flag (bool native)
 
- Public Member Functions inherited from protocols::match::upstream::UpstreamBuilder
 ~UpstreamBuilder () override
 
void set_bb_grid (BumpGridCOP bbgrid)
 

Private Member Functions

HTReal initialize_rescoords (core::Size build_set_id, core::conformation::Residue &rescoords, ScaffoldBuildPoint const &build_point) const
 Copy the coordinates from the build_point object into the the rescoords object, compute the coordinate frame at CBeta, copy the CB coordinate into the rescoords object, and return the CBeta frame. More...
 
HTReal compute_cb_frame (core::Size build_set_id, ProteinBackboneBuildPoint const &build_point) const
 Construct the coordinate frame at CBeta to match the residue type's geometry. The input coordinates for the build point need not be ideal. The returned coordinate frame is located at CBeta with the z axis pointing along the calpha->cbeta bond vector, the y axis is in the N-CA-CB plane, and the x axis being the crossproduct of y and z. More...
 
bool atom_coordinate_unacceptable (core::Size build_set_id, core::conformation::Residue const &rescoords, core::Size atomno) const
 Returns true if a particular atom coordinate for a rotamer rules out that rotamer as yeilding a potential hit. Reasons to exclude a rotamer based on atom placement: collision of that atom with the background, too long of a distance that atom is from any other hit. More...
 

Private Attributes

ProteinSCSamplerCOP sampler_
 
utility::vector1< BuildSetbuild_sets_
 
bool use_input_sc_
 
bool avoid_building_any_rotamers_dueto_native_
 

Additional Inherited Members

- Protected Member Functions inherited from protocols::match::upstream::UpstreamBuilder
BumpGrid const & bbgrid () const
 

Member Typedef Documentation

typedef numeric::HomogeneousTransform< Real > protocols::match::upstream::ProteinUpstreamBuilder::HTReal

Constructor & Destructor Documentation

protocols::match::upstream::ProteinUpstreamBuilder::ProteinUpstreamBuilder ( )
protocols::match::upstream::ProteinUpstreamBuilder::~ProteinUpstreamBuilder ( )
overridedefault

Member Function Documentation

void protocols::match::upstream::ProteinUpstreamBuilder::add_build_set ( BuildSet const &  build_set)
bool protocols::match::upstream::ProteinUpstreamBuilder::atom_coordinate_unacceptable ( core::Size  build_set_id,
core::conformation::Residue const &  rescoords,
core::Size  atomno 
) const
private

Returns true if a particular atom coordinate for a rotamer rules out that rotamer as yeilding a potential hit. Reasons to exclude a rotamer based on atom placement: collision of that atom with the background, too long of a distance that atom is from any other hit.

Collision detection against the background goes here. "Background" is tricky for atoms near the backbone

References protocols::match::upstream::UpstreamBuilder::bbgrid(), build_sets_, protocols::match::BumpGrid::occupied(), protocols::match::BumpGrid::required_separation_distance(), and core::conformation::Residue::xyz().

Referenced by build().

std::list< Hit > protocols::match::upstream::ProteinUpstreamBuilder::build ( ScaffoldBuildPoint const &  build_point) const
overridevirtual

Iterate across possible conformations for the upstream half of the hit, and for each (non-coliding) conformation, sample all external geometries specified by the external_sampler to construct the three coordinates of the downstream sampler. Return a list of hits.

This is the main workhorse function for the upstream builder. There are lots of ways to customize the way the loops in this function work, but custom code should be written in subroutines called by this function and should not change the function itself. It is crucial here that the rotamers are created in the same way they were counted in insert(). Make sure that if you change build()'s behavior, that insert()'s behavior changes, too!

DO NOT LET THIS FUNCTION EXCEED 150 LINES. CLEAR CODE IS SHORT.

Implements protocols::match::upstream::UpstreamBuilder.

References atom_coordinate_unacceptable(), avoid_building_any_rotamers_dueto_native_, build_sets_, core::conformation::Residue::chi(), protocols::match::upstream::FullChiSampleSet::chi_sample(), protocols::match::upstream::UpstreamResTypeGeometry::chitip_atom(), protocols::match::upstream::FullChiSampleSet::frame(), protocols::match::upstream::UpstreamResTypeGeometry::ht_for_chitip_atom(), protocols::match::upstream::ScaffoldBuildPoint::index(), initialize_rescoords(), core::conformation::Residue::mainchain_torsions(), protocols::match::upstream::UpstreamResTypeGeometry::n_nonchitip_atoms_for_chi(), protocols::match::upstream::FullChiSampleSet::n_samples_per_chi(), protocols::match::upstream::UpstreamResTypeGeometry::nonchitip_atom(), protocols::match::upstream::FullChiSampleSet::num_chi_samples_total(), protocols::match::upstream::UpstreamResTypeGeometry::points_for_nonchitip_atoms(), protocols::match::upstream::UpstreamResTypeGeometry::pre_chitip_transform(), restype(), sampler_, core::conformation::Residue::set_xyz(), protocols::match::upstream::TR(), core::conformation::Residue::type(), and use_input_sc_.

BuildSet const & protocols::match::upstream::ProteinUpstreamBuilder::build_set ( core::chemical::ResidueTypeCOP  restype) const

Referenced by add_build_set().

BuildSet & protocols::match::upstream::ProteinUpstreamBuilder::build_set ( core::chemical::ResidueTypeCOP  restype)
UpstreamBuilderOP protocols::match::upstream::ProteinUpstreamBuilder::clone ( ) const
overridevirtual
bool protocols::match::upstream::ProteinUpstreamBuilder::compatible ( Hit const &  my_hit,
ScaffoldBuildPoint const &  build_point_mine,
UpstreamBuilder const &  other,
Hit const &  other_hit,
ScaffoldBuildPoint const &  build_point_other,
bool  first_dispatch = true 
) const
overridevirtual
bool protocols::match::upstream::ProteinUpstreamBuilder::compatible ( Hit const &  my_hit,
ScaffoldBuildPoint const &  build_point_mine,
ProteinUpstreamBuilder const &  other,
Hit const &  other_hit,
ScaffoldBuildPoint const &  build_point_other,
bool  first_dispatch = true 
) const
overridevirtual
ProteinUpstreamBuilder::HTReal protocols::match::upstream::ProteinUpstreamBuilder::compute_cb_frame ( core::Size  build_set_id,
ProteinBackboneBuildPoint const &  build_point 
) const
private

Construct the coordinate frame at CBeta to match the residue type's geometry. The input coordinates for the build point need not be ideal. The returned coordinate frame is located at CBeta with the z axis pointing along the calpha->cbeta bond vector, the y axis is in the N-CA-CB plane, and the x axis being the crossproduct of y and z.

Follow Phil's convention for placing CBeta based on halfway point of the ideal N and C positions and the halfway point from the the input N and C positions. In fact, this is barely different from Phil's code except that it uses HT's instead of Stubs. By "Phil's code", I mean core/conformation/Residue.cc::orient_onto_position()

References build_sets_, protocols::match::upstream::ProteinBackboneBuildPoint::C_pos(), protocols::match::upstream::ProteinBackboneBuildPoint::CA_pos(), protocols::match::upstream::UpstreamResTypeGeometry::CB_atom_id(), protocols::match::upstream::UpstreamResTypeGeometry::coordinate_for_nonchi_atom_in_ideal_frame(), and protocols::match::upstream::ProteinBackboneBuildPoint::N_pos().

Referenced by initialize_rescoords().

ProteinUpstreamBuilder::HTReal protocols::match::upstream::ProteinUpstreamBuilder::initialize_rescoords ( core::Size  build_set_id,
core::conformation::Residue rescoords,
ScaffoldBuildPoint const &  build_point 
) const
private
core::Size protocols::match::upstream::ProteinUpstreamBuilder::n_build_sets ( ) const
inline

References build_sets_.

ProteinUpstreamBuilder::Size protocols::match::upstream::ProteinUpstreamBuilder::n_restypes_to_build ( ) const
overridevirtual
void protocols::match::upstream::ProteinUpstreamBuilder::recover_hit ( Hit const &  hit,
ScaffoldBuildPoint const &  build_point,
UpstreamResidueProcessor processor 
) const
overridevirtual

Regenerate the rotamer for a particular hit and give that rotamer to the UpstreamResidueProcessor.

Replace residue for the amino acid corresponding to the rotamer indicated in the hit at the Pose position seqpos_to_insert_at.

It is crucial here that the rotamers are counted in the same way they were iterated across in build. Make sure that if build() changes its behavior, that this function also changes its behavior!

Implements protocols::match::upstream::UpstreamBuilder.

References recover_hits().

void protocols::match::upstream::ProteinUpstreamBuilder::recover_hits ( std::list< Hit >::const_iterator  hits_begin,
std::list< Hit >::const_iterator  hits_end,
ScaffoldBuildPoint const &  build_point,
UpstreamResidueProcessor processor 
) const
overridevirtual
core::chemical::ResidueTypeCOP protocols::match::upstream::ProteinUpstreamBuilder::restype ( core::Size  which_restype) const
overridevirtual
void protocols::match::upstream::ProteinUpstreamBuilder::set_native_flag ( bool  native)
void protocols::match::upstream::ProteinUpstreamBuilder::set_sampler ( ProteinSCSamplerCOP  sampler)

References sampler_.

void protocols::match::upstream::ProteinUpstreamBuilder::set_use_input_sidechain ( bool  setting)

References use_input_sc_.

Member Data Documentation

bool protocols::match::upstream::ProteinUpstreamBuilder::avoid_building_any_rotamers_dueto_native_
private
utility::vector1< BuildSet > protocols::match::upstream::ProteinUpstreamBuilder::build_sets_
private
ProteinSCSamplerCOP protocols::match::upstream::ProteinUpstreamBuilder::sampler_
private

Referenced by build(), recover_hits(), and set_sampler().

bool protocols::match::upstream::ProteinUpstreamBuilder::use_input_sc_
private

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