Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GenBornPotential.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/GenBornPotential.fwd.hh
11 /// @brief
12 /// @author
13 
14 
15 #ifndef INCLUDED_core_scoring_GenBornPotential_hh
16 #define INCLUDED_core_scoring_GenBornPotential_hh
17 
19 
20 #include <core/types.hh>
21 // AUTO-REMOVED #include <core/scoring/types.hh>
22 
23 #include <basic/datacache/CacheableData.hh>
24 
26 #include <core/pose/Pose.fwd.hh>
27 //#include <core/pack/task/PackerTask.fwd.hh>
28 //#include <core/pack/rotamer_set/RotamerSet.fwd.hh>
30 #include <core/id/AtomID.fwd.hh>
32 //#include <core//.fwd.hh>
33 
34 // AUTO-REMOVED #include <utility/vector1.hh>
35 #include <utility/pointer/owning_ptr.hh>
36 #include <utility/pointer/ReferenceCount.hh>
37 
38 #include <utility/vector1.hh>
39 
40 
41 //////////////////////////////////////////////////////////////////////////////////
42 //////////////////////////////////////////////////////////////////////////////////
43 //////////////////////////////////////////////////////////////////////////////////
44 /**
45 
46  This is a reimplementation of Jim Havranek's original rosetta++ Gen Born code.
47  source files: rosetta++/gb_elec*
48 
49 **/
50 //////////////////////////////////////////////////////////////////////////////////
51 //////////////////////////////////////////////////////////////////////////////////
52 //////////////////////////////////////////////////////////////////////////////////
53 
54 namespace core {
55 namespace scoring {
56 
57 ////////////////////////////////////////////////////////////////////////////////////////////////////
58 ////////////////////////////////////////////////////////////////////////////////////////////////////
59 ////////////////////////////////////////////////////////////////////////////////////////////////////
60 ////////////////////////////////////////////////////////////////////////////////////////////////////
61 
63 
64 public:
66 
67 public:
68  virtual ~GenBornResidueInfo();
69 
71  clone() const
72  {
73  return new GenBornResidueInfo( *this );
74  }
75 
76 
77  ///
78  GenBornResidueInfo( Residue const & rsd )
79  {
80  initialize( rsd );
81  }
82 
83  ///
84  Size
85  size() const
86  {
87  return atomic_radius_.size();
88  }
89 
90  ///
91  Real
92  atomic_radius( Size const atm ) const
93  {
94  return atomic_radius_[ atm ];
95  }
96 
97  ///
98  Real &
99  atomic_radius( Size const atm )
100  {
101  return atomic_radius_[ atm ];
102  }
103 
104  ///
105  Real
106  born_radius( Size const atm ) const
107  {
108  return born_radius_[ atm ];
109  }
110 
111  ///
112  Real &
113  born_radius( Size const atm )
114  {
115  return born_radius_[ atm ];
116  }
117 
118  ///
119  Real
120  scale_factor( Size const atm ) const
121  {
122  return scale_factor_[ atm ];
123  }
124 
125  ///
126  Real &
127  scale_factor( Size const atm )
128  {
129  return scale_factor_[ atm ];
130  }
131 
132  ///
133  void
134  initialize( Residue const & rsd );
135 
136 private:
140 
141 };
142 
143 
144 ////////////////////////////////////////////////////////////////////////////////////////////////////
145 ////////////////////////////////////////////////////////////////////////////////////////////////////
146 ////////////////////////////////////////////////////////////////////////////////////////////////////
147 ////////////////////////////////////////////////////////////////////////////////////////////////////
148 
149 class GenBornPoseInfo : public basic::datacache::CacheableData {
150 
151 public:
154 
155 public:
156 
158 
159  GenBornPoseInfo( GenBornPoseInfo const & src );
160 
161  basic::datacache::CacheableDataOP
162  clone() const
163  {
164  return new GenBornPoseInfo( *this );
165  }
166 
167  ///
168  Size
169  size() const
170  {
171  return residue_info_.size();
172  }
173 
174  ///
176  residue_info( Size const i )
177  {
178  return *residue_info_[i];
179  }
180 
181  ///
182  GenBornResidueInfo const &
183  residue_info( Size const i ) const
184  {
185  return *residue_info_[i];
186  }
187 
188  ///
189  bool
190  being_packed( Size const seqpos ) const
191  {
192  return being_packed_[ seqpos ];
193  }
194 
195  ///
196  void
197  set_placeholder( Size const i, ResidueOP rsd, GenBornResidueInfoOP info );
198 
199 
200  ///
201  GenBornResidueInfo const &
202  placeholder_info( Size const seqpos ) const
203  {
204  assert( placeholder_info_[ seqpos ] );
205  return *placeholder_info_[ seqpos ];
206  }
207 
208  ///
209  Residue const &
210  placeholder_residue( Size const seqpos ) const
211  {
212  assert( placeholder_residue_[ seqpos ] );
213  return *placeholder_residue_[ seqpos ];
214  }
215 
216  ///
217  void
218  initialize( pose::Pose const & pose );
219 
220 
221  ///
222  void
223  set_repack_list( utility::vector1< bool > const & repacking_residues );
224 
225 private:
226 
227  // these are allocated in initialize
229 
230  // these may be null pointers
233 
234  // stores info from the packertask when setup_for_packing calls set_repack_list
236 
237 };
238 
239 
240 ////////////////////////////////////////////////////////////////////////////////////////////////////
241 ////////////////////////////////////////////////////////////////////////////////////////////////////
242 ////////////////////////////////////////////////////////////////////////////////////////////////////
243 ////////////////////////////////////////////////////////////////////////////////////////////////////
244 
245 class GenBornRotamerSetInfo : public basic::datacache::CacheableData {
246 
247 
248 public:
252 
253 public:
254 
255  ///
257  CacheableData()
258  {
259  residue_info_.resize( src.size() );
260  for ( Size i=1; i<= src.size(); ++i ) {
261  residue_info_[i] = src.residue_info_[i]->clone();
262  }
263  }
264 
265  ///
266  basic::datacache::CacheableDataOP
267  clone() const
268  {
269  return new GenBornRotamerSetInfo( *this );
270  }
271 
272  ///
273  Size
274  size() const
275  {
276  return residue_info_.size();
277  }
278 
279  ///
281  residue_info( Size const i )
282  {
283  return *residue_info_[i];
284  }
285 
286  ///
287  GenBornResidueInfo const &
288  residue_info( Size const i ) const
289  {
290  return *residue_info_[i];
291  }
292 
293 
294  ///
295  GenBornRotamerSetInfo( RotamerSetBase const & rotamer_set )
296  {
297  initialize( rotamer_set );
298  }
299 
300  /// dont forget to 0 the born_radii
301  void
302  initialize( RotamerSetBase const & rotamer_set );
303 
304 
305 private:
307 };
308 
309 
310 ////////////////////////////////////////////////////////////////////////////////////////////////////
311 ////////////////////////////////////////////////////////////////////////////////////////////////////
312 ////////////////////////////////////////////////////////////////////////////////////////////////////
313 ////////////////////////////////////////////////////////////////////////////////////////////////////
314 
316 public:
318 
319 public:
320  /// ctor
322  // Dielectric constants for protein (Ep) and for solvent (Ew)
323  Ep( 4.0 ),
324  Ew( 80.0 ),
325  // Parameters for determination of Generalized Born radii
326  ParamS( 0.09 ),
327  ParamD( 1.00 ),
328  ParamB( 0.80 ),
329  ParamG( 4.850000 ),
330 
331  // More parameters for GB burial
332  Param_TA ( 0.333333333333333 ),
333  Param_TB ( 0.4 ),
334  Param_TC ( 0.42857142857142857143 ),
335  Param_TD ( 0.444444444444444 ),
336  Param_TDD( 0.45454545454545454545 ),
337  Param_TE ( 1.333333333333333 ),
338  Param_TF ( 2.4 ),
339  Param_TG ( 3.42857142857142857143 ),
340  Param_TH ( 4.44444444444444444 ),
341  Param_THH( 5.45454545454545454545 ),
342 
343  dummy_radius( 2.39 ),
344  dummy_scale( 0.80 ),
345  dummy_distance( 2.44 )
346  {}
347 
348 
349 
350  /// called prior to scoring, eg
351  void
352  get_all_born_radii( pose::Pose & pose ) const;
353 
354  ///
355  void
357  pose::Pose & pose,
358  utility::vector1< bool > const & repacking_residues
359  ) const;
360 
361 
362  ///
363  void
365  pose::Pose & pose,
366  Size const seqpos
367  ) const;
368 
369  ///
370  void
372  pose::Pose const & pose,
373  conformation::RotamerSetBase & rotamer_set
374  ) const;
375 
376  ///
377  Real
379  Residue const & rsd1,
380  GenBornResidueInfo const & gb1,
381  Residue const & rsd2,
382  GenBornResidueInfo const & gb2
383  ) const;
384 
385  ///
386  void
388  id::AtomID const & id,
389  Real const weight,
390  pose::Pose const & pose,
391  kinematics::DomainMap const & domain_map,
392  bool const exclude_DNA_DNA,
393  Vector & F1,
394  Vector & F2
395  ) const;
396 
397 private: // these dont all *have* to be private, just not called by anyone else right now
398 
399  ///
400  void
402  Residue const & rsd1,
403  GenBornResidueInfo & gb1,
404  Residue const & rsd2,
405  GenBornResidueInfo const & gb2
406  ) const;
407 
408  /// helper
409  void
410  finalize_born_radii( GenBornResidueInfo & gb_info ) const;
411 
412  ///
413  Real
415  Real const qai,
416  Real const rai,
417  Real const qbi,
418  Real const rbi,
419  Real const dist
420  ) const;
421 
422 
423  ///
424  Real
426  Real const qai,
427  Real const rai,
428  Real const qbi,
429  Real const rbi,
430  Real const dist
431  ) const;
432 
433 
434  ///
435  void
437  Residue const & rsd1,
438  pose::Pose const & pose,
439  GenBornPoseInfo const & gb_info,
440  GenBornResidueInfo & gb1
441  ) const;
442 
443  ///
444  void
446  pose::Pose const & pose,
447  GenBornPoseInfo & gb_info
448  ) const;
449 
450  ///
451  void
453  pose::Pose const & pose,
454  GenBornPoseInfo & gb_info
455  ) const;
456 
457 private:
458 
459  // Dielectric constants for protein (Ep) and for solvent (Ew)
460  Real const Ep;
461  Real const Ew;
462 
463  // Parameters for determination of Generalized Born radii
464  Real const ParamS;
465  Real const ParamD;
466  Real const ParamB;
467  Real const ParamG;
468 
469  // More parameters for GB burial
470  Real const Param_TA;
471  Real const Param_TB;
472  Real const Param_TC;
473  Real const Param_TD;
475  Real const Param_TE;
476  Real const Param_TF;
477  Real const Param_TG;
478  Real const Param_TH;
480 
483  Real const dummy_distance; // also implicitly defined by the gb placeholder params file
484 
485 };
486 
487 
488 
489 
490 
491 } // scoring
492 } // core
493 
494 #endif