Rosetta
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::kinematics::ShortestPathInFoldTree Class Reference

#include <ShortestPathInFoldTree.hh>

Inheritance diagram for core::kinematics::ShortestPathInFoldTree:
Inheritance graph
[legend]

Public Types

typedef utility::vector1< EdgeEdgeList
 

Public Member Functions

 ShortestPathInFoldTree (core::kinematics::FoldTree const &f)
 cs-tor, parses fold-tree and caches important distances: memory N^2+M*5 N: 2 x number of jumps M: number of residues More...
 
 ShortestPathInFoldTree (ShortestPathInFoldTree const &src)
 copy constructor More...
 
 ~ShortestPathInFoldTree () override
 Automatically generated virtual destructor for class deriving directly from VirtualBase. More...
 
core::Size dist (Size pos1, Size pos2) const
 returns the shortest distance of two residues going along Fold-Tree edges. More...
 
Size max_dist () const
 returns the shortest distance for the two residues that are furthest apart More...
 

Private Member Functions

void build_peptide_table (core::kinematics::FoldTree const &f)
 build table that gives for each residue the distance to the next jump(s) (1 or 2) More...
 
void build_jumpres_distmap (core::kinematics::FoldTree const &f)
 build N^2 table of distances between jump-residues More...
 
int get_jump (Size seqpos) const
 if seqpos is a jump_res resturn its internal number More...
 
void compute_dist_map (core::kinematics::FoldTree const &)
 helper of build_jumpres_distmap More...
 
void init_dist_map (EdgeList const &)
 

Private Attributes

std::map< Size, Sizejump_res_
 private data =============================== More...
 
ObjexxFCL::FArray2D_int node_dist_
 2D array for distances between each pair of jump_residues More...
 
ObjexxFCL::FArray2D_int res2jumps_
 1D array for distances of residue j to each of max 2 jump_residues that are on the same peptide edge in the fold-tree --> for each residue 1+2x2 entries. < edgenr > <jump1> <dist1> <jump2> <dist2> jump1 upstream jump_residue (internal numbering) jump2 downstream jump-residues no up/downstream jumps --> -1 More...
 
Size nres_
 for error checking what is nres_ in the fold-tree More...
 
bool simple_fold_tree_
 if fold-tree is simple (no jumps) don't compute anything. More...
 
Size max_dist_
 the furthest distance a query to dist() can return More...
 

Member Typedef Documentation

◆ EdgeList

Constructor & Destructor Documentation

◆ ShortestPathInFoldTree() [1/2]

core::kinematics::ShortestPathInFoldTree::ShortestPathInFoldTree ( core::kinematics::FoldTree const &  f)

cs-tor, parses fold-tree and caches important distances: memory N^2+M*5 N: 2 x number of jumps M: number of residues

@detail cs-tor

References build_jumpres_distmap(), build_peptide_table(), max_dist_, nres_, core::kinematics::FoldTree::num_jump(), and simple_fold_tree_.

◆ ShortestPathInFoldTree() [2/2]

core::kinematics::ShortestPathInFoldTree::ShortestPathInFoldTree ( ShortestPathInFoldTree const &  src)

copy constructor

@detail cs-tor

◆ ~ShortestPathInFoldTree()

core::kinematics::ShortestPathInFoldTree::~ShortestPathInFoldTree ( )
overridedefault

Automatically generated virtual destructor for class deriving directly from VirtualBase.

Auto-generated virtual destructor

Member Function Documentation

◆ build_jumpres_distmap()

void core::kinematics::ShortestPathInFoldTree::build_jumpres_distmap ( core::kinematics::FoldTree const &  f)
private

build N^2 table of distances between jump-residues

@detail the core of the distance cache is build here: node_dist_ a 2D array that knows distances for each pair of jump-residues i.e., a 10 100 1 / 100 120 -1 / 120 150 2 – fold-tree would have jump_residues 10, 100, 120 and 150. distances would be 10, 100 1 120 150 1 100 150 21 .... for the jump_residues we use internal numbering, each seqpos that is a jump-res in one or more jumps will get a individual number, starting at 1 and counting continously. thus the distance of jump_res-pair i,j is found as node_dist(i,j)

first we go through the fold-tree to find all jump_residues, and build the map: jump_res_ to keep track between mapping "seqpos<-->internal_numbering"

