Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FeaturesReporter.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/FeaturesReporter.hh
11 /// @brief Base class to report geometry and scores to features Statistics Scientific Benchmark
12 /// @author Matthew O'Meara
13 
14 #ifndef INCLUDED_protocols_features_FeaturesReporter_hh
15 #define INCLUDED_protocols_features_FeaturesReporter_hh
16 
17 // Unit Headers
18 #include <utility/pointer/ReferenceCount.hh>
20 
21 //External
22 #include <boost/uuid/uuid.hpp>
23 
24 // Project Headers
25 #include <core/pose/Pose.fwd.hh>
26 #include <core/types.hh>
30 #include <utility/tag/Tag.fwd.hh>
31 #include <utility/vector1.fwd.hh>
32 
33 // C++ Headers
34 #include <string>
35 #include <set>
36 
37 #include <utility/vector1.hh>
38 
39 #ifdef WIN32
40  #include <utility/sql_database/DatabaseSessionManager.hh>
41 #else
42  #include <utility/sql_database/DatabaseSessionManager.fwd.hh>
43 #endif
44 
45 
46 namespace protocols {
47 namespace features {
48 
50 public:
51  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
52  virtual ~FeaturesReporter();
53 
54  virtual
56  type_name() const {
57  return "Unknown_FeaturesReporter";
58  }
59 
60  ///@brief return sql statements that sets up the appropriate tables
61  ///to contain the features. This should be removed once everything
62  ///has been moved to the schema generator
63  virtual
65  schema() const { return "";}
66 
67  ///@brief return the set of features reporters that are required to
68  ///also already be extracted by the time this one is used.
69  virtual
72  utility::vector1<std::string> dependencies;
73  return dependencies;
74  }
75 
76 
77  ///@brief Define the schema and write it to the database. This is
78  ///most easily achieved using the schema_generator. Once everything
79  ///has converted to the schema generator this should be made a pure virtual
80  virtual void
82  utility::sql_database::sessionOP db_session
83  ) const = 0;
84 
85  ///@brief collect all the feature data for the pose.
88  core::pose::Pose const & /*pose*/,
89  boost::uuids::uuid /*parent uuid*/,
90  utility::sql_database::sessionOP /*db_session*/
91  );
92 
93  ///@brief collect all the feature data for the pose.
94  virtual
97  core::pose::Pose const & /*pose*/,
98  utility::vector1< bool > const & /*relevant_residues*/,
99  boost::uuids::uuid /*parent uuid*/,
100  utility::sql_database::sessionOP /*db_session*/
101  ) = 0;
102 
103  virtual
104  void
105  parse_my_tag(
106  utility::tag::TagPtr const tag,
107  protocols::moves::DataMap & /*data*/,
108  protocols::filters::Filters_map const & /*filters*/,
109  protocols::moves::Movers_map const & /*movers*/,
110  core::pose::Pose const & /*pose*/);
111 
112  virtual
113  void
115  utility::sql_database::sessionOP,
116  boost::uuids::uuid,
117  core::pose::Pose & ) {}
118 
119  virtual
120  void
122  boost::uuids::uuid,
123  utility::sql_database::sessionOP ) {}
124 
125 protected:
126 
128  find_tag(
129  core::pose::Pose const & pose
130  ) const;
131 
132  ///@brief a helper function for deleting data associated with a given structure from feature database
133  ///WARNING table_name must be sanitized!
134  void
136  std::string const & table_name,
137  boost::uuids::uuid struct_id,
138  utility::sql_database::sessionOP db_session);
139 
140 };
141 
142 } // namespace
143 } // namespace
144 
145 #endif // include guard