Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SameStrand.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file
11 /// @brief secondary structure will hold statistics about secondary structure predictions
12 /// sources can be from
13 /// - fragments
14 /// - psipred files ? other stuff
15 ///
16 /// @detailed
17 /// from converting jumping_pairings.cc of rosetta++ into mini
18 ///
19 ///
20 ///
21 /// @author Oliver Lange
22 
23 #ifndef INCLUDED_protocols_jumping_SameStrand_hh
24 #define INCLUDED_protocols_jumping_SameStrand_hh
25 
26 // Unit Headers
28 
29 // Package Headers
30 // AUTO-REMOVED #include <core/fragment/SecondaryStructure.hh>
31 
32 // Project Headers
33 #include <core/types.hh>
34 
35 // Utility headers
36 #include <utility/pointer/ReferenceCount.hh>
37 // #Include <utility/vector1.hh>
38 
39 // ObjexxFCL Headers
40 #include <ObjexxFCL/FArray1D.hh>
41 #include <ObjexxFCL/FArray2D.hh>
42 
44 
45 
46 //// C++ headers
47 //#include <cstdlib>
48 //#include <string>
49 //#include <vector>
50 
51 namespace protocols {
52 namespace jumping {
53 
54 ///@brief tiny helper class that knows the relative fractions of secondary structure L,H,E
55 ///@detail
56 /// so far these fractions can be computed from a FragSet
57 /// other input strategies are conceivable but not implemented, yet: eg. psipred files, a bunch of poses,
59 public:
60  ///@brief c'stor compute fractions from fragments
62 
63  ///@brief explicit definitions of c'stor and d'stor
64  virtual ~SameStrand();
65  SameStrand( SameStrand const& );
66 
67 
68  ///@brief print current choice to stream
69  void show( std::ostream &os ) const;
70 
71  ///@brief new stochastic choices for strand boundaries
72  void redo() const;
73 
74  ///@brief return whether residue i and j are on the same strand
75  bool eval( core::Size i, core::Size j ) const;
76 
77  ///@brief ...
78  Size total_residue() const {
79  return total_residue_;
80  }
81 
82 private:
83 
84  void compute( core::fragment::SecondaryStructure const& ss ) const;
85  void do_strand_sum( core::fragment::SecondaryStructure const& ss ) const;
86  void do_same_strand( ) const; //uses only strand_sum_
87 
88  ///@brief store loop/strand
89  mutable ObjexxFCL::FArray2D_bool same_strand_;
90 
91  ///@brief
92  mutable ObjexxFCL::FArray1D_float strand_sum_;
93 
94  ///@brief length of FArrays
96 
97  ///@brief ScondaryStructure information --- needed permanently for redo() method
99 
100 };
101 
102  /// @brief output operator
103 inline std::ostream & operator <<(std::ostream & os, SameStrand const & t) {
104  t.show( os );
105  return os;
106 }
107 
108 
109 } //protocols
110 } //jumping
111 
112 #endif
113