Rosetta  2016.46
 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::denovo_design::components::FoldGraph Class Reference

#include <FoldGraph.hh>

Inheritance diagram for protocols::denovo_design::components::FoldGraph:
Inheritance graph
[legend]

Public Types

typedef std::stack< core::SizeNodeStack
 
typedef std::set< core::SizeNodeSet
 
typedef utility::vector1< NodeSetSolution
 
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_
 

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::denovo_design::components::FoldGraph::FoldGraph ( StructureData const &  perm)
protocols::denovo_design::components::FoldGraph::~FoldGraph ( )
virtual

Member Function Documentation

void protocols::denovo_design::components::FoldGraph::add_combined_solutions ( Solutions solutions) const
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().

void protocols::denovo_design::components::FoldGraph::add_edge ( std::string const &  seg1,
std::string const &  seg2 
)
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().

void protocols::denovo_design::components::FoldGraph::add_non_polymeric_connections ( Solutions solutions) const
private
void protocols::denovo_design::components::FoldGraph::add_peptide_edge ( std::string const &  seg1,
std::string const &  seg2 
)
private

adds a peptide edge to the foldgraph, indicating a direct covalent interaction

References add_edge(), gpeptide_, nodeidx(), and protocols::TR().

Referenced by FoldGraph().

void protocols::denovo_design::components::FoldGraph::build_node2seg ( SegmentToNodeMap const &  seg2node)
private

populates node number to segment map using a segment to node number map

References node2seg_, and seg2node_.

Referenced by FoldGraph().

void protocols::denovo_design::components::FoldGraph::build_seg2node ( )
private
bool protocols::denovo_design::components::FoldGraph::check_solution ( Solution const &  solution) const
private
FoldGraph::Solution protocols::denovo_design::components::FoldGraph::compute_best_solution ( SegmentNames const &  staple_loops) const
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
void protocols::denovo_design::components::FoldGraph::create_loops_dfs ( Solution solutions,
NodeSet visited,
core::Size const  current_node 
) 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().

int protocols::denovo_design::components::FoldGraph::find_cutpoint_in_range ( int const  min_res,
int const  max_res 
) const
private
void protocols::denovo_design::components::FoldGraph::find_cutpoints ( )
private
core::kinematics::FoldTree protocols::denovo_design::components::FoldGraph::fold_tree ( SegmentNames const &  start_segment) const
void protocols::denovo_design::components::FoldGraph::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
private

recursive function to traverse graphs and build fold tree

Parameters
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().

bool protocols::denovo_design::components::FoldGraph::has_edge ( std::string const &  seg1,
std::string const &  seg2 
) const
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().

bool protocols::denovo_design::components::FoldGraph::has_edge ( core::Size const  n1,
core::Size const  n2 
) const
private

returns true if there is a non-peptide edge between the two given nodes

returns true if there is a peptide edge between the two given nodes

References g_, and gpeptide_.

bool protocols::denovo_design::components::FoldGraph::has_peptide_edge ( std::string const &  seg1,
std::string const &  seg2 
) const
private

returns true if there is a peptide edge between the two given segments

References nodeidx().

bool protocols::denovo_design::components::FoldGraph::has_peptide_edge ( core::Size const  n1,
core::Size const  n2 
) const
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
StructureData const & protocols::denovo_design::components::FoldGraph::sd ( ) const
std::string const & protocols::denovo_design::components::FoldGraph::segment ( core::Size const  nodeidx) const
FoldGraph::Solution const & protocols::denovo_design::components::FoldGraph::select_best_solution ( Solutions const &  solutions) const
private
void protocols::denovo_design::components::FoldGraph::sort_solutions ( Solutions solutions) const
private

sorts solutions such that the ones maximizing segments w/ same MG are fixed.

References sd().

Referenced by compute_best_solution().

Member Data Documentation

NodeSet protocols::denovo_design::components::FoldGraph::cutpoints_
private
utility::graph::Graph protocols::denovo_design::components::FoldGraph::g_
private
utility::graph::Graph protocols::denovo_design::components::FoldGraph::gpeptide_
private
NodeToSegmentMap protocols::denovo_design::components::FoldGraph::node2seg_
private

Referenced by build_node2seg(), FoldGraph(), and segment().

StructureDataCOP protocols::denovo_design::components::FoldGraph::sd_
private

Referenced by sd().

SegmentToNodeMap protocols::denovo_design::components::FoldGraph::seg2node_
private

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