Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ProClosureEnergy.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 core/scoring/methods/ProClosureEnergy.hh
11 /// @brief Proline ring closure energy method class declaration
12 /// @author Andrew Leaver-Fay
13 
14 
15 #ifndef INCLUDED_core_scoring_methods_ProClosureEnergy_hh
16 #define INCLUDED_core_scoring_methods_ProClosureEnergy_hh
17 
18 // Unit headers
20 
21 // Package headers
25 
27 
28 #include <utility/vector1.hh>
29 
30 
31 
32 namespace core {
33 namespace scoring {
34 namespace methods {
35 
36 ///
38 public:
40 
41 public:
42 
43  /// ctor
45 
46  // dstor
48 
49  /// clone
50  virtual
52  clone() const;
53 
54  /////////////////////////////////////////////////////////////////////////////
55  // methods for ContextIndependentTwoBodyEnergies
56  /////////////////////////////////////////////////////////////////////////////
57 
58  /// @brief Pro-closure terms only apply between bonded residues where i+1 is
59  /// proline -- skip residue pairs that don't apply during minimization.
60  virtual
61  bool
63  conformation::Residue const & res1,
64  conformation::Residue const & res2,
65  bool res_moving_wrt_eachother
66  ) const;
67 
68  /// @brief Evaluate the interaction between a given residue pair
69  virtual
70  void
72  conformation::Residue const & rsd1,
73  conformation::Residue const & rsd2,
74  pose::Pose const & pose,
75  ScoreFunction const & sfxn,
76  EnergyMap & emap
77  ) const;
78 
79  bool
80  minimize_in_whole_structure_context( pose::Pose const & ) const { return false; }
81 
82  /// @brief Evaluate the derivative for the input residue pair.
83  /// This will only be called if rsd1 and rsd2 are bonded and one of them is a proline
84  /// because ProClosureEnergy defines the "defines_score_for_residue_pair" method.
85  /*virtual
86  void
87  eval_atom_derivative_for_residue_pair(
88  Size const atom_index,
89  conformation::Residue const & rsd1,
90  conformation::Residue const & rsd2,
91  ResSingleMinimizationData const & minsingle_data1,
92  ResSingleMinimizationData const & minsingle_data2,
93  ResPairMinimizationData const & min_data,
94  pose::Pose const & pose, // provides context
95  kinematics::DomainMap const & domain_map,
96  ScoreFunction const & sfxn,
97  EnergyMap const & weights,
98  Vector & F1,
99  Vector & F2
100  ) const;*/
101 
102  virtual
103  void
105  conformation::Residue const & rsd1,
106  conformation::Residue const & rsd2,
109  ResPairMinimizationData const &,
110  pose::Pose const &,
111  EnergyMap const & weights,
112  utility::vector1< DerivVectorPair > & r1_atom_derivs,
113  utility::vector1< DerivVectorPair > & r2_atom_derivs
114  ) const;
115 
116  /// @brief Non-virtual interface; takes only the needed parameters.
117  /*void
118  eval_atom_derivative_for_residue_pair2(
119  Size const atom_index,
120  conformation::Residue const & rsd1,
121  conformation::Residue const & rsd2,
122  EnergyMap const & weights,
123  Vector & F1,
124  Vector & F2
125  ) const;*/
126 
127  /// @brief Penalize the pucker-up residue type if its chi1 is positive;
128  /// penalize the pucker-down residue type if its chi1 is negative. Only
129  /// applies this penalty when the other_residue is the next polymeric residue
130  /// after pro_residue (i+1), unless pro_residue is an upper_term,
131  /// in which case it applies the penalty for pro_residue's previous polymeric
132  /// residue.
133  virtual
134  void
136  conformation::Residue const & pro_residue,
137  conformation::Residue const & other_residue,
138  pose::Pose const &,
139  ScoreFunction const &,
140  EnergyMap &
141  ) const;
142 
143  /// @brief Penalize the pucker-up residue type if its chi1 is positive;
144  /// penalize the pucker-down residue type if its chi1 is negative. Only
145  /// applies this penalty when the other_residue is the next polymeric residue
146  /// after pro_residue (i+1), unless pro_residue is an upper_term,
147  /// in which case it applies the penalty for pro_residue's previous polymeric
148  /// residue.
149  virtual
150  void
152  conformation::Residue const & pro_residue,
153  conformation::Residue const & other_residue,
154  pose::Pose const &,
155  ScoreFunction const &,
156  EnergyMap &
157  ) const;
158 
159 
160  virtual
161  bool
162  defines_intrares_energy( EnergyMap const & weights ) const;
163 
164  virtual
165  void
167  conformation::Residue const & rsd,
168  pose::Pose const & pose,
169  ScoreFunction const & sfxn,
170  EnergyMap & emap
171  ) const;
172 
173 
174  /// @brief Returns false if res is not a proline.
175  bool
177  conformation::Residue const & res
178  ) const;
179 
180  /// @brief This should only be handed a proline.
181  virtual
182  void
184  conformation::Residue const & rsd,
185  ResSingleMinimizationData const & min_data,
186  pose::Pose const & pose,
187  EnergyMap const & weights,
189  ) const;
190 
191  /// @brief ProClosure Energy is context independent and thus
192  /// indicates that no context graphs need to
193  /// be maintained by class Energies
194  virtual
196  utility::vector1< bool > & /*context_graphs_required*/
197  ) const;
198 
199  virtual
200  Distance
202  { return 4.0; }
203 
204 private:
205 
206  /// @brief measure in radians the chi4 between two residues;
207  /// upper_residue must be a proline chi4 is wrapped to be in
208  /// the range [-pi_over_2, 3/2*pi )
209  Real
210  measure_chi4(
211  conformation::Residue const & lower_residue,
212  conformation::Residue const & upper_residue
213  ) const;
214 
215  Real
216  chi4E(
217  Real chi4
218  ) const;
219 
220  Real
221  dchi4E_dchi4(
222  Real chi4
223  ) const;
224 
225  // data
226 private:
227  Real const n_nv_dist_sd_; // coorinate variation stdev
228 
233 
239 virtual
240 core::Size version() const;
241 
242 };
243 
244 } // methods
245 } // scoring
246 } // core
247 
248 
249 #endif // INCLUDED_core_scoring_EtableEnergy_HH