Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
protocols::sewing::hashing::BasisMapGenerator Class Reference

Given a model file, edge file ,and one or more input structures, generates alignment files for use with AppendAssemblyMover. More...

#include <BasisMapGenerator.hh>

Public Member Functions

 BasisMapGenerator ()
 
 BasisMapGenerator (BasisMapGenerator const &src)
 
 BasisMapGenerator (EdgeMapGeneratorOP edge_file_reader, SegmentVectorCOP segments)
 
 BasisMapGenerator (EdgeMapGeneratorOP edge_file_reader, std::string model_file_name, std::string alignment_file_name)
 
 BasisMapGenerator (EdgeMapGeneratorOP edge_file_reader, std::string model_file_name)
 
 BasisMapGenerator (std::string model_file_name, std::string edge_file_name, utility::vector1< core::Size > match_segments, utility::vector1< core::Size > pose_segment_starts, utility::vector1< core::Size > pose_segment_ends, core::Size recursive_depth)
 
virtual ~BasisMapGenerator ()
 
void initialize_from_options ()
 
void set_private_data (std::string model_file_name, std::string edge_file_name, utility::vector1< core::Size > match_segments, utility::vector1< core::Size >pose_segment_starts, utility::vector1< core::Size > pose_segment_ends, core::Size recursive_depth)
 
void write_alignments_to_file (std::string file_name) const
 
void edge_file_from_options ()
 
void model_file_from_options ()
 
void alignment_settings_from_options ()
 
void set_model_file (std::string model_file_name)
 
void set_edge_file (std::string edge_file)
 
void set_edge_file_reader (EdgeMapGeneratorOP edge_file_reader)
 
void set_alignment_settings (utility::vector1< core::Size > match_segments, utility::vector1< core::Size > pose_segment_starts, utility::vector1< core::Size > pose_segment_ends, core::Size recursive_depth)
 
core::Size version () const
 
HasherSettings hasher_settings () const
 
SegmentVectorCOP segment_vector () const
 
EdgeMapGeneratorOP edge_file_reader () const
 
AlignmentSettings alignment_settings () const
 
AlignmentGeneratorOP alignment_generator () const
 
BasisMapOP basis_map () const
 
std::map< core::Size,
data_storage::SmartSegmentOP > & 
pdb_segments ()
 
std::map< core::Size,
data_storage::SmartSegmentOP
const_pdb_segments () const
 
BasisMap::iterator get_alignments (data_storage::SmartSegmentOP query_segment)
 
void delete_segment_basis_pairs (core::Size)
 
void version (core::Size ver)
 
void segment_vector (SegmentVectorCOP segvec)
 
void hasher_settings (HasherSettings &hs)
 
void alignment_generator (AlignmentGeneratorOP ag)
 
void alignment_settings (AlignmentSettings &as)
 
void basis_map (BasisMapOP bm)
 
void pdb_segments (std::map< core::Size, data_storage::SmartSegmentOP >)
 
BasisMapGeneratorOP clone () const
 required in the context of the parser/scripting scheme More...
 
void recurse_over_segments (core::Size current_depth, std::set< data_storage::SmartSegmentCOP > segments_to_check)
 
void read_alignments_from_file (std::string file_name)
 
data_storage::BasisPair get_basis_pair_for_segment (core::Size segment_id)
 Given a segmentID, return a randomly chosen basis pair from the BasisMap for this segment. More...
 
std::pair< bool,
data_storage::BasisPair
get_basis_pair_for_local_segments (data_storage::SmartSegmentCOP seg1, data_storage::SmartSegmentCOP seg2, bool first_is_N)
 This function wraps several of the functions below to retrieve a basis pair for local (possibly chimaeric) input segments. More...
 
std::pair< std::pair
< core::Size, core::Size >
, std::pair< core::Size,
core::Size > > 
get_basis_res_bounds (data_storage::SmartSegmentCOP seg1, data_storage::SmartSegmentCOP seg2, bool first_is_N)
 Given two (possibly chimaeric) segments, return ranges of valid basis residues for each. More...
 
data_storage::BasisPair get_basis_pair_for_segment_pair (core::Size seg1, core::Size seg2, bool first_is_N)
 Given two (original, non-chimaeric) segments, return a possible basis pair for those two segments. More...
 
std::pair< bool, boolsegs_can_chimerize (data_storage::SmartSegmentCOP seg1, data_storage::SmartSegmentCOP seg2, bool first_is_N)
 Checks that a pair of segments (including chimaerae!) can chimerize. More...
 
bool basis_pair_is_valid (data_storage::BasisPair basis_pair, bool first_is_N)
 Checks that the given basis pair exists in the BasisMap after calling recurse_over_segments on seg1. More...
 

Private Attributes

HasherSettings hasher_settings_
 
core::Size version_
 
SegmentVectorCOP segment_vector_
 
EdgeMapGeneratorOP edge_file_reader_
 
AlignmentSettings alignment_settings_
 
BasisMapOP basis_map_
 
