![]() |
Rosetta
2016.46
|
#include <FoldGraph.hh>
Public Types | |
typedef std::stack< core::Size > | NodeStack |
typedef std::set< core::Size > | NodeSet |
typedef utility::vector1< NodeSet > | Solution |
typedef utility::vector1 < Solution > | Solutions |
typedef std::map< core::Size, std::string > | NodeToSegmentMap |
typedef std::map< std::string, core::Size > | SegmentToNodeMap |
typedef std::map< core::Size, SegmentNameList > | MovableGroupToSegmentNameListMap |
Public Member Functions | |
FoldGraph (StructureData const &perm) | |
FOLDGRAPH CLASS METHODS. More... | |
virtual | ~FoldGraph () |
core::kinematics::FoldTree | fold_tree (SegmentNames const &start_segment) const |
gives a fold tree based on the segments in the given permutation More... | |
core::Size | nodeidx (std::string const &segment) const |
given a segment name, returns the associated graph node index More... | |
std::string const & | segment (core::Size const nodeidx) const |
given a node index, returns the associated segment More... | |
Solution | compute_best_solution (SegmentNames const &staple_loops) const |
generates a solution of movable segments to be used in remodel, based on the foldgraph More... | |
protocols::loops::LoopsOP | create_loops (SegmentNames const &staple_loops) const |
generates a loops object to be used in remodel, based on the foldgraph More... | |
protocols::loops::LoopsOP | create_loops (Solution const &solution) const |
StructureData const & | sd () const |
const access to StructureData More... | |
Private Member Functions | |
void | add_edge (std::string const &seg1, std::string const &seg2) |
adds an non-peptide edge to the foldgraph to indicate a non-covalent interaction More... | |
void | add_peptide_edge (std::string const &seg1, std::string const &seg2) |
adds a peptide edge to the foldgraph, indicating a direct covalent interaction More... | |
bool | has_peptide_edge (std::string const &seg1, std::string const &seg2) const |
returns true if there is a peptide edge between the two given segments More... | |
bool | has_edge (std::string const &seg1, std::string const &seg2) const |
returns true if there is a non-peptide edge between the two given segments More... | |
void | build_seg2node () |
populates segment to node number map using the StructureData object More... | |
void | build_node2seg (SegmentToNodeMap const &seg2node) |
populates node number to segment map using a segment to node number map More... | |
void | find_cutpoints () |
propagaes the internal set of cutpoint-containing segments More... | |
void | fold_tree_rec (core::kinematics::FoldTree &ft, NodeSet &visited, NodeStack &node_stack, std::string const &segment_name, core::Size const parent_resid, int const parent_direction, bool const polymer_only) const |
recursive function to traverse graphs and build fold tree More... | |
void | create_loops_dfs (Solution &solutions, NodeSet &visited, core::Size const current_node) const |
recursive inner function that traverses the foldgraph to create loops objects More... | |
bool | has_peptide_edge (core::Size const n1, core::Size const n2) const |
returns true if there is a peptide edge between the two given nodes More... | |
bool | has_edge (core::Size const n1, core::Size const n2) const |
returns true if there is a non-peptide edge between the two given nodes More... | |
void | add_combined_solutions (Solutions &solutions) const |
checks to see whether solutions found by DFS search can be combined. More... | |
void | add_non_polymeric_connections (Solutions &solutions) const |
Solution const & | select_best_solution (Solutions const &solutions) const |
void | sort_solutions (Solutions &solutions) const |
sorts solutions such that the ones maximizing segments w/ same MG are fixed. More... | |
bool | check_solution (Solution const &solution) const |
checks a solution to ensure that covalently bound segments are not found both inside and outside of loops More... | |
int | find_cutpoint_in_range (int const min_res, int const max_res) const |
Private Attributes | |
StructureDataCOP | sd_ |
SegmentToNodeMap | seg2node_ |
NodeToSegmentMap | node2seg_ |
NodeSet | cutpoints_ |
utility::graph::Graph | g_ |
utility::graph::Graph | gpeptide_ |
typedef std::map< core::Size, SegmentNameList > protocols::denovo_design::components::FoldGraph::MovableGroupToSegmentNameListMap |
typedef std::set< core::Size > protocols::denovo_design::components::FoldGraph::NodeSet |
typedef std::stack< core::Size > protocols::denovo_design::components::FoldGraph::NodeStack |
typedef std::map< core::Size, std::string > protocols::denovo_design::components::FoldGraph::NodeToSegmentMap |
typedef std::map< std::string, core::Size > protocols::denovo_design::components::FoldGraph::SegmentToNodeMap |
typedef utility::vector1< NodeSet > protocols::denovo_design::components::FoldGraph::Solution |
typedef utility::vector1< Solution > protocols::denovo_design::components::FoldGraph::Solutions |
protocols::denovo_design::components::FoldGraph::FoldGraph | ( | StructureData const & | perm | ) |
FOLDGRAPH CLASS METHODS.
References add_edge(), add_peptide_edge(), build_node2seg(), build_seg2node(), protocols::denovo_design::components::StructureData::covalent_bonds_end(), find_cutpoints(), g_, gpeptide_, protocols::denovo_design::components::Segment::has_free_lower_terminus(), protocols::denovo_design::components::Segment::has_free_upper_terminus(), protocols::denovo_design::components::StructureData::id(), protocols::denovo_design::components::Segment::lower_segment(), protocols::denovo_design::components::StructureData::movable_groups(), node2seg_, protocols::denovo_design::components::Segment::safe(), sd(), seg2node_, protocols::denovo_design::components::StructureData::segment(), protocols::denovo_design::components::StructureData::segments_begin(), protocols::denovo_design::components::StructureData::segments_end(), protocols::denovo_design::components::StructureData::segments_in_movable_group(), protocols::TR(), and protocols::denovo_design::components::Segment::upper_segment().
|
virtual |
|
private |
checks to see whether solutions found by DFS search can be combined.
checks to see whether sets within solutions can be combined.
References core::sequence::end, gpeptide_, and protocols::TR().
Referenced by compute_best_solution().
|
private |
adds an non-peptide edge to the foldgraph to indicate a non-covalent interaction
References g_, nodeidx(), and protocols::TR().
Referenced by add_peptide_edge(), and FoldGraph().
|
private |
|
private |
adds a peptide edge to the foldgraph, indicating a direct covalent interaction
References add_edge(), gpeptide_, nodeidx(), and protocols::TR().
Referenced by FoldGraph().
|
private |
populates node number to segment map using a segment to node number map
References node2seg_, and seg2node_.
Referenced by FoldGraph().
|
private |
populates segment to node number map using the StructureData object
References core::kinematics::distance(), sd(), seg2node_, protocols::denovo_design::components::StructureData::segments_end(), and protocols::TR().
Referenced by FoldGraph().
|
private |
checks a solution to ensure that covalently bound segments are not found both inside and outside of loops
References core::pack::dunbrack::c, protocols::denovo_design::components::StructureData::connected_segments(), gpeptide_, protocols::denovo_design::components::insert_mg(), core::scoring::mg, protocols::denovo_design::components::Segment::movable_group(), protocols::denovo_design::components::StructureData::non_polymer_bond_exists(), sd(), segment(), protocols::denovo_design::components::StructureData::segment(), protocols::denovo_design::components::StructureData::segments_end(), and protocols::TR().
Referenced by select_best_solution().
FoldGraph::Solution protocols::denovo_design::components::FoldGraph::compute_best_solution | ( | SegmentNames const & | staple_loops | ) | const |
generates a solution of movable segments to be used in remodel, based on the foldgraph
References add_combined_solutions(), add_non_polymeric_connections(), core::pack::dunbrack::c, create_loops_dfs(), cutpoints_, nodeidx(), sd(), select_best_solution(), sort_solutions(), protocols::hybridization::t, and protocols::TR().
Referenced by create_loops().
protocols::loops::LoopsOP protocols::denovo_design::components::FoldGraph::create_loops | ( | SegmentNames const & | staple_loops | ) | const |
generates a loops object to be used in remodel, based on the foldgraph
References compute_best_solution().
Referenced by protocols::denovo_design::movers::BuildDeNovoBackboneMover::create_loops().
protocols::loops::LoopsOP protocols::denovo_design::components::FoldGraph::create_loops | ( | Solution const & | solution | ) | const |
|
private |
recursive inner function that traverses the foldgraph to create loops objects
References cutpoints_, gpeptide_, segment(), and protocols::TR().
Referenced by compute_best_solution().
|
private |
|
private |
propagaes the internal set of cutpoint-containing segments
References protocols::denovo_design::components::Segment::cutpoint(), cutpoints_, nodeidx(), sd(), protocols::denovo_design::components::StructureData::segment(), and protocols::denovo_design::components::StructureData::segments_end().
Referenced by FoldGraph().
core::kinematics::FoldTree protocols::denovo_design::components::FoldGraph::fold_tree | ( | SegmentNames const & | start_segment | ) | const |
gives a fold tree based on the segments in the given permutation
gives a fold tree based on the segments in the SD
References core::kinematics::FoldTree::begin(), core::kinematics::FoldTree::end(), protocols::denovo_design::components::StructureData::find_non_polymer_bond(), fold_tree_rec(), g_, nodeidx(), core::kinematics::Edge::PEPTIDE, protocols::denovo_design::components::StructureData::pose_residue(), protocols::denovo_design::components::Segment::safe(), sd(), seg2node_, segment(), protocols::denovo_design::components::StructureData::segment(), and protocols::TR().
Referenced by protocols::denovo_design::components::ExtendedPoseBuilder::apply(), and protocols::denovo_design::movers::FoldTreeFromFoldGraphMover::apply().
|
private |
recursive function to traverse graphs and build fold tree
parent_direction] | -1 if the previous edge is a peptide edge going backward, 1 if the previous edge is going forward, and 0 if the previous edge is a jump |
parent_resid] | parent residue |
parent_direction] | -1 if the previous edge is a peptide edge going backward, 1 if the previous edge is going forward, and 0 if the previous edge is a jump |
References core::kinematics::FoldTree::add_edge(), g_, gpeptide_, protocols::denovo_design::components::Segment::lower(), nodeidx(), core::kinematics::FoldTree::num_jump(), core::kinematics::Edge::PEPTIDE, protocols::denovo_design::components::Segment::safe(), sd(), segment(), protocols::denovo_design::components::StructureData::segment(), protocols::TR(), and protocols::denovo_design::components::Segment::upper().
Referenced by fold_tree().
|
private |
returns true if there is a non-peptide edge between the two given segments
returns true if there is a peptide edge between the two given segments
References nodeidx().
|
private |
|
private |
returns true if there is a peptide edge between the two given segments
References nodeidx().
|
private |
returns true if there is a peptide edge between the two given nodes
References gpeptide_.
core::Size protocols::denovo_design::components::FoldGraph::nodeidx | ( | std::string const & | segment | ) | const |
given a segment name, returns the associated graph node index
References seg2node_, and protocols::TR().
Referenced by add_edge(), add_non_polymeric_connections(), add_peptide_edge(), compute_best_solution(), find_cutpoints(), fold_tree(), fold_tree_rec(), has_edge(), has_peptide_edge(), protocols::denovo_design::components::map_mgs(), and protocols::denovo_design::components::map_nodes().
StructureData const & protocols::denovo_design::components::FoldGraph::sd | ( | ) | const |
const access to StructureData
References sd_.
Referenced by add_non_polymeric_connections(), build_seg2node(), check_solution(), compute_best_solution(), create_loops(), find_cutpoint_in_range(), find_cutpoints(), fold_tree(), fold_tree_rec(), FoldGraph(), select_best_solution(), and sort_solutions().
std::string const & protocols::denovo_design::components::FoldGraph::segment | ( | core::Size const | nodeidx | ) | const |
given a node index, returns the associated segment
References node2seg_, seg2node_, and protocols::TR().
Referenced by add_non_polymeric_connections(), check_solution(), create_loops(), create_loops_dfs(), find_cutpoint_in_range(), fold_tree(), fold_tree_rec(), and protocols::denovo_design::components::NamedSolution::NamedSolution().
|
private |
References check_solution(), sd(), and protocols::TR().
Referenced by compute_best_solution().
|
private |
sorts solutions such that the ones maximizing segments w/ same MG are fixed.
References sd().
Referenced by compute_best_solution().
|
private |
Referenced by compute_best_solution(), create_loops_dfs(), find_cutpoint_in_range(), and find_cutpoints().
|
private |
Referenced by add_edge(), fold_tree(), fold_tree_rec(), FoldGraph(), and has_edge().
|
private |
Referenced by add_combined_solutions(), add_peptide_edge(), check_solution(), create_loops_dfs(), fold_tree_rec(), FoldGraph(), has_edge(), and has_peptide_edge().
|
private |
Referenced by build_node2seg(), FoldGraph(), and segment().
|
private |
Referenced by sd().
|
private |
Referenced by build_node2seg(), build_seg2node(), fold_tree(), FoldGraph(), nodeidx(), and segment().