Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KofNConstraint.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
11 /// @brief meta constraint where N constraints declared
12 /// @brief only the lowest K are evaluated
13 /// @author
14 
15 
16 #ifndef INCLUDED_core_scoring_constraints_KofNConstraint_hh
17 #define INCLUDED_core_scoring_constraints_KofNConstraint_hh
18 
19 // Unit header
22 // AUTO-REMOVED #include <core/scoring/constraints/XYZ_Func.hh>
24 
25 #include <core/id/AtomID.hh>
28 #include <core/pose/Pose.fwd.hh>
29 
32 
33 //Utility Headers
34 #include <numeric/xyzVector.fwd.hh>
35 
36 #include <utility/vector1.hh>
37 
38 
39 
40 namespace core {
41 namespace scoring {
42 namespace constraints {
43 
44 
46 public:
47 
48  /// @brief Constructor
50 
51  /// @brief Constructor
52  KofNConstraint( ConstraintCOPs & cst_in, core::Size K=0 );
53 
54  ///
55  void
57  K_ = K;
58  }
59 
61  getK() const {
62  return K_;
63  }
64 
65  ///
66  virtual
67  ConstraintOP clone() const {
68  return new KofNConstraint(*this);
69  }
70 
71  virtual
73  return new KofNConstraint;
74  }
75 
76  /// @brief
77  void
79 
80  std::string type() const {
81  return "KofNConstraint";
82  }
83 
84  /// @brief read in constraint defiinition
85  void
86  read_def( std::istream& data, pose::Pose const& pose, FuncFactory const& func_factory );
87 
88  /// @brief compute score
89  void
90  score( XYZ_Func const & xyz_func, EnergyMap const & weights, EnergyMap & emap ) const;
91 
93  calculate_total_cst_score( EnergyMap const & weights, EnergyMap & emap) const;
94 
95  virtual
97  remap_resid( core::id::SequenceMapping const &seqmap ) const;
98 
99  /// @brief compute atom deriv
100  void
101  fill_f1_f2(
102  AtomID const & atom,
103  XYZ_Func const & xyz,
104  Vector & F1,
105  Vector & F2,
106  EnergyMap const & weights
107  ) const;
108 
109  void show( std::ostream& out) const;
110 
112 
113  // void read_def( std::istream& in, pose::Pose const& pose, FuncFactory const& func_factory );
114  Size show_violations( std::ostream& out, pose::Pose const& pose, Size verbose_level, Real threshold = 1.0 ) const;
115 
116 
117 private:
122 }; //KofNConstraint
123 
124 } //constraints
125 } //scoring
126 } //core
127 
128 #endif