Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MembEtable.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file
10 /// @brief
11 /// @author Patrick Barth
12 
13 #ifndef INCLUDED_core_scoring_etable_MembEtable_hh
14 #define INCLUDED_core_scoring_etable_MembEtable_hh
15 
16 // Unit Headers
20 
21 // Package Headers
23 
25 #include <utility/pointer/access_ptr.hh>
26 
27 // ObjexxFCL Headers
28 #include <ObjexxFCL/FArray1D.hh>
29 #include <ObjexxFCL/FArray2D.hh>
30 #include <ObjexxFCL/FArray3D.hh>
31 //#include <ObjexxFCL/FArray5D.hh>
32 
33 #include <utility/pointer/ReferenceCount.hh>
34 
35 // C++ Headers
36 //#include <iosfwd>
37 //#include <list>
38 //#include <string>
39 
40 
41 namespace core {
42 namespace scoring {
43 namespace etable {
44 
45 
46 /// jk Class definition for Etable
47 class MembEtable : public Etable {
48 
49 public:
50  typedef Etable Etable;
51 
52  /// constructor
53  MembEtable(
54  chemical::AtomTypeSetCAP atom_set_in, // like etable namespace
55  EtableOptions const & options,
56  std::string const alternate_parameter_set = ""
57  );
58 
59  //pba needed ?
60  void copy_from( Etable const * source );
61 
62  /// const access to the arrays
63 /* ObjexxFCL::FArray3D< Real > const &
64  ljatr() const
65  {
66  return ljatr_;
67  }
68 
69  ObjexxFCL::FArray3D< Real > const &
70  ljrep() const
71  {
72  return ljrep_;
73  }
74 */
75  ObjexxFCL::FArray3D< Real > const &
76  solv1() const
77  {
78  return solv1_;
79  }
80 
81  ObjexxFCL::FArray3D< Real > const &
82  solv2() const
83  {
84  return solv2_;
85  }
86 
87  //pba
88  ObjexxFCL::FArray3D< Real > const &
89  memb_solv1() const
90  {
91  return memb_solv1_;
92  }
93 
94  //pba
95  ObjexxFCL::FArray3D< Real > const &
96  memb_solv2() const
97  {
98  return memb_solv2_;
99  }
100 
101  /// const access to the deriv arrays
102 /* ObjexxFCL::FArray3D< Real > const &
103  dljatr() const
104  {
105  return dljatr_;
106  }
107 
108  ObjexxFCL::FArray3D< Real > const &
109  dljrep() const
110  {
111  return dljrep_;
112  }
113 */
114  /// @brief return the solvation derivative table for the desolvation of atom1 by atom2
115  ObjexxFCL::FArray3D< Real > const &
116  dsolv1() const
117  {
118  return dsolv1_;
119  }
120 
121  /// @brief return the solvation derivative table that combines atom1 and atom2's desolvations
122  ObjexxFCL::FArray3D< Real > const &
123  dsolv2() const
124  {
125  return dsolv2_;
126  }
127 
128  /// pba @brief return the solvation derivative table for the desolvation of atom1 by atom2
129  ObjexxFCL::FArray3D< Real > const &
130  memb_dsolv1() const
131  {
132  return memb_dsolv1_;
133  }
134 
135  /// pba @brief return the solvation derivative table that combines atom1 and atom2's desolvations
136  ObjexxFCL::FArray3D< Real > const &
137  memb_dsolv2() const
138  {
139  return memb_dsolv2_;
140  }
141 
142  Real
143  max_dis() const
144  {
145  return max_dis_;
146  }
147 
148  Real
150  {
151  return safe_max_dis2;
152  }
153 
154  int
156  {
157  return bins_per_A2;
158  }
159 
161  atom_set() const
162  {
163  return atom_set_;
164  }
165 
166  Real
168  {
170  }
171 
172  ///
173  Real
175  {
176  return nblist_dis2_cutoff_XX_;
177  }
178 
179  ///
180  Real
182  {
183  return nblist_dis2_cutoff_XH_;
184  }
185 
186  ///
187  Real
189  {
190  return nblist_dis2_cutoff_HH_;
191  }
192 
193  /// @brief Returns the maximum lj radius for any non-hydrogen
194  /// atom as defined by the atom-type-set used to create this Etable.
195  Real
197 
198  /// @brief Returns the maximum lj radius for any hydrogen atom as
199  /// defined by the input atom-type-set used to create this Etable.
200  Real
201  max_hydrogen_lj_radius() const;
202 
203  /// set these up in the ctor
204  inline
205  Real
206  lj_radius( int const i ) const
207  {
208  return lj_radius_[i];
209  }
210 /*
211  ///
212  Real
213  lj_wdepth( int const i ) const
214  {
215  return lj_wdepth_[i];
216  }
217 */
218  ///
219  Real
220  lk_dgfree( int const i ) const
221  {
222  return lk_dgfree_[i];
223  }
224 
225  ///
226  Real
227  lk_volume( int const i ) const
228  {
229  return lk_volume_[i];
230  }
231 
232  ///
233  Real
234  lk_lambda( int const i ) const
235  {
236  return lk_lambda_[i];
237  }
238 
239  //pba
240  Real
241  memb_lk_dgfree( int const i ) const
242  {
243  return memb_lk_dgfree_[i];
244  }
245 
246  //pba
247  /*Real
248  lk_dgrefce( int const i ) const
249  {
250  return lk_dgrefce_[i];
251  }*/
252 
253  ObjexxFCL::FArray1D< Real > const &
254  lk_dgrefce() const
255  {
256  return lk_dgrefce_;
257  }
258 
259  //pba
260  /*Real
261  memb_lk_dgrefce( int const i ) const
262  {
263  return memb_lk_dgrefce_[i];
264  }*/
265 
266  ObjexxFCL::FArray1D< Real > const &
268  {
269  return memb_lk_dgrefce_;
270  }
271 
272 private:
273 
274  void
276  ObjexxFCL::FArray3D<Real> & etable,
277  std::string label,
278  std::ostream & out
279  );
280 
281  void
282  input_etable(
283  ObjexxFCL::FArray3D<Real> & etable,
284  const std::string label,
285  std::istream & in
286  );
287 
288 private:
289 
291 
292  // parameters:
293  int const n_atomtypes;
294 
295  // from options
296  Real const max_dis_;
297  int const bins_per_A2;
298  Real const Wradius; // global mod to radii
299  Real const lj_switch_dis2sigma; // actual value used for switch
300  Real const max_dis2;
301  int const etable_disbins;
302 
303  // hard-coded for now
306  bool const lj_use_hbond_radii;
311  bool const lj_use_water_radii;
315  Real const min_dis;
316  Real const min_dis2; // was double
319  Real const epsilon;
327 
328  // these three derived from other data
329 /* Real lj_switch_sigma2dis;
330  Real lj_switch_value2wdepth;
331  Real lj_switch_slope_sigma2wdepth;*/
332 
333  //
335  /*utility::vector1< Real > lj_wdepth_;*/
340  //utility::vector1< Real > lk_dgrefce_; //pba
341  //utility::vector1< Real > memb_lk_dgrefce_; //pba
342  ObjexxFCL::FArray1D< Real > lk_dgrefce_;
343  ObjexxFCL::FArray1D< Real > memb_lk_dgrefce_;
344 
345  // the etables themselves
346 /* ObjexxFCL::FArray3D< Real > ljatr_;
347  ObjexxFCL::FArray3D< Real > ljrep_;*/
348  ObjexxFCL::FArray3D< Real > solv1_;
349  ObjexxFCL::FArray3D< Real > solv2_;
350 /* ObjexxFCL::FArray3D< Real > dljatr_;
351  ObjexxFCL::FArray3D< Real > dljrep_;*/
352  ObjexxFCL::FArray3D< Real > dsolv1_;
353  ObjexxFCL::FArray3D< Real > dsolv2_;
354  ObjexxFCL::FArray3D< Real > memb_solv1_; //pba
355  ObjexxFCL::FArray3D< Real > memb_solv2_; //pba
356  ObjexxFCL::FArray3D< Real > memb_dsolv2_; //pba
357  ObjexxFCL::FArray3D< Real > memb_dsolv1_; //pba
358 
359  // private methods
360 
361  // get the AtomType object corresponding to a give type index
362  chemical::AtomType const &
363  atom_type( int const type )
364  {
365  return (*atom_set_)[ type ];
366  }
367 
368  void smooth_etables();
369  void modify_pot();
370  void make_pairenergy_table();
371 
372  // helper functions
373  void
375  ObjexxFCL::FArray2< Real > & lj_sigma,
376  /*ObjexxFCL::FArray2< Real > & lj_r6_coeff,
377  ObjexxFCL::FArray2< Real > & lj_r12_coeff,
378  ObjexxFCL::FArray2< Real > & lj_switch_intercept,
379  ObjexxFCL::FArray2< Real > & lj_switch_slope,*/
380  ObjexxFCL::FArray1< Real > & lk_inv_lambda2,
381  ObjexxFCL::FArray2< Real > & lk_coeff,
382  ObjexxFCL::FArray2< Real > & memb_lk_coeff, //pba
383  ObjexxFCL::FArray2< Real > & lk_min_dis2sigma_value,
384  ObjexxFCL::FArray2< Real > & memb_lk_min_dis2sigma_value //pba
385  );
386 
387  void
389  Real & dis2,
390  int & atype1,
391  int & atype2,
392 /* Real & atrE,
393  Real & d_atrE,
394  Real & repE,
395  Real & d_repE,*/
396  Real & solvE1,
397  Real & solvE2,
398  Real & dsolvE1,
399  Real & dsolvE2,
400  ObjexxFCL::FArray2< Real > & lj_sigma,
401  /*ObjexxFCL::FArray2< Real > & lj_r6_coeff,
402  ObjexxFCL::FArray2< Real > & lj_r12_coeff,
403  ObjexxFCL::FArray2< Real > & lj_switch_intercept,
404  ObjexxFCL::FArray2< Real > & lj_switch_slope,*/
405  ObjexxFCL::FArray1< Real > & lk_inv_lambda2,
406  ObjexxFCL::FArray2< Real > & lk_coeff,
407  ObjexxFCL::FArray2< Real > & lk_min_dis2sigma_value,
408  Real & memb_solvE1, //pba
409  Real & memb_solvE2,
410  ObjexxFCL::FArray2< Real > & memb_lk_coeff,
411  ObjexxFCL::FArray2< Real > & memb_lk_min_dis2sigma_value,
412  Real & memb_dsolvE1,
413  Real & memb_dsolvE2
414  );
415 
416 /* void
417  zero_hydrogen_and_water_ljatr();*/
418 
419 };
420 
421 } // etable
422 } // scoring
423 } // core
424 
425 #endif