24 #include <numeric/geometry/hashing/SixDHasher.hh>
32 #include <utility/vector1.hh>
54 assert( bin_width > 0 );
55 Real half_witdh = 0.5 * bin_width;
56 for (
Size ii = 1; ii <= 3; ++ii ) {
66 assert( bin_width_degrees > 0 );
67 Real half_width = 0.5 * bin_width_degrees;
68 for (
Size ii = 1; ii <= 3; ++ii ) {
78 for (
Size ii = 1; ii <= 3; ++ii ) {
79 assert( bin_widths( ii ) > 0 );
90 for (
Size ii = 1; ii <= 3; ++ii ) {
91 assert( euler_bin_widths( ii ) > 0 );
109 for (
Size ii = 1; ii <= 3; ++ii ) {
116 for (
Size ii = 1; ii <= 3; ++ii ) {
128 dim_prods_[ 2 ] =
n_xyz_bins_[ 3 ] * dim_prods_[ 3 ];
129 dim_prods_[ 1 ] =
n_xyz_bins_[ 2 ] * dim_prods_[ 2 ];
143 Vector point(
Vector( geom[ 1 ], geom[ 2 ], geom[ 3 ] ));
144 if ( !
bb_.contains( point ) )
return;
149 numeric::geometry::hashing::Bin6D bin;
151 boost::uint64_t bin_index;
152 while ( ! voxiter.
at_end() ) {
155 ActiveVoxelSet::iterator iter =
hash_.find( bin_index );
156 if ( iter ==
hash_.end() ) {
178 for ( ActiveVoxelSet::iterator iter =
hash_.begin(), iter_end =
hash_.end();
179 iter != iter_end; ++iter ) {
197 if ( still_matchable ) {
200 return still_matchable;
207 Vector point(
Vector( geom[ 1 ], geom[ 2 ], geom[ 3 ] ));
208 if ( !
bb_.contains( point ) )
return;
213 numeric::geometry::hashing::Bin6D bin;
215 boost::uint64_t bin_index;
216 while ( ! voxiter.
at_end() ) {
219 ActiveVoxelSet::iterator iter =
hash_.find( bin_index );
220 if ( iter !=
hash_.end() ) {
222 if ( ! (iter->second & mask) ) {
223 iter->second |= mask;
236 using namespace utility;
239 Vector point(
Vector( geom[ 1 ], geom[ 2 ], geom[ 3 ] ));
240 if ( !
bb_.contains( point ) )
return false;
252 numeric::geometry::hashing::Bin6D bin;
254 boost::uint64_t bin_index;
255 while ( ! voxiter.
at_end() ) {
258 ActiveVoxelSet::const_iterator iter =
hash_.find( bin_index );
289 for ( ActiveVoxelSet::iterator
290 iter =
hash_.begin(),
291 iter_end =
hash_.end();
292 iter != iter_end; ) {
293 ActiveVoxelSet::iterator iter_next = iter;
295 if ( iter->second == 0 ) {
309 fout.open( kin_file_name.c_str() );
335 Vector point(
Vector( geom[ 1 ], geom[ 2 ], geom[ 3 ] ));
336 assert(
bb_.contains( point ));
343 for (
Size ii = 1; ii <= 3; ++ii ) {
346 lower += local_lower;
347 upper += local_lower;
348 for (
Size ii = 1; ii <= 3; ++ii ) {
352 for (
Size ii = 1; ii <= 3; ++ii ) {
353 if ( point( ii ) - lower( ii ) > 0.5 ) {
359 for (
Size ii = 1; ii <= 3; ++ii )
if ( lower( ii ) <
bb_.lower()( ii ) ) lower( ii ) =
bb_.lower()( ii );
360 for (
Size ii = 1; ii <= 3; ++ii ) if ( upper( ii ) >
bb_.upper()( ii ) ) upper( ii ) =
bb_.upper()( ii );
371 assert( pos > 0 && pos <= 64 );
383 case 9:
return 0x0100;
384 case 10:
return 0x0200;
385 case 11:
return 0x0400;
386 case 12:
return 0x0800;
387 case 13:
return 0x1000;
388 case 14:
return 0x2000;
389 case 15:
return 0x4000;
390 case 16:
return 0x8000;
392 case 17:
return 0x010000;
393 case 18:
return 0x020000;
394 case 19:
return 0x040000;
395 case 20:
return 0x080000;
396 case 21:
return 0x100000;
397 case 22:
return 0x200000;
398 case 23:
return 0x400000;
399 case 24:
return 0x800000;
401 case 25:
return 0x01000000;
402 case 26:
return 0x02000000;
403 case 27:
return 0x04000000;
404 case 28:
return 0x08000000;
405 case 29:
return 0x10000000;
406 case 30:
return 0x20000000;
407 case 31:
return 0x40000000;
408 case 32:
return 0x80000000;
410 case 33:
return 0x0100000000LL;
411 case 34:
return 0x0200000000LL;
412 case 35:
return 0x0400000000LL;
413 case 36:
return 0x0800000000LL;
414 case 37:
return 0x1000000000LL;
415 case 38:
return 0x2000000000LL;
416 case 39:
return 0x4000000000LL;
417 case 40:
return 0x8000000000LL;
419 case 41:
return 0x010000000000LL;
420 case 42:
return 0x020000000000LL;
421 case 43:
return 0x040000000000LL;
422 case 44:
return 0x080000000000LL;
423 case 45:
return 0x100000000000LL;
424 case 46:
return 0x200000000000LL;
425 case 47:
return 0x400000000000LL;
426 case 48:
return 0x800000000000LL;
428 case 49:
return 0x01000000000000LL;
429 case 50:
return 0x02000000000000LL;
430 case 51:
return 0x04000000000000LL;
431 case 52:
return 0x08000000000000LL;
432 case 53:
return 0x10000000000000LL;
433 case 54:
return 0x20000000000000LL;
434 case 55:
return 0x40000000000000LL;
435 case 56:
return 0x80000000000000LL;
437 case 57:
return 0x0100000000000000LL;
438 case 58:
return 0x0200000000000000LL;
439 case 59:
return 0x0400000000000000LL;
440 case 60:
return 0x0800000000000000LL;
441 case 61:
return 0x1000000000000000LL;
442 case 62:
return 0x2000000000000000LL;
443 case 63:
return 0x4000000000000000LL;
444 case 64:
return 0x8000000000000000LL;
447 utility_exit_with_message(
"Critical Error in OccupiedSpaceHash::bitmask_for_position. position outside of range [1 .. 64]. Cannot continue." );
454 boost::uint64_t index( 0 );
455 for (
Size ii = 1; ii <= 6; ++ii ) {