Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PhiPsiTalosIO.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file protocols/frag_picker/PhiPsiTalosIO.hh
10 /// @brief Class that reads and writes Phi-Psi in TALOS format
11 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
12 
13 #ifndef INCLUDED_protocols_frag_picker_PhiPsiTalosIO_hh
14 #define INCLUDED_protocols_frag_picker_PhiPsiTalosIO_hh
15 
16 // utility headers
17 #include <core/types.hh>
18 
19 #include <string>
20 #include <map>
21 
22 // AUTO-REMOVED #include <utility/vector1.hh>
23 
24 // boost headers
25 #include <boost/tuple/tuple.hpp>
26 
27 #include <utility/vector1_bool.hh>
28 
29 
30 namespace protocols {
31 namespace frag_picker {
32 
33 using namespace core;
34 
36 public:
37 
39  first_residue_index_ = 1;
40  }
41 
43  first_residue_index_ = 1;
44  read(file_name);
45  }
46 
48  return first_residue_index_;
49  }
50 
52  return first_residue_index_ + sequence_.length() - 1;
53  }
54 
55  inline
56  std::string const &
57  get_sequence() const {
58  return sequence_;
59  }
60 
61  inline
62  bool
63  has_entry(Size residue_id) const {
64  if (entries_.find(residue_id) != entries_.end())
65  return true;
66  return false;
67  }
68 
69  inline const boost::tuple<Size, char, Real, Real, Real, Real, Real, Real,
70  Size, std::string> get_entry(const Size res_id) {
71  return entries_.find(res_id)->second;
72  }
73  inline Real phi(Size res_id) {
74  return entries_.find(res_id)->second.get<2> ();
75  }
76 
77  inline Real psi(Size res_id) {
78  return entries_.find(res_id)->second.get<3> ();
79  }
80 
81  inline Real d_phi(Size res_id) {
82  return entries_.find(res_id)->second.get<4> ();
83  }
84 
85  inline Real d_psi(Size res_id) {
86  return entries_.find(res_id)->second.get<5> ();
87  }
88 
89  inline Real dist(Size res_id) {
90  return entries_.find(res_id)->second.get<6> ();
91  }
92 
93  inline Real s2(Size res_id) {
94  return entries_.find(res_id)->second.get<7> ();
95  }
96 
97  inline std::string quality(Size res_id) {
98  return entries_.find(res_id)->second.get<9> ();
99  }
100 
101  void write(std::ostream&);
102  void read(std::string const&);
103 
104 private:
110  std::map<Size, boost::tuple<Size, char, Real, Real, Real, Real, Real, Real,
112  void print_sequence(std::string const &, std::ostream &) const;
113 };
114 
115 } // frag_picker
116 } // protocols
117 
118 #endif /* INCLUDED_protocols_frag_picker_PhiPsiTalosIO_HH */
119