Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstraintIO.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 IO-functionality for Constraints
11 /// @brief
12 /// @author Oliver Lange olange@u.washington.edu
13 
14 #ifndef INCLUDED_core_scoring_constraints_ConstraintIO_hh
15 #define INCLUDED_core_scoring_constraints_ConstraintIO_hh
16 
17 // Unit headers
19 
20 // Package headers
23 
24 // Project headers
25 #include <core/types.hh>
26 #include <core/pose/Pose.fwd.hh>
28 #include <utility/vector1.hh>
29 
30 
31 //Utility Headers
32 
33 // C++ Headers
34 
35 namespace core {
36 namespace scoring {
37 namespace constraints {
38 
39 ////////////////////////////////////////////////////////////////////////////////////////
40 /////////////////////////////////////////////////////////////////////////////
41 
42 class ConstraintIO {
43 public:
44  static ConstraintIO* get_instance();
46  std::string const & filename,
47  ConstraintSetOP cst_set,
48  pose::Pose const& pose
49  );
51  std::istream & data,
52  ConstraintSetOP cst_set,
53  pose::Pose const& pose
54  );
55 
56  static void write_constraints( std::ostream&, ConstraintSet const& cst_set, core::pose::Pose const& );
57  static void write_constraints( std::string const& filename, ConstraintSet const& cst_set, core::pose::Pose const& );
58 
59  static FuncFactory& get_func_factory(void);
60  static ConstraintFactory& get_cst_factory(void);
61 
63  std::istream & data,
64  core::pose::Pose pose
65  );
66 
68  std::string const & fname,
69  ConstraintSetOP cset,
70  pose::Pose const & pose
71  );
72 
74  std::istream & data,
75  ConstraintSetOP cset,
76  pose::Pose const & pose
77  );
78 
79  ///@brief read one individual constraint defined.
81  std::istream & data,
82  core::pose::Pose const& pose,
83  FuncFactory const & func_factory
84  );
85 
86  ///@brief read one individual constraint defined.
88  std::istream & data,
89  core::pose::Pose const& pose,
90  FuncFactory const & func_factory,
91  std::string type /*cst -type*/
92  );
93 
95  std::istream & data,
96  core::pose::Pose pose
97  );
98 
99  static void parse_residue(
100  pose::Pose const& pose,
101  std::string const residue_string,
102  Size & residue_num
103  );
104 
105  // gkt - tmp hack for BoundFunc, should be private
106 protected:
107  static void read_cst_bindingsites( std::istream &data, std::string& next_section, ConstraintSet&, pose::Pose const& );
108  static void read_cst_atom_pairs( std::istream &data, std::string& next_section, ConstraintSet&, pose::Pose const& );
109  static void read_cst_coordinates( std::istream &data, std::string& next_section, ConstraintSet&, pose::Pose const& );
110  static void read_cst_angles( std::istream &data, std::string& next_section, ConstraintSet&, pose::Pose const& );
111 
112 
113 private:
115  static ConstraintIO* instance_;
117  //static ConstraintFactory cst_factory_;
118 };
119 
120 } //constraints
121 } //scoring
122 } //core
123 
124 #endif