Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BumpSelector.cc
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/pack/rotamer_set/BumpSelector.cc
11 /// @brief bump selector class implementation
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 //Unit headers
16 
17 namespace core {
18 namespace pack {
19 namespace rotamer_set {
20 
22  starting_rot_bumpenergy_( 1e9 ),
23  max_rot_bumpenergy_( 5.0 )
24 {}
25 
26 void
28 {
29  max_rot_bumpenergy_ = setting;
30 }
31 
32 
33 /// @details the bump selector is designed to include one lowest bump energy
34 /// rotamer for each aa-pos if (aoif) all rotamers fail the bump filter
35 /// this function signals the bump selector that a new seqpos+aa+aav
36 /// combination is being started in the rotamer creation loop, which
37 /// resets the selector process to the ground state
38 ///
39 void
41 {
43 }
44 
45 
46 /// @detais the bump selector is designed to include one lowest bump energy
47 /// rotamer for each aa-pos if (aoif) all rotamers fail the bump filter.
48 /// this function decides whether the current rotamer should be deleted, or
49 /// if the previous best rotamer should be deleted and the current rotamer
50 /// should take its place
53  Energy bumpenergy
54 )
55 {
56 
57  //delete_current_rot = false;
58  //delete_previous_rot = false;
59 
60  //static bool use_input_bump_cutoff( truefalseoption("pack_bump_cutoff") );
61  //static float input_bump_cutoff(
62  // use_input_bump_cutoff ? realafteroption("pack_bump_cutoff") : max_rot_bumpenergy );
63 
64  //// determine if the current rot should be erased
65  ////
66  //// reasons:
67  //// 1) it's not the first rot for this aa
68  //// and this rot has an bump energy higher
69  //// than both the bump threshold and the
70  //// that of the best rotamer so far considered
71  ////
72  //// ! note that this introduces an unnecessary
73  //// extra rot w/ include current (?still does?)
74  ////
76  ( bumpenergy > max_rot_bumpenergy_ ) &&
77  ( bumpenergy >= best_rot_bumpenergy_) )
78  {
79  //delete_current_rot = true;
80  return DELETE_ROTAMER;
81  }
82 
83  //// determine if the previous rot should be deleted and
84  //// the current rotamer inserted in its place
85  ////
86  //// reasons:
87  //// 1) the current rot is not the first rot for this aa
88  //// and it has a lower bump energy than the previous
89  //// rot and no rotamers have a bump energy below the
90  //// bump threshold
91  //// 2) the current rot is not the first rot for this aa
92  //// and the current rot is the first rotamer with a
93  //// bump energy lower than the bump threshold
94  ////
96  bumpenergy < best_rot_bumpenergy_ &&
98  {
99  //delete_previous_rot = true;
100  best_rot_bumpenergy_ = bumpenergy;
102  }
103 
104  //// update best bumpenergy
105  ////
106  if ( bumpenergy < best_rot_bumpenergy_ ) {
107  best_rot_bumpenergy_ = bumpenergy;
108  }
109  return KEEP_ROTAMER;
110 
111 }
112 
113 
114 } // rotamer_set
115 } // pack
116 } // core
117