AlignmentGeneratorOP alignment_generator_
 
std::map< core::Size,
data_storage::SmartSegmentOP
pdb_segments_
 

Detailed Description

Given a model file, edge file ,and one or more input structures, generates alignment files for use with AppendAssemblyMover.

Constructor & Destructor Documentation

protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( )
protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( BasisMapGenerator const &  src)
protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( EdgeMapGeneratorOP  edge_file_reader,
SegmentVectorCOP  segments 
)
protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( EdgeMapGeneratorOP  edge_file_reader,
std::string  model_file_name,
std::string  alignment_file_name 
)
protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( EdgeMapGeneratorOP  edge_file_reader,
std::string  model_file_name 
)
protocols::sewing::hashing::BasisMapGenerator::BasisMapGenerator ( std::string  model_file_name,
std::string  edge_file_name,
utility::vector1< core::Size match_segments,
utility::vector1< core::Size pose_segment_starts,
utility::vector1< core::Size pose_segment_ends,
core::Size  recursive_depth 
)

References set_private_data().

protocols::sewing::hashing::BasisMapGenerator::~BasisMapGenerator ( )
virtual

Member Function Documentation

AlignmentGeneratorOP protocols::sewing::hashing::BasisMapGenerator::alignment_generator ( ) const

References alignment_generator_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::alignment_generator ( AlignmentGeneratorOP  ag)

References alignment_generator_.

AlignmentSettings protocols::sewing::hashing::BasisMapGenerator::alignment_settings ( ) const

References alignment_settings_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::alignment_settings ( AlignmentSettings as)

References alignment_settings_.

void protocols::sewing::hashing::BasisMapGenerator::alignment_settings_from_options ( )
utility::pointer::shared_ptr< BasisMap > protocols::sewing::hashing::BasisMapGenerator::basis_map ( ) const

References basis_map_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::basis_map ( BasisMapOP  bm)
bool protocols::sewing::hashing::BasisMapGenerator::basis_pair_is_valid ( data_storage::BasisPair  basis_pair,
bool  first_is_N 
)

Checks that the given basis pair exists in the BasisMap after calling recurse_over_segments on seg1.

Must be called for original segment IDs (no chimaerae or segment duplicates)

References basis_map_, pdb_segments_, recurse_over_segments(), and segment_vector_.

BasisMapGeneratorOP protocols::sewing::hashing::BasisMapGenerator::clone ( ) const

required in the context of the parser/scripting scheme

std::map< core::Size, data_storage::SmartSegmentOP > protocols::sewing::hashing::BasisMapGenerator::const_pdb_segments ( ) const

References pdb_segments_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::delete_segment_basis_pairs ( core::Size  segment_to_delete)

References basis_map_.

void protocols::sewing::hashing::BasisMapGenerator::edge_file_from_options ( )

References set_edge_file().

Referenced by initialize_from_options().

EdgeMapGeneratorOP protocols::sewing::hashing::BasisMapGenerator::edge_file_reader ( ) const
BasisMap::iterator protocols::sewing::hashing::BasisMapGenerator::get_alignments ( data_storage::SmartSegmentOP  query_segment)
std::pair< bool, data_storage::BasisPair > protocols::sewing::hashing::BasisMapGenerator::get_basis_pair_for_local_segments ( data_storage::SmartSegmentCOP  seg1,
data_storage::SmartSegmentCOP  seg2,
bool  first_is_N 
)

This function wraps several of the functions below to retrieve a basis pair for local (possibly chimaeric) input segments.

This function first calls segs_can_chimerize to determine whether the segments can ever chimerize It then retrieves the basis residue bounds for the two segmnets If seg1 (or seg2) is chimaeric, it gets the appropriate parent to use for finding a basis pair. It also handles all conversions between parent and chimaeric residue numbering It has 1000 chances to choose a valid basis pair for the chimaera that fits within the residue bounds If it hasn't found something by then, it just gives up

References get_basis_pair_for_segment_pair(), get_basis_res_bounds(), and segs_can_chimerize().

data_storage::BasisPair protocols::sewing::hashing::BasisMapGenerator::get_basis_pair_for_segment ( core::Size  segment_id)

Given a segmentID, return a randomly chosen basis pair from the BasisMap for this segment.

References basis_map_, get_basis_pair_for_segment_pair(), pdb_segments_, recurse_over_segments(), core::scoring::rg, and segment_vector_.

data_storage::BasisPair protocols::sewing::hashing::BasisMapGenerator::get_basis_pair_for_segment_pair ( core::Size  seg1,
core::Size  seg2,
bool  first_is_N 
)

Given two (original, non-chimaeric) segments, return a possible basis pair for those two segments.

Does not take chimaeric basis residue bounds into account; currently we handle those by first checking if the chimaeric segment can chimerize with the partner and then call this repeatedly until we get something that works

References basis_map_, pdb_segments_, recurse_over_segments(), core::scoring::rg, and segment_vector_.

Referenced by get_basis_pair_for_local_segments(), and get_basis_pair_for_segment().

