Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReportToDB.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 protocols/features/ReportToDB.hh
11 /// @brief report feature data to sqlite database
12 /// @author Matthew O'Meara
13 
14 #ifndef INCLUDED_protocols_features_ReportToDB_hh
15 #define INCLUDED_protocols_features_ReportToDB_hh
16 
17 // Unit Headers
18 #include <protocols/moves/Mover.hh>
20 
21 // Project Headers
22 #include <core/types.hh>
23 #include <core/pose/Pose.fwd.hh>
30 
31 
32 // Utility Headers
33 #include <utility/sql_database/DatabaseSessionManager.fwd.hh>
34 #include <utility/tag/Tag.fwd.hh>
35 #include <utility/vector1.hh>
36 
37 // Boost Headers
38 #include <boost/uuid/uuid.hpp>
39 
40 // C++ Headers
41 #include <string>
42 
43 
44 namespace protocols{
45 namespace features{
46 
48 
49 public:
50  ReportToDB();
51 
52  ReportToDB(std::string const & name);
53 
54  ReportToDB(
55  std::string const & name,
56  utility::sql_database::sessionOP db_session,
57  std::string const & sample_source,
58  bool use_transactions=true,
59  core::Size cache_size=2000);
60 
61  ReportToDB(ReportToDB const & src);
62 
63  virtual ~ReportToDB();
64 
65  virtual
66  void
67  register_options() const;
68 
69  virtual moves::MoverOP fresh_instance() const;
70 
71  virtual moves::MoverOP clone() const;
72 
73  virtual std::string get_name() const { return "ReportToDB"; }
74 
75  void
77  utility::tag::TagPtr const tag);
78 
79  void
81  utility::tag::TagPtr const tag);
82 
83  /* Undefined, commenting out to fix PyRosetta build void
84  parse_struct_id_type_tag_item(
85  utility::tag::TagPtr const tag);
86  */
87 
88  /* Undefined, commenting out to fix PyRosetta build void
89  parse_first_struct_id_tag_item(
90  utility::tag::TagPtr const tag);
91  */
92 
93  void
95  utility::tag::TagPtr const tag);
96 
97  void
99  utility::tag::TagPtr const tag);
100 
101  void
103  utility::tag::TagPtr const tag);
104 
105  void
107  utility::tag::TagPtr const tag);
108 
109  void
110  parse_my_tag(
111  utility::tag::TagPtr const tag,
113  Filters_map const & /*filters*/,
114  protocols::moves::Movers_map const & /*movers*/,
115  core::pose::Pose const & pose );
116 
117  void
119  FeaturesReporterOP test_feature_reporter
120  ) const;
121 
122  void
124 
125  void
127 
128  ///@brief initialize the pose and return the relevant residues
131  Pose & pose
132  ) const;
133 
134  ///@brief Add the defined features reporters to the
135  ///'features_reporters' table in the database
136  void
138 
139  ///@brief Link the defined features reporters to the batch of
140  ///structures extracted with this invocation of the ReportToDB mover
141  void
143 
144  ///@brief write tables linking the batches table with the features
145  ///datababase
146  void
147  write_linking_tables() const;
148 
149  void
150  apply(
151  Pose& pose);
152 
153  boost::uuids::uuid
155  utility::vector1<bool> const & relevant_residues) const;
156 
157  void
159  core::pose::Pose const & pose,
160  boost::uuids::uuid struct_id,
161  utility::vector1<bool> const & relevant_residues) const;
162 
163 private:
164  utility::sql_database::sessionOP db_session_;
167 
169 
171 
173 
176 
177  // initialized in parse_my_tag
179 
186 };
187 
188 } // namespace
189 } // namespace
190 
191 #endif //include guard