24 #include <ObjexxFCL/FArray1D.hh>
28 #include <numeric/random/random.hh>
35 #include <basic/options/keys/packing.OptionKeys.gen.hh>
37 #include <utility/vector1.hh>
38 #include <basic/options/option.hh>
43 using namespace ObjexxFCL;
44 static numeric::random::RandomGenerator
sab_RG(42454);
56 SimAnnealerBase::SimAnnealerBase
59 FArray1D_int & bestrotamer_at_seqpos,
61 bool start_with_current,
62 FArray1_int & current_rot_index,
64 FArray1D< core::PackerEnergy > & rot_freq
66 num_rots_to_pack_( num_rots_to_pack ),
67 bestrotamer_at_seqpos_(bestrotamer_at_seqpos),
68 bestenergy_(bestenergy),
69 start_with_current_(start_with_current),
70 current_rot_index_(current_rot_index),
71 calc_rot_freq_(calc_rot_freq),
73 outeriterations_( 0 ),
74 inneriterations_( 0 ),
77 hightemp_( hightemp ),
79 temperature_( hightemp_ ),
81 outeriterations_scaling_(1.),
82 inneriterations_scaling_(1.),
83 low_temp_annealing_( false ),
84 disallow_quench_( false )
88 using namespace basic::options;
89 using namespace basic::options::OptionKeys;
242 avgloopE = (loopenergy( nn - 4 ) + loopenergy( nn -3 ) + loopenergy( nn - 2 ))/3.0;
244 if (( loopenergy( nn - 1) - avgloopE ) > -1.0)
340 if ( delta_energy < 0 )
return true;
353 if ( delta_energy < 0 ) {
356 lnprob = beta * delta_energy;
357 if ( previous_energy > 1.0 )
361 lnprob /= previous_energy;
365 probability = std::exp(-lnprob);
366 if ( probability > rg_uniform )
return true;