std::pair< std::pair< core::Size, core::Size >, std::pair< core::Size, core::Size > > protocols::sewing::hashing::BasisMapGenerator::get_basis_res_bounds ( data_storage::SmartSegmentCOP  seg1,
data_storage::SmartSegmentCOP  seg2,
bool  first_is_N 
)

Given two (possibly chimaeric) segments, return ranges of valid basis residues for each.

Accounds for both chimaeric basis residues and vital residues. Returns pairs (resnum ranges) in the same order that the segments were provided.

References hasher_settings(), protocols::mean_field::max(), protocols::mean_field::min(), protocols::sewing::hashing::HasherSettings::min_hash_score, and protocols::TR().

Referenced by get_basis_pair_for_local_segments(), and segs_can_chimerize().

HasherSettings protocols::sewing::hashing::BasisMapGenerator::hasher_settings ( ) const
void protocols::sewing::hashing::BasisMapGenerator::hasher_settings ( HasherSettings hs)

References hasher_settings_.

void protocols::sewing::hashing::BasisMapGenerator::initialize_from_options ( )
void protocols::sewing::hashing::BasisMapGenerator::model_file_from_options ( )

References set_model_file().

Referenced by initialize_from_options().

std::map< core::Size, data_storage::SmartSegmentOP > & protocols::sewing::hashing::BasisMapGenerator::pdb_segments ( )

References pdb_segments_.

void protocols::sewing::hashing::BasisMapGenerator::pdb_segments ( std::map< core::Size, data_storage::SmartSegmentOP pdbsegs)

References pdb_segments_.

void protocols::sewing::hashing::BasisMapGenerator::read_alignments_from_file ( std::string  file_name)

References alignment_settings_, and version_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::recurse_over_segments ( core::Size  current_depth,
std::set< data_storage::SmartSegmentCOP segments_to_check 
)
SegmentVectorCOP protocols::sewing::hashing::BasisMapGenerator::segment_vector ( ) const

References segment_vector_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::segment_vector ( SegmentVectorCOP  segvec)

References segment_vector_, and version_.

std::pair< bool, bool > protocols::sewing::hashing::BasisMapGenerator::segs_can_chimerize ( data_storage::SmartSegmentCOP  seg1,
data_storage::SmartSegmentCOP  seg2,
bool  first_is_N 
)

Checks that a pair of segments (including chimaerae!) can chimerize.

First bool indicates whether seg1 can ever be chimerized with ANYTHING; second indicates if it can chimerize with seg2 specifically. Calls get_basis_res_bounds to handle chimaera( only checks on the correct terminal-side of the old basis res for chimaerae

References get_basis_res_bounds(), hasher_settings(), protocols::sewing::hashing::HasherSettings::min_hash_score, and protocols::TR().

Referenced by get_basis_pair_for_local_segments().

void protocols::sewing::hashing::BasisMapGenerator::set_alignment_settings ( utility::vector1< core::Size match_segments,
utility::vector1< core::Size pose_segment_starts,
utility::vector1< core::Size pose_segment_ends,
core::Size  recursive_depth 
)
void protocols::sewing::hashing::BasisMapGenerator::set_edge_file ( std::string  edge_file)
void protocols::sewing::hashing::BasisMapGenerator::set_edge_file_reader ( EdgeMapGeneratorOP  edge_file_reader)
void protocols::sewing::hashing::BasisMapGenerator::set_model_file ( std::string  model_file_name)
void protocols::sewing::hashing::BasisMapGenerator::set_private_data ( std::string  model_file_name,
std::string  edge_file_name,
utility::vector1< core::Size match_segments,
utility::vector1< core::Size pose_segment_starts,
utility::vector1< core::Size pose_segment_ends,
core::Size  recursive_depth 
)
core::Size protocols::sewing::hashing::BasisMapGenerator::version ( ) const

References version_.

Referenced by BasisMapGenerator().

void protocols::sewing::hashing::BasisMapGenerator::version ( core::Size  ver)

References version_.

void protocols::sewing::hashing::BasisMapGenerator::write_alignments_to_file ( std::string  file_name) const

Member Data Documentation

AlignmentGeneratorOP protocols::sewing::hashing::BasisMapGenerator::alignment_generator_
private
AlignmentSettings protocols::sewing::hashing::BasisMapGenerator::alignment_settings_
private
BasisMapOP protocols::sewing::hashing::BasisMapGenerator::basis_map_
private
EdgeMapGeneratorOP protocols::sewing::hashing::BasisMapGenerator::edge_file_reader_
private
HasherSettings protocols::sewing::hashing::BasisMapGenerator::hasher_settings_
private
std::map< core::Size, data_storage::SmartSegmentOP > protocols::sewing::hashing::BasisMapGenerator::pdb_segments_
private
SegmentVectorCOP protocols::sewing::hashing::BasisMapGenerator::segment_vector_
private
core::Size protocols::sewing::hashing::BasisMapGenerator::version_
private

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