then assign distance 1 to each pair of jump_residues connected by a jump and using Warshall algorithm to build up full distance matrix diagonal is distance 0

References compute_dist_map(), get_jump(), init_dist_map(), core::kinematics::FoldTree::jump_edge(), jump_res_, core::kinematics::FoldTree::num_jump(), core::kinematics::FoldTree::root(), core::kinematics::Edge::start(), protocols::loops::start, core::kinematics::Edge::stop(), protocols::loops::stop, and core::kinematics::tr().

Referenced by ShortestPathInFoldTree().

◆ build_peptide_table()

void core::kinematics::ShortestPathInFoldTree::build_peptide_table ( core::kinematics::FoldTree const &  f)
private

build table that gives for each residue the distance to the next jump(s) (1 or 2)

@detail build table that gives for each residue the distance to upstream and downstream jump-residues (if available)

format: <edge_nr> <jump1> <dist1> <jump2> <dist2> edge_nr is a unique number that identifes peptide-edges jump1 and jump2 refers to our internally-numbered jump-residues (entries in node_dist_ ) dist – distance in sequence to the respective jump-residues

References core::kinematics::FoldTree::begin(), dist(), core::kinematics::FoldTree::end(), get_jump(), protocols::mean_field::max(), max_dist_, protocols::mean_field::min(), core::kinematics::FoldTree::nres(), and res2jumps_.

Referenced by ShortestPathInFoldTree().

◆ compute_dist_map()

void core::kinematics::ShortestPathInFoldTree::compute_dist_map ( core::kinematics::FoldTree const &  f)
private

helper of build_jumpres_distmap

@detail

References jump_res_, and node_dist_.

Referenced by build_jumpres_distmap().

◆ dist()

Size core::kinematics::ShortestPathInFoldTree::dist ( Size  pos1,
Size  pos2 
) const

◆ get_jump()

int core::kinematics::ShortestPathInFoldTree::get_jump ( Size  seqpos) const
inlineprivate

if seqpos is a jump_res resturn its internal number

References jump_res_.

Referenced by build_jumpres_distmap(), and build_peptide_table().

◆ init_dist_map()

void core::kinematics::ShortestPathInFoldTree::init_dist_map ( EdgeList const &  edges)
private

@detail initialize dist map with dist 1 for each pair of residues connected by jumps as stored in the EdgeList

References jump_res_, and node_dist_.

Referenced by build_jumpres_distmap().

◆ max_dist()

Size core::kinematics::ShortestPathInFoldTree::max_dist ( ) const
inline

Member Data Documentation

◆ jump_res_

std::map< Size, Size > core::kinematics::ShortestPathInFoldTree::jump_res_
private

private data ===============================

map from pose-numbering to internal numbering --> jump_res are counted from 1...N first: pose-numbering, second internal number

Referenced by build_jumpres_distmap(), compute_dist_map(), get_jump(), and init_dist_map().

◆ max_dist_

Size core::kinematics::ShortestPathInFoldTree::max_dist_
mutableprivate

the furthest distance a query to dist() can return

Referenced by build_peptide_table(), max_dist(), and ShortestPathInFoldTree().

◆ node_dist_

ObjexxFCL::FArray2D_int core::kinematics::ShortestPathInFoldTree::node_dist_
private

2D array for distances between each pair of jump_residues

Referenced by compute_dist_map(), dist(), and init_dist_map().

◆ nres_

Size core::kinematics::ShortestPathInFoldTree::nres_
private

for error checking what is nres_ in the fold-tree

Referenced by dist(), and ShortestPathInFoldTree().

◆ res2jumps_

ObjexxFCL::FArray2D_int core::kinematics::ShortestPathInFoldTree::res2jumps_
private

1D array for distances of residue j to each of max 2 jump_residues that are on the same peptide edge in the fold-tree --> for each residue 1+2x2 entries. < edgenr > <jump1> <dist1> <jump2> <dist2> jump1 upstream jump_residue (internal numbering) jump2 downstream jump-residues no up/downstream jumps --> -1

Referenced by build_peptide_table(), and dist().

◆ simple_fold_tree_

bool core::kinematics::ShortestPathInFoldTree::simple_fold_tree_
private

if fold-tree is simple (no jumps) don't compute anything.

Referenced by dist(), and ShortestPathInFoldTree().


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