Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
numeric::geometry::hashing::SixDCoordinateBinner Class Reference

Bin the six degrees of freedom that describe the downstream geometry of a hit. These degrees of freedom are, in order, the x, y and z coordinates of orientation atom3, and the phi, psi, and theta euler angles that describe the orientation of the coordinate frame at orientation atom 3. The binner is responsible for maintaining the lower corner of the 6-d space – the first two Euler angles wrap at 360; the third Euler angle, theta, does not wrap in the same way. See the comments for the bin6 method. More...

#include <SixDHasher.hh>

Inheritance diagram for numeric::geometry::hashing::SixDCoordinateBinner:
Inheritance graph
[legend]

Public Types

typedef numeric::Real Real
 
typedef numeric::Size Size
 
typedef numeric::xyzVector
< numeric::Real
Vector
 
typedef
numeric::geometry::BoundingBox
< Vector
BoundingBox
 
- Public Types inherited from utility::pointer::ReferenceCount
typedef platform::Size Size
 
typedef platform::Size size_type
 

Public Member Functions

 ~SixDCoordinateBinner () override
 Automatically generated virtual destructor for class deriving directly from ReferenceCount. More...
 
 SixDCoordinateBinner (BoundingBox const &bounding_box, Size3 const &euler_offsets, utility::fixedsizearray1< Real, 6 > bin_widths)
 
bool contains (Real6 const &point) const
 
void tree_init (Size max_radius)
 
Bin6D bin6 (Real6 const &values) const
 Construct the discrete representation of a six-dimensional vector of reals representing an xyz coordinate in its first three dimensions and a set of three Euler angles in the last three dimensions. Precondition: The xyz coordinate must be inside the bounding box of this binner. Precondition: The euler angles should be in degrees; the first two should be in the range between 0 and 360, the third should be in the range from 0 to 180. More...
 
Bin6D halfbin6 (Real6 const &values) const
 Determine halfbin index for a point in 6D i.e., how far from the lower corner of the point's containing 6D voxel is the point – is it more than halfway to the next 6D voxel? Each dimension returned will hold a 0 or a 1. More...
 
boost::uint64_t bin_index (Bin6D const &bin) const
 functor used by boost (and sgi's stl) hash classes. More...
 
boost::uint64_t bin_index (Real6 const &values) const
 compute the bin index (64-bit int) for a 6D point. More...
 
std::vector< boost::uint64_tradial_bin_index (numeric::Size radius, Real6 const &center) const
 
Bin6D bin_from_index (boost::uint64_t index) const
 
Real6 bin_center_point (Bin6D const &bin) const
 
BoundingBox bounding_volume_from_index (boost::uint64_t index) const
 
BoundingBox const & bounding_box () const
 
Real3 const & euler_offsets () const
 
Real6 const & bin_widths () const
 
Real6 const & halfbin_widths () const
 
Size6 const & dimsizes () const
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
 ReferenceCount ()
 Default constructor. More...
 
virtual ~ReferenceCount ()
 

Private Member Functions

 SixDCoordinateBinner ()
 
Real3 wrap_euler_angles (Real6 const &values) const
 

Private Attributes

BoundingBox bounding_box_
 
Size6 dimsizes_
 
Size6 dimprods_
 
Real6 bin_widths_
 
Real6 halfbin_widths_
 
Real3 euler_offsets_
 
SixDOffsetTree offset_tree_
 

Detailed Description

Bin the six degrees of freedom that describe the downstream geometry of a hit. These degrees of freedom are, in order, the x, y and z coordinates of orientation atom3, and the phi, psi, and theta euler angles that describe the orientation of the coordinate frame at orientation atom 3. The binner is responsible for maintaining the lower corner of the 6-d space – the first two Euler angles wrap at 360; the third Euler angle, theta, does not wrap in the same way. See the comments for the bin6 method.

Member Typedef Documentation

Constructor & Destructor Documentation

numeric::geometry::hashing::SixDCoordinateBinner::~SixDCoordinateBinner ( )
overridedefault

Automatically generated virtual destructor for class deriving directly from ReferenceCount.

Auto-generated virtual destructor

numeric::geometry::hashing::SixDCoordinateBinner::SixDCoordinateBinner ( )
privatedefault
numeric::geometry::hashing::SixDCoordinateBinner::SixDCoordinateBinner ( BoundingBox const &  bounding_box,
Size3 const &  euler_offsets,
utility::fixedsizearray1< Real, 6 >  bin_widths 
)

Member Function Documentation

Bin6D numeric::geometry::hashing::SixDCoordinateBinner::bin6 ( Real6 const &  values) const

Construct the discrete representation of a six-dimensional vector of reals representing an xyz coordinate in its first three dimensions and a set of three Euler angles in the last three dimensions. Precondition: The xyz coordinate must be inside the bounding box of this binner. Precondition: The euler angles should be in degrees; the first two should be in the range between 0 and 360, the third should be in the range from 0 to 180.

When floating point comparison breaks down, it is possible to have a point hash outside of the bounding volume: 359.999999 / 10.0 -> 36 instead of 35. For this reason, it's important to mod the resulting bin index by the number of bins.

References bin_widths_, bounding_box_, numeric::geometry::BoundingBox< typename >::contains(), dimsizes_, numeric::geometry::BoundingBox< typename >::lower(), wrap_euler_angles(), numeric::xyzVector< typename >::x(), numeric::xyzVector< typename >::y(), and numeric::xyzVector< typename >::z().

Referenced by bin_index(), halfbin6(), and radial_bin_index().

Real6 numeric::geometry::hashing::SixDCoordinateBinner::bin_center_point ( Bin6D const &  bin) const
Bin6D numeric::geometry::hashing::SixDCoordinateBinner::bin_from_index ( boost::uint64_t  index) const
inline
boost::uint64_t numeric::geometry::hashing::SixDCoordinateBinner::bin_index ( Bin6D const &  bin) const
inline

functor used by boost (and sgi's stl) hash classes.

References ObjexxFCL::format::A(), dimprods_, and dimsizes_.

Referenced by bin_index(), and radial_bin_index().

boost::uint64_t numeric::geometry::hashing::SixDCoordinateBinner::bin_index ( Real6 const &  values) const
inline

compute the bin index (64-bit int) for a 6D point.

References basic::options::OptionKeys::lh::fragpdb::bin, bin6(), and bin_index().

Real6 const& numeric::geometry::hashing::SixDCoordinateBinner::bin_widths ( ) const
inline

References bin_widths_.

BoundingBox const& numeric::geometry::hashing::SixDCoordinateBinner::bounding_box ( ) const
inline

References bounding_box_.

BoundingBox numeric::geometry::hashing::SixDCoordinateBinner::bounding_volume_from_index ( boost::uint64_t  index) const
inline
bool numeric::geometry::hashing::SixDCoordinateBinner::contains ( Real6 const &  point) const
inline
Size6 const& numeric::geometry::hashing::SixDCoordinateBinner::dimsizes ( ) const
inline

References dimsizes_.

Real3 const& numeric::geometry::hashing::SixDCoordinateBinner::euler_offsets ( ) const
inline

References euler_offsets_.

Bin6D numeric::geometry::hashing::SixDCoordinateBinner::halfbin6 ( Real6 const &  values) const

Determine halfbin index for a point in 6D i.e., how far from the lower corner of the point's containing 6D voxel is the point – is it more than halfway to the next 6D voxel? Each dimension returned will hold a 0 or a 1.

References basic::options::OptionKeys::lh::fragpdb::bin, bin6(), bin_widths_, bounding_box_, halfbin_widths_, test.T200_Scoring::ii, numeric::geometry::BoundingBox< typename >::lower(), and wrap_euler_angles().

Real6 const& numeric::geometry::hashing::SixDCoordinateBinner::halfbin_widths ( ) const
inline

References halfbin_widths_.

std::vector< boost::uint64_t > numeric::geometry::hashing::SixDCoordinateBinner::radial_bin_index ( numeric::Size  radius,
Real6 const &  center 
) const
void numeric::geometry::hashing::SixDCoordinateBinner::tree_init ( Size  max_radius)
inline
Real3 numeric::geometry::hashing::SixDCoordinateBinner::wrap_euler_angles ( Real6 const &  values) const
private

When using a particular set of offsets, make sure that the euler angles wrap so that neighboring points in 6D actually fall into the same bins. The logic here is tested thuroughly in Hasher.cxxtest.hh

References euler_offsets_.

Referenced by bin6(), and halfbin6().

Member Data Documentation

Real6 numeric::geometry::hashing::SixDCoordinateBinner::bin_widths_
private
BoundingBox numeric::geometry::hashing::SixDCoordinateBinner::bounding_box_
private
Size6 numeric::geometry::hashing::SixDCoordinateBinner::dimprods_
private
Size6 numeric::geometry::hashing::SixDCoordinateBinner::dimsizes_
private
Real3 numeric::geometry::hashing::SixDCoordinateBinner::euler_offsets_
private
Real6 numeric::geometry::hashing::SixDCoordinateBinner::halfbin_widths_
private
SixDOffsetTree numeric::geometry::hashing::SixDCoordinateBinner::offset_tree_
private

Referenced by radial_bin_index(), and tree_init().


The documentation for this class was generated from the following files: