Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LK_hack.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/LK_hack.hh
11 /// @brief LK Solvation using hemisphere culling class declaration
12 /// @author David Baker
13 /// @author Andrew Leaver-Fay
14 
15 
16 #ifndef INCLUDED_core_scoring_methods_LK_hack_hh
17 #define INCLUDED_core_scoring_methods_LK_hack_hh
18 
19 // Unit Headers
21 
22 // Package headers
27 
28 // Project headers
29 #include <core/pose/Pose.fwd.hh>
30 
31 // Utility headers
32 // AUTO-REMOVED #include <utility/vector1.hh>
33 
34 #include <utility/vector1.hh>
35 #include <ObjexxFCL/FArray3D.fwd.hh>
36 
37 
38 namespace core {
39 namespace scoring {
40 namespace methods {
41 
42 ///
44 public:
46 public:
47 
48  LK_hack( etable::Etable const & etable_in );
49 
50 
51  /// clone
52  virtual
54  clone() const;
55 
56  LK_hack( LK_hack const & src );
57 
58  virtual
59  void
61  pose::Pose & pose,
62  ScoreFunction const & scfxn
63  ) const;
64 
65  /// called during gradient-based minimization inside dfunc
66  /**
67  F1 and F2 are not zeroed -- contributions from this atom are
68  just summed in
69  **/
70  virtual
71  void
73  id::AtomID const & id,
74  pose::Pose const & pose,
75  kinematics::DomainMap const & domain_map,
76  ScoreFunction const & sfxn,
77  EnergyMap const & weights,
78  Vector & F1,
79  Vector & F2
80  ) const;
81 
82 
83  virtual
84  void
86  conformation::Residue const & rsd1,
87  conformation::Residue const & rsd2,
88  pose::Pose const & pose,
89  ScoreFunction const &,
90  EnergyMap & emap
91  ) const;
92 
93 
94  virtual
95  bool
96  defines_intrares_energy( EnergyMap const & /*weights*/ ) const { return false; }
97 
98  virtual
99  void
101  conformation::Residue const &,
102  pose::Pose const &,
103  ScoreFunction const &,
104  EnergyMap &
105  ) const {}
106 
107  virtual
108  Distance
110 
111 
112  void indicate_required_context_graphs( utility::vector1< bool > & context_graphs_required ) const;
113 
114 private:
115 
116  void
117  allocate_appropriate_memory( pose::Pose const & pose ) const;
118 
119  void
121 
122  void
124 
125  void
127  (
128  pose::Pose const & pose,
129  Size lower_res_id,
130  Size upper_res_id
131  ) const;
132 
133  Real
135  conformation::Atom const & atom1,
136  conformation::Atom const & atom2,
137  Distance const one_over_d,
138  DistanceSquared const d2,
139  Vector & f1_1,
140  Vector & f2_1,
141  Vector & f1_2,
142  Vector & f2_2
143  ) const;
144 
145  void
147 
148 /////////////////////////////////////////////////////////////////////////////
149 // data
150 /////////////////////////////////////////////////////////////////////////////
151 
152 private:
153  etable::Etable const & etable_; // shouldn't this be a pointer? Reference count information is (dangerously) lost when
154  //a reference is taken, instead of a smart pointer. There's the potential for a dangling reference with this.
155 
156 
157  /// these guys are taken from the etable
158  ObjexxFCL::FArray3D< Real > const & solv1_;
159  ObjexxFCL::FArray3D< Real > const & solv2_;
160 
161  ObjexxFCL::FArray3D< Real > const & dsolv1_;
162 
165 
166  /// Used soley when calculating derivatives
167  /// Could/should be moved into the Pose's cachable data.
173  mutable Real lk_hack_weight_; // hold this while calculating derivatives.
174 virtual
175 core::Size version() const;
176 };
177 
178 }
179 }
180 }
181 
182 #endif // INCLUDED_core_scoring_methods_LK_hack_HH