Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FASTERAnnealer.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/pack/annealer/FASTERAnnealer.hh
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 #ifndef INCLUDED_core_pack_annealer_FASTERAnnealer_hh
15 #define INCLUDED_core_pack_annealer_FASTERAnnealer_hh
16 
17 // Unit headers
19 
20 // Package headers
21 #include <core/types.hh>
25 
26 // Utility headers
27 #include <utility/vector0.hh>
28 
29 // Objexx Headers
30 #include <ObjexxFCL/FArray1D.hh>
31 #include <ObjexxFCL/FArray2D.hh>
32 
33 #include <utility/vector1.hh>
34 
35 
36 namespace core {
37 namespace pack {
38 namespace annealer {
39 
41 {
42 public:
45 
46 public:
48  ObjexxFCL::FArray1D_int & bestrotamer_at_seqpos,
50  bool start_with_current, // start simulation with current rotamers
53  ObjexxFCL::FArray1_int & current_rot_index,
54  bool calc_rot_freq,
55  ObjexxFCL::FArray1D< core::PackerEnergy > & rot_freq
56  );
57 
58  virtual ~FASTERAnnealer();
59 
60  void run();
61 
62 private:
63  void iBR();
64  void trySeveral_ciBRs();
65  void ciBR();
66  void sBR();
67  void dBR();
68  void finalize_output();
69 
70  void run_quench_cycles();
71 
73  void note_current_network_state( ObjexxFCL::FArray1_int const & netstate );
75  int pick_rotamer_for_node( int node );
77  void shuffle_sBR_rotamers();
78 
79  int hash_recent_history( int history_index );
80 
81 public:
82  void set_ciBR_only( bool setting );
83  void set_num_sa_trajectories( int setting );
84  void set_sa_length_scale( Real setting );
85  //void set_sBR_limit( int setting ); // -1 for "run until completion"
86 private:
87 
90  int const num_nodes_;
91 
92  ObjexxFCL::FArray2D_int recent_network_state_history_;
93  ObjexxFCL::FArray1D_int recent_history_hash_values_;
94  ObjexxFCL::FArray1D_int recent_history_hash_count_;
98 
99  static int const recent_history_size_ = 100;
100  static int const hash_size_ = 2017; //prime
101 
104 
106  int num_sa_trajectories_; // default of 5
109 
110  //ObjexxFCL::FArray1D_int moltenres_2_resid_;
111  //ObjexxFCL::FArray1D_int moltenres_rotoffsets_;
112  //ObjexxFCL::FArray2D_int rot_2_moltenres_;
113 
114 };
115 
116 }
117 }
118 }
119 
120 #endif