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