15 #ifndef INCLUDED_core_pack_dunbrack_SingleResidueDunbrackLibrary_hh
16 #define INCLUDED_core_pack_dunbrack_SingleResidueDunbrackLibrary_hh
31 #include <utility/assert.hh>
32 #include <utility/io/izstream.fwd.hh>
33 #include <utility/io/ozstream.fwd.hh>
36 #include <numeric/numeric.functions.hh>
38 #include <utility/vector1.hh>
63 Size const n_rotameric_chi,
220 Size const packed_rotno,
241 assert( -180.0 <= chi && chi <= 180.0 );
244 if ( which_chi == 1 ) {
245 if ( chi > 0 ) {
return 1; }
252 if ( ( chi >= 0.0 ) && ( chi <= 120.0 ) ) {
return 1; }
253 else if ( std::abs(chi) >= 120.0 ) {
return 2; }
261 Real const angle_start,
262 Real const angle_step,
263 Real const ASSERT_ONLY( angle_range ),
272 assert( angle_start <= ang && ang <= angle_start + angle_range );
273 assert( std::abs( nbins * angle_step - angle_range ) < 1e-15 );
275 Real real_bin_lower = ( ang - angle_start ) / angle_step;
276 Size bin_prev =
static_cast< Size > ( real_bin_lower );
277 bin_lower = 1 + numeric::mod( bin_prev, nbins );
278 bin_upper = numeric::mod( bin_lower, nbins ) + 1;
279 angle_alpha = ( (ang - angle_start ) - ( bin_prev * angle_step ) ) / angle_step;
362 #endif // INCLUDED_core_pack_dunbrack_SingleResidueDunbrackLibrary_HH