28 #include <utility/exit.hh>
31 #include <utility/vector1.hh>
36 namespace rotamer_set {
44 input_rotamer_samplingrot_index_( 0 ),
45 input_rotamer_rotblock_( 0 ),
47 n_baserots_total_( 0 ),
48 n_samplingrots_total_( 0 )
71 Size count_allowed( 0 );
75 allowed_iter != allowed_end; ++allowed_iter ) {
78 if ( count_allowed == 0 ) {
94 Size count_restype_ind( 0 );
98 allowed_iter != allowed_end; ++allowed_iter ) {
111 samples_[ count_restype_ind ] = dunlib->get_all_rotamer_samples( pose.
phi( resid ), pose.
psi( resid ) );
113 utility_exit_with_message(
"ContinuousRotamerSet cannot support non-Dunbrack rotamer libraries at this time" );
125 for (
Size ii = 1; ii <= res.
natoms(); ++ii ) {
184 return samples_[ which_restype ].size();
225 return samples_[ rotblock_ind ][ rotid_for_aa ];
231 assert( rand_btw_0_and_1 >= 0.0 && rand_btw_0_and_1 <= 1.0 );
232 Real accumulated_prob( 0.0 );
234 for (
Size ii = 1; ii <= nsamples; ++ii ) {
235 accumulated_prob +=
samples_[ rotblock_ind ][ ii ].probability();
237 if ( accumulated_prob > rand_btw_0_and_1 )
return ii;
251 Real const prob_to_accumulate = 0.98;
253 Real cumulative_probability( 0.0 );
256 cumulative_probability +=
samples_[ restype_ind ][ ii ].probability();
257 if ( cumulative_probability > prob_to_accumulate )
break;
270 if ( restype_is_current ) {
289 Size count_moltenres( 0 );
304 Size count_sample_rot = 1;
307 for (
Size jj = 1; jj <= ii_nsamples; ++jj, ++count_sample_rot ) {