27 #include <basic/Tracer.hh>
29 #include <numeric/random/random.hh>
32 static numeric::random::RandomGenerator
RG(845099111);
42 static basic::Tracer
TR(
"protocols.swa.monte_carlo.o2star_mover" ) ;
46 namespace monte_carlo {
52 bool const sample_all_o2star,
53 Real const sample_range_small,
54 Real const sample_range_large ):
55 scorefxn_( scorefxn ),
56 sample_all_o2star_( sample_all_o2star ),
57 sample_range_small_( sample_range_small ),
58 sample_range_large_( sample_range_large )
71 apply( pose, move_type );
89 ( *scorefxn_ )( pose );
93 if ( o2star_res > 0 ) {
94 Real const random_number2 =
RG.uniform();
95 if ( random_number2 < 0.5 ){
96 move_type =
"sml-o2star";
99 move_type =
"lrg-o2star";
109 return "RNA_O2StarMover";
117 Real o2star_torsion = pose.
torsion( o2star_torsion_id );
118 o2star_torsion +=
RG.gaussian() * sample_range;
119 pose.
set_torsion( o2star_torsion_id, o2star_torsion );
144 for (
Size k = 1; k <= moving_res_list.size(); k++ ){
145 Size const i = moving_res_list[ k ];
148 iter = energy_graph.get_node( i )->const_edge_list_begin();
152 Size j( (*iter)->get_other_ind( i ) );
157 if ( ( pose.
residue( i ).
xyz( n ) - o2star_other ).length() < DIST_CUTOFF ) {
158 residues_allowed_to_be_packed[ j ] =
true;
164 if (residues_allowed_to_be_packed[ i ])
continue;
168 if ( ( pose.
residue( j ).
xyz( n ) - o2star_i ).length() < DIST_CUTOFF ) {
169 residues_allowed_to_be_packed[ i ] =
true;
179 if ( residues_allowed_to_be_packed[ n ] ) {
180 res_list.push_back( n );
183 if (res_list.size()==0)
return 0;
185 Size const o2star_idx_within_res_list =
int( res_list.size() *
RG.uniform() ) + 1;
186 Size const o2star_num = res_list[ o2star_idx_within_res_list ];