Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Functions | Variables
numeric::geometry Namespace Reference

Namespaces

 hashing
 

Classes

class  BoundingBox
 3d axis aligned bounding box class More...
 

Functions

Real residual_squared_of_points_to_plane (utility::vector1< xyzVector< Real > > const &point_coords, xyzVector< Real > const &vector_normal_to_plane)
 Return the R-squared value, indicating how well one or more points lie in a given plane, if those points were shifted such that their centroid were at the origin. More...
 
xyzVector< numeric::Realmake_plane_from_three_points (xyzVector< Real > const &p1, xyzVector< Real > const &p2, xyzVector< Real > const &p3)
 
bool are_coplanar (utility::vector1< xyzVector< Real > > const &ring_point_coords)
 
xyzVector< Realvector_normal_to_ring_plane_of_best_fit (utility::vector1< xyzVector< Real > > const &ring_point_coords, bool co_planar_check=true)
 Return the vector normal to the plane of best fit of a ring. More...
 

Variables

xyzVector< Real > const ZERO_VECTOR = xyzVector< Real >( 0.0 )
 A zero-length vector to represent a non-plane or a point at the origin. More...
 

Function Documentation

bool numeric::geometry::are_coplanar ( utility::vector1< xyzVector< Real > > const &  ring_point_coords)
xyzVector< numeric::Real > numeric::geometry::make_plane_from_three_points ( xyzVector< Real > const &  p1,
xyzVector< Real > const &  p2,
xyzVector< Real > const &  p3 
)
Real numeric::geometry::residual_squared_of_points_to_plane ( utility::vector1< xyzVector< Real > > const &  point_coords,
xyzVector< Real > const &  vector_normal_to_plane 
)

Return the R-squared value, indicating how well one or more points lie in a given plane, if those points were shifted such that their centroid were at the origin.

This function takes a list of coordinates of points and measures and sums the residual values of each relative to the plane, which is provided by its normal vector as a parameter to the function.

Parameters
<point_coords>A list of Cartesian coordinates for one or more points.
<vector_normal_to_plane>The vector describing the plane, which is assumed to pass through the origin.
Returns
The sum of the squares of the R values of each point relative to the plane. If A) the given points all lie in the same plane and B) that plane is oriented parallel to the given plane, R-squared will be zero.

References numeric::center_of_mass(), numeric::xyzVector< typename >::dot(), and ZERO_VECTOR.

xyzVector< Real > numeric::geometry::vector_normal_to_ring_plane_of_best_fit ( utility::vector1< xyzVector< Real > > const &  ring_point_coords,
bool  co_planar_check 
)

Return the vector normal to the plane of best fit of a ring.

This function takes a list of coordinates of the points of a ring of any size, calculates the plane of best fit, and returns the vector normal to that plane.

Parameters
<ring_point_coords>A list of Cartesian coordinates for the points of a monocyclic ring system in sequence.
Returns
The normal vector to the plane of best fit or (0.0, 0.0, 0.0) if the list of coordinates given contains less than three points.

References are_coplanar(), utility::arg_min(), numeric::center_of_mass(), basic::options::OptionKeys::in::file::centroid, ObjexxFCL::index(), test.T110_numeric::m, make_plane_from_three_points(), numeric::linear_algebra::svdcmp(), test.T850_SubClassing::v, numeric::statistics::w(), numeric::xyzVector< typename >::x(), numeric::xyzVector< typename >::y(), numeric::xyzVector< typename >::z(), and ZERO_VECTOR.

Variable Documentation

xyzVector< Real > const numeric::geometry::ZERO_VECTOR = xyzVector< Real >( 0.0 )

A zero-length vector to represent a non-plane or a point at the origin.

Referenced by residual_squared_of_points_to_plane(), and vector_normal_to_ring_plane_of_best_fit().