Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SequenceCoupling.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 SequenceCoupling.hh
11 /// @brief class definition for a sequence coupling profile that
12 // represents a probability distribution over the entire protein.
13 /// @author Hetu Kamisetty
14 
15 #ifndef INCLUDED_core_sequence_SequenceCoupling_hh
16 #define INCLUDED_core_sequence_SequenceCoupling_hh
17 
18 // Unit headers
20 
21 // Project headers
22 #include <core/types.hh>
25 
26 // Utility headers
27 #include <utility/file/FileName.fwd.hh>
28 
29 // C++ headers
30 #include <utility/vector1.hh>
31 
32 namespace core {
33 namespace sequence {
34 
38 public:
39 
40  /// @brief ctors
41  SequenceCoupling() : temp_( 1.0 ) {}
42  /// @brief copy ctor
45  {
46  *this = src;
47  }
48 
49  /*
50  void profile(
51  utility::vector1< utility::vector1< Real > > const & new_profile
52  );
53  utility::vector1< utility::vector1< Real > > const & profile() const;
54  */
55 
56  /// @brief assignment operator.
58  if ( this == &rhs ) return *this;
59 
60  id ( rhs.id() );
61  start ( rhs.start() );
62  gap_char( rhs.gap_char() );
63  sequence( rhs.sequence() );
64 
65  edgePots( rhs.edgePots() );
66  edgeList( rhs.edgeList() );
67  profile( rhs.profile() );
68  //alphabet( rhs.alphabet() );
69  temp ( rhs.temp() );
70 
71  return *this;
72  }
73 
74  /// @brief dtor
75  virtual ~SequenceCoupling() {}
76 
77  /// @brief Read a SequenceCoupling model in GREMLIN format .
78  virtual void read_from_file( FileName const & fn );
79 
80  std::string type() const {
81  return "sequence_coupling";
82  }
83 
84  /// @brief Print this SequenceCoupling object to the given std::ostream.
85  /// Commenting out to fix PyRosetta build friend std::ostream & operator<<( std::ostream & out, const SequenceCoupling & p );
86 
88  return edgeList_;
89  }
90 
92  return edgePots_;
93  }
94  core::Real temp() const{
95  return temp_;
96  }
97  Size npos() const{
98  return numVerts_;
99  }
100 
101  Size findEdgeId(Size vert1, Size vert2) const;
102 
105 
106  void temp(core::Real const t){
107  temp_ = t;
108  }
110  edgeList_=eList;
111  }
113  edgePots_ = ePots;
114  }
115 
116 
117  ///virtual void generate_from_sequence( Sequence const & seq, std::string matrix="BLOSUM62" );
118  //
119  ///void rescale(core::Real factor=1);
120 
121  ///void convert_profile_to_probs();
122 
123  /// @brief Read profile matrix from the given filename using the NNMAKE
124  /// .checkpoint format.
125  ///void read_from_checkpoint( FileName const & fn );
126  //
127  virtual void insert_char( core::Size pos, char new_char );
128 
129  /// @brief Deletes the given position from the Sequence and shifts
130  /// everything else back by one.
131  virtual void delete_position( core::Size pos );
132 
133  ///Size width() const;
134 
135  ///virtual SequenceOP clone() const {
136  /// SequenceOP new_seq_op( new SequenceProfile( *this ) );
137  /// return new_seq_op;
138  ///}
139  //
140 
141 
142  virtual void read_from_file(utility::file::FileName const & fn, Real temp);
143 
144 private:
145  // temp used to convert arbitrary scores to/from probabilities
148  //utility::vector1< utility::vector1< Real > > vertexPots_;
151 
152 }; // class SequenceCoupling
153 
154 } // sequence
155 } // core
156 
157 #endif