Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RestrictOperationsBase.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/toolbox/task_operations/RestrictOperationsBase.hh
11 /// @brief Base class for PoseMetricCalculator-using TaskOperations
12 /// @author Steven Lewis smlewi@gmail.com
13 
14 #ifndef INCLUDED_protocols_toolbox_task_operations_RestrictOperationsBase_hh
15 #define INCLUDED_protocols_toolbox_task_operations_RestrictOperationsBase_hh
16 
17 // Unit Headers
20 
21 // Project Headers
22 #include <core/pose/Pose.fwd.hh>
24 
25 namespace protocols {
26 namespace toolbox {
27 namespace task_operations {
28 
29 ///@details This base class defines an interface for TaskOperations which use PoseMetricCalculators to pick out certain residues in a pose. The apply function takes a vector of PoseMetricCalculators and a vector of calculation queries, and uses those queries to shape the PackerTask. This was designed to work with NeighborsByDistanceCalculator, NeighborhoodByDistanceCalculator, and InterfaceNeighborDefinitionCalculator; in general it works when the calculators can return MetricValue< std::set< core::Size > > (a std::set of resids).
31 {
32 public:
36 
38 
39  virtual ~RestrictOperationsBase();
40 
41  virtual TaskOperationOP clone() const = 0;
42 
43  virtual
44  void
45  apply( core::pose::Pose const &, core::pack::task::PackerTask & ) const = 0;
46 
47 protected:
48  ///@brief this is the only real function - it takes a calculator name and calculation, and a PackerTask-compatible vector, and flips booleans in the vector according to the calculator
49  void
51  core::pose::Pose const & pose,
52  std::string const & calculator,
53  std::string const & calculation,
54  utility::vector1_bool & residues ) const;
55 };
56 
57 } //namespace protocols
58 } //namespace toolbox
59 } //namespace task_operations
60 
61 #endif // INCLUDED_protocols_toolbox_TaskOperations_RestrictOperationsBase_HH