Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MMLJEnergyInter.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/MMLJEnergyInter.hh
11 /// @brief molecular mechanics lj energy
12 /// @author P. Douglas Renfrew (renfrew@unc.edu)
13 
14 #ifndef INCLUDED_core_scoring_methods_MMLJEnergyInter_hh
15 #define INCLUDED_core_scoring_methods_MMLJEnergyInter_hh
16 
17 // Unit headers
19 // AUTO-REMOVED #include <core/scoring/mm/MMLJLibrary.hh>
21 
23 
24 // Package headers
27 
29 // AUTO-REMOVED #include <core/scoring/trie/RotamerTrie.fwd.hh>
30 // AUTO-REMOVED #include <core/scoring/trie/TrieCountPairBase.hh>
31 
32 // Project headers
33 #include <core/pose/Pose.fwd.hh>
34 #include <core/types.hh>
35 
36 // C++ headers
37 #include <iostream>
38 
40 #include <utility/vector1.hh>
41 
42 
43 namespace core {
44 namespace scoring {
45 namespace methods {
46 
48 public:
50 public:
51 
52  /// ctor
54 
55  /// clone
56  virtual
58  clone() const;
59 
60  void
62  pose::Pose & pose,
63  ScoreFunction const & sfxn,
64  kinematics::MinimizerMapBase const & min_map
65  ) const;
66 
67  ///
68  virtual
69  void
71  pose::Pose & pose,
74  ) const;
75 
76  // Creates a rotamer trie for the input set of rotamers and stores the trie
77  // in the rotamer set.
78  virtual
79  void
81  pose::Pose const & pose,
82  conformation::RotamerSetBase & set ) const;
83 
84  // Updates the cached rotamer trie for a residue if it has changed during the course of
85  // a repacking
86  virtual
87  void
88  update_residue_for_packing( pose::Pose & pose, Size resid ) const;
89 
90  ///
91  virtual
92  void
94  conformation::Residue const & rsd1,
95  conformation::Residue const & rsd2,
96  pose::Pose const & pose,
97  ScoreFunction const &,
98  EnergyMap & emap
99  ) const;
100 
101  virtual
102  void
104  id::AtomID const & id,
105  pose::Pose const & pose,
106  kinematics::DomainMap const & /* domain_map*/,
107  ScoreFunction const & /*sfxn*/,
108  EnergyMap const & weights,
109  Vector & F1,
110  Vector & F2
111  ) const;
112 
113  virtual
114  bool
115  defines_intrares_energy( EnergyMap const & ) const;
116 
117  virtual
118  void
120  conformation::Residue const & rsd,
121  pose::Pose const & pose,
122  ScoreFunction const & sfxn,
123  EnergyMap & emap
124  ) const;
125 
126  virtual
127  void
129  conformation::RotamerSetBase const & set1,
130  conformation::RotamerSetBase const & set2,
131  pose::Pose const & pose,
132  ScoreFunction const & sfxn,
133  EnergyMap const & weights,
134  ObjexxFCL::FArray2D< core::PackerEnergy > & energy_table
135  ) const;
136 
137  //@brief overrides default rotamer/background energy calculation and uses
138  // the trie-vs-trie algorithm instead
139  virtual
140  void
142  conformation::RotamerSetBase const & set,
143  conformation::Residue const & residue,
144  pose::Pose const & pose,
145  ScoreFunction const & sfxn,
146  EnergyMap const & weights,
148  ) const;
149 
150  /// @brief MMLJEnergyInter does not have an atomic interation threshold
151  virtual
152  Distance
154 
155  /// @brief MMLJEnergyInter is context independent; indicates that no context graphs are required
156  virtual
157  void
159 
160  /// @brief required for neighbor list and to be more lke the ETable
163  Size res1,
164  Size res2,
165  pose::Pose const & pose,
166  ScoreFunction const & sfxn
167  ) const;
168 
169  /// @brief required for neighbor list and to be more lke the ETable
172  conformation::Residue const & res1,
173  conformation::Residue const & res2,
174  pose::Pose const & pose,
175  ScoreFunction const & sfxn
176  ) const;
177 
178  /// @brief required for neighbor list and to be more lke the ETable
181  conformation::Residue const & res,
182  pose::Pose const & pose,
183  ScoreFunction const & sfxn
184  ) const;
185 
188  conformation::RotamerSetBase const & rotset,
189  pose::Pose const & pose
190  ) const;
191 
194  conformation::Residue const & res,
195  pose::Pose const & pose
196  ) const;
197 
198  // Hooks for trie algorithms
199 
200  /// How close do two heavy atoms have to be such that their hydrogen atoms might interact?
201  /// max heavy-to-hydrogen distance ( MAGIC NUMBER!!!! FIX IT ) + atom-pair interaction distance.
202  Real
204  {
206  }
207 
208  Real
210  {
211  return ( potential_.max_dist() + 2 * 1.468 ); // HR3 has the largest hydrogen radii @ 1.468
212  }
213 
216  conformation::Residue const & res1,
217  conformation::Residue const & res2,
220  pose::Pose const & pose,
221  ScoreFunction const & sfxn
222  ) const;
223 
226  conformation::RotamerSetBase const & set1,
227  conformation::RotamerSetBase const & set2,
228  pose::Pose const & pose,
229  ScoreFunction const & sfxn
230  ) const;
231 
232  inline
236  DistanceSquared & d2,
237  Size & path_dist
238  ) const
239  {
240  Real rep(0), atr(0);
241  potential_.score( at1.mm_atom_type(), at2.mm_atom_type(), path_dist, d2, rep, atr );
242  return rep + atr;
243 
244  }
245 
246  inline
250  Size & path_dist
251  ) const
252  {
253  Real dist_squared( at1.xyz().distance_squared( at2.xyz() ) );
254  Real rep(0), atr(0);
255  potential_.score( at1.mm_atom_type(), at2.mm_atom_type(), path_dist, dist_squared, rep, atr );
256  return rep + atr;
257  }
258 
259  inline
263  Size & path_dist
264  ) const
265  {
266  Real dist_squared( at1.xyz().distance_squared( at2.xyz() ) );
267  Real rep(0), atr(0);
268  potential_.score( at1.mm_atom_type(), at2.mm_atom_type(), path_dist, dist_squared, rep, atr );
269  return rep + atr;
270  }
271 
272  inline
276  Size & path_dist
277  ) const
278  {
279  Real dist_squared( at1.xyz().distance_squared( at2.xyz() ) );
280  Real rep(0), atr(0);
281  potential_.score( at1.mm_atom_type(), at2.mm_atom_type(), path_dist, dist_squared, rep, atr );
282  return rep + atr;
283  }
284 
285 
286  // stuff for bump check
287  virtual
288  void
290  conformation::Residue const & rsd1,
291  conformation::Residue const & rsd2,
292  pose::Pose const & pose,
293  ScoreFunction const & sfxn,
294  EnergyMap & emap
295  ) const;
296 
297  virtual
298  void
300  conformation::Residue const & rsd1,
301  conformation::Residue const & rsd2,
302  pose::Pose const & pose,
303  ScoreFunction const & sfxn,
304  EnergyMap & emap
305  ) const;
306 
307 private:
309 virtual
310 core::Size version() const;
311 
312 };
313 
314 } // namespace methods
315 } // namespace scoring
316 } // namespace core
317 
318 
319 #endif // INCLUDED_core_scoring_methods_MMLJEnergyInter_HH