IMP
2.0.1
The Integrative Modeling Platform
|
See IMP.algebra Overview for more information.
Classes | |
class | BoundedGridRangeD |
class | BoundingBoxD |
An axis-aligned bounding box. More... | |
class | Cone3D |
class | Cylinder3D |
class | DefaultEmbeddingD |
struct | DenseGrid3D |
class | DenseGridStorageD |
class | DynamicNearestNeighbor3D |
class | Ellipsoid3D |
class | EuclideanVectorKDMetric |
class | ExtendedGridIndexD |
An index in an infinite grid on space. More... | |
class | FixedXYZ |
A simple class for returning XYZ Euler angles. More... | |
class | FixedZXZ |
A simple class for returning ZXZ Euler angles. More... | |
class | FixedZYZ |
A simple class for returning ZYZ Euler angles. More... | |
class | GeometricPrimitiveD |
class | GridD |
A voxel grid in d-dimensional space space. More... | |
class | GridIndexD |
Represent a real cell in a grid (one within the bounding box) More... | |
class | LinearFit2D |
Calculate line that fits best the input data points (Linear least squares) More... | |
class | LogEmbeddingD |
class | MaxVectorKDMetric |
class | NearestNeighborD |
class | ParabolicFit2D |
Calculate parabola that fits best the input data points. More... | |
class | Plane3D |
class | PrincipalComponentAnalysisD |
class | ReferenceFrame3D |
A reference frame in 3D. More... | |
class | Reflection3D |
Reflect about a plane in 3D. More... | |
class | Rotation2D |
Stores a 2D rotation matrix. More... | |
class | Rotation3D |
3D rotation class. More... | |
class | Segment3D |
struct | SparseGrid3D |
class | SparseGridStorageD |
struct | SparseUnboundedGrid3D |
struct | SparseUnboundedGridD |
class | SphereD |
class | SpherePatch3D |
class | SphericalVector3D |
Class to represent a 3D point in spherical coordinates. More... | |
class | Transformation2D |
Simple 2D transformation class. More... | |
class | Transformation3D |
Simple 3D transformation class. More... | |
class | Triangle3D |
class | UnboundedGridRangeD |
class | VectorD |
A Cartesian vector in D-dimensions. More... | |
class | VectorInputD |
class | VectorInputD< 1 > |
class | VectorKDMetric |
Functions | |
Rotation2D | compose (const Rotation2D &a, const Rotation2D &b) |
compose two rotations a and b More... | |
Transformation3D | compose (const Transformation3D &a, const Transformation3D &b) |
compose two transformations More... | |
Transformation2D | compose (const Transformation2D &a, const Transformation2D &b) |
compose two transformations More... | |
Rotation3D | compose (const Rotation3D &a, const Rotation3D &b) |
Transformation3Ds | get_alignments_from_first_to_second (const PrincipalComponentAnalysisD< 3 > &pca1, const PrincipalComponentAnalysisD< 3 > &pca2) |
bool | get_are_almost_equal (const double a, const double b, const double epsilon) |
Compares two values (intended for doubles) More... | |
bool | get_are_colinear (const Vector3D &p1, const Vector3D &p2, const Vector3D &p3) |
Return true if the three points are co-linear. | |
template<class Geometry > | |
double | get_area (const Geometry &) |
Compute the area of any surface object. | |
std::pair< Vector3D, double > | get_axis_and_angle (const Rotation3D &rot) |
Decompose a Rotation3D object into a rotation around an axis. More... | |
double | get_ball_radius_from_volume_3d (double volume) |
Return the radius of a sphere with a given volume. | |
template<int D> | |
VectorD< D > | get_basis_vector_d (unsigned int coordinate) |
Return the basis vector for the given coordinate. More... | |
VectorD<-1 > | get_basis_vector_kd (int D, unsigned int coordinate) |
Return a dynamically sized basis vector. | |
template<class Geometry > | |
BoundingBoxD< 3 > | get_bounding_box (const Geometry &) |
Compute the bounding box of any geometric object. | |
template<int D, class Storage , class Value , class Embedding > | |
BoundingBoxD< D > | get_bounding_box (const GridD< D, Storage, Value, Embedding > &g) |
double | get_closer_power_of_2 (double x) |
Closest power of 2 for a number, not necessarily higher. | |
template<typename T > | |
T | get_constrained (const T x, const T x0, const T xF) |
Constrains a value between two given limits. | |
std::string | get_data_path (std::string file_name) |
Return the full path to installed data. More... | |
double | get_distance (const Segment3D &s, const Vector3D &p) |
Get the distance between a segment and a point. More... | |
double | get_distance (const Segment3D &a, const Segment3D &b) |
Get the distance between two segments. More... | |
double | get_distance (const Plane3D &pln, const Vector3D &p) |
Return the distance between a plane and a point in 3D. More... | |
template<int D> | |
double | get_distance (const SphereD< D > &a, const SphereD< D > &b) |
Return the distance between the two spheres if they are disjoint. More... | |
double | get_distance (const Rotation3D &r0, const Rotation3D &r1) |
Return a distance between the two rotations. More... | |
template<int D> | |
VectorD< D > | get_elementwise_product (const algebra::VectorD< D > &a, const algebra::VectorD< D > &b) |
template<int D> | |
VectorD< D > | get_elementwise_product (const Ints &a, const algebra::VectorD< D > &b) |
Sphere3D | get_enclosing_sphere (const Sphere3Ds &ss) |
Return a sphere containing the listed spheres. More... | |
Sphere3D | get_enclosing_sphere (const Vector3Ds &ss) |
Return a sphere containing the listed spheres. More... | |
std::string | get_example_path (std::string file_name) |
Return the path to installed example data for this module. More... | |
Rotation2D | get_identity_rotation_2d () |
Builds an identity rotation in 2D. | |
Rotation3D | get_identity_rotation_3d () |
Return a rotation that does not do anything. More... | |
Transformation2D | get_identity_transformation_2d () |
Returns a transformation that does not do anything. | |
Transformation3D | get_identity_transformation_3d () |
Return a transformation that does not do anything. More... | |
template<int D> | |
bool | get_interiors_intersect (const SphereD< D > &a, const SphereD< D > &b) |
Return true if the two balls bounded by the two spheres interesect. | |
Rotation3D | get_interpolated (const Rotation3D &a, const Rotation3D &b, double f) |
Interpolate between two rotations. More... | |
Triangle3D | get_largest_triangle (const Vector3Ds &points) |
Return the largest triangle defined by 3 points from the input. More... | |
template<int D, class Storage , class Value , class Embedding > | |
Value | get_linearly_interpolated (const GridD< D, Storage, Value, Embedding > &g, const VectorD< D > &pt) |
float | get_next_larger_power_of_2 (float x) |
Closest power of 2 that can contain a number x. | |
double | get_next_larger_power_of_2 (double x) |
Closest power of 2 that can contain a number x. | |
template<int D> | |
VectorD< D > | get_ones_vector_d (double v=1) |
Return a vector of ones (or another constant) | |
VectorD<-1 > | get_ones_vector_kd (unsigned int D, double v=1) |
Return a vector of ones (or another constant) | |
template<int D> | |
double | get_power_distance (const SphereD< D > &a, const SphereD< D > &b) |
Return the power distance between the two spheres. More... | |
template<int D> | |
PrincipalComponentAnalysisD< D > | get_principal_components (const base::Vector< VectorD< D > > &ps) |
Perform principal components analysis on a set of vectors. | |
Transformation3D | get_random_local_transformation (Vector3D origin, double max_translation=5., double max_angle_in_rad=0.26) |
Get a local transformation. More... | |
Rotation2D | get_random_rotation_2d () |
Builds an identity rotation in 2D. | |
Rotation3D | get_random_rotation_3d () |
Pick a rotation at random from all possible rotations. More... | |
Rotation3D | get_random_rotation_3d (const Rotation3D ¢er, double distance) |
Pick a rotation at random near the provided one. More... | |
Vector3D | get_reflected (const Plane3D &pln, const Vector3D &p) |
return the point reflected about the plane | |
double | get_relative_projection_on_segment (const Segment3D &s, const algebra::Vector3D &p) |
Rotation3D | get_rotation_about_axis (const Vector3D &axis, double angle) |
Generate a Rotation3D object from a rotation around an axis. More... | |
Transformation3D | get_rotation_about_point (const Vector3D &point, const Rotation3D &rotation) |
Generate a Transformation3D object from a rotation around a point. More... | |
Transformation2D | get_rotation_about_point (const Vector2D &point, const Rotation2D &rotation) |
Generates a Transformation2D object from a rotation around a point. More... | |
Rotation3D | get_rotation_from_matrix (double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) |
Generate a Rotation3D object from a rotation matrix. | |
Rotation3D | get_rotation_from_vector4d (const VectorD< 4 > &v) |
Compute a rotatation from an unnormalized quaternion. More... | |
Rotation3D | get_rotation_from_x_y_axes (const Vector3D &x, const Vector3D &y) |
Rotation3D | get_rotation_taking_first_to_second (const Vector3D &v1, const Vector3D &v2) |
Create a rotation from the first vector to the second one. | |
Rotation2D | get_rotation_to_x_axis (const Vector2D &v) |
template<typename T > | |
int | get_rounded (const T &x) |
Rounds a number to next integer. More... | |
template<typename T > | |
int | get_sign (const T &x) |
Sign of a number. 1 if the number is higher or equal to 0 and -1 otherwise. | |
double | get_squared (double x) |
template<class Geometry > | |
double | get_surface_area (const Geometry &) |
Compute the surface area of any volumetric object. | |
FloatPair | get_surface_area_and_volume (const algebra::Sphere3Ds &ss) |
Transformation3D | get_transformation_3d (const Transformation2D &t2d) |
Builds a 3D transformation from a 2D one. More... | |
template<class Vector3DsOrXYZs0 , class Vector3DsOrXYZs1 > | |
IMP::algebra::Transformation3D | get_transformation_aligning_first_to_second (const Vector3DsOrXYZs0 &source, const Vector3DsOrXYZs1 &target) |
Compute the rigid transform bringing the first point set to the second. More... | |
Transformation2D | get_transformation_aligning_pair (const Vector2Ds &set_from, const Vector2Ds &set_to) |
Transformation3D | get_transformation_from_first_to_second (const ReferenceFrame3D &a, const ReferenceFrame3D &b) |
Transformation3D | get_transformation_from_first_triangle_to_second (Triangle3D first_tri, Triangle3D second_tri) |
Return a transformation between two triangles. | |
ReferenceFrame3D | get_transformed (const ReferenceFrame3D &rf, const Transformation3D &tr) |
BoundingBoxD< 3 > | get_transformed (const BoundingBoxD< 3 > &bb, const Transformation3D &tr) |
Return a bounding box containing the transformed box. | |
template<class Storage , class Embedding > | |
const Storage::Value | get_trilinearly_interpolated (const GridD< 3, Storage, typename Storage::Value, Embedding > &g, const Vector3D &v, const typename Storage::Value &outside=0) |
Use trilinear interpolation to compute a smoothed value at v. More... | |
Rotation3Ds | get_uniform_cover_rotations_3d (unsigned int num_points) |
Cover the space of rotations evenly. More... | |
algebra::Rotation3Ds | get_uniformly_sampled_rotations (double delta) |
Generates a nondegenerate set of Euler angles with a delta resolution. More... | |
template<unsigned int D> | |
SphereD< D > | get_unit_sphere_d () |
SphereD<-1 > | get_unit_sphere_kd (unsigned int d) |
template<int D> | |
VectorD< D > | get_vector_d_geometry (const SphereD< D > &s) |
template<class Geometry > | |
double | get_volume (const Geometry &) |
Compute the volume of any volumetric object. | |
template<int D> | |
VectorD< D > | get_zero_vector_d () |
Return a vector of zeros. | |
VectorD<-1 > | get_zero_vector_kd (int D) |
Return a dynamically sized vector of zeros. | |
void | set_segment_3d_geometry (Segment3D &g, const Segment3D &gi) |
Variables | |
static const double | PI = 3.1415926535897931 |
the constant pi | |
Endian | |
| |
void | reversed_read (void *dest, size_t size, size_t nitems, std::ifstream &f, bool reverse) |
Reads from file in normal or reverse order. More... | |
void | reversed_write (const void *src, size_t size, size_t nitems, std::ofstream &f, bool reverse=false) |
Writes to a file in normal or reversed order. More... | |
template<class T > | |
void | get_swapped_endian (T &x) |
Conversion between little and big endian. Goes both ways. | |
bool | get_is_big_endian () |
Returns 1 if machine is big endian else 0. | |
bool | get_is_little_endian () |
Returns 1 if machine is little endian else 0. | |
Simple geometric IO | |
These functions write geometry to text files, one line per geometric primitive. Each line has the form “x y z” for points or “x y z r” for spheres. We can easily add general dimension support if requested.. Lines beginning with "#" are treated as comments. | |
void | write_pts (const Vector3Ds &vs, base::TextOutput out) |
Write a set of 3D vectors to a file. More... | |
Vector3Ds | read_pts (base::TextInput input) |
Read a set of 3D vectors from a file. More... | |
void | write_spheres (const Sphere3Ds &vs, base::TextOutput out) |
Write a set of 3d spheres to a file. More... | |
Sphere3Ds | read_spheres (base::TextInput input) |
Read a set of 3d spheres from a file. More... | |
Python Only | |
The following functions are only availale in Python as the equivalent C++ functionality is provided via template functions or in other ways that don't directly map to python. | |
typedef Grid3D< int, SparseGridStorage3D< int, BoundedGridStorage3D > > | SparseIntGrid3D |
typedef Grid3D< int, SparseGridStorage3D< int, UnboundedGridStorage3D > > | SparseUnboundedIntGrid3D |
typedef Grid3D< double, DenseGridStorage3D< double > > | DenseDoubleGrid3D |
typedef Grid3D< float, DenseGridStorage3D< float > > | DenseFloatGrid3D |
Transformation3D | get_transformation_aligning_first_to_second (Vector3Ds a, Vector3Ds b) |
Euler Angles | |
There are many conventions for how to define Euler angles, based on choices of which of the x,y,z axis to use in what order and whether the rotation axis is in the body frame (and hence affected by previous rotations) or in in a fixed frame. See http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles for a general description.
| |
typedef IMP::base::Vector < FixedZYZ > | FixedZYZs |
typedef IMP::base::Vector < FixedZXZ > | FixedZXZs |
typedef IMP::base::Vector < FixedXYZ > | FixedXYZs |
Rotation3D | get_rotation_from_fixed_xyz (double xr, double yr, double zr) |
Initialize a rotation in x-y-z order from three angles. More... | |
Rotation3D | get_rotation_from_fixed_zxz (double phi, double theta, double psi) |
Initialize a rotation from euler angles. More... | |
Rotation3D | get_rotation_from_fixed_zyz (double Rot, double Tilt, double Psi) |
Generate a rotation object from Euler Angles. More... | |
FixedZYZ | get_fixed_zyz_from_rotation (const Rotation3D &r) |
The inverse of rotation_from_fixed_zyz() More... | |
FixedZXZ | get_fixed_zxz_from_rotation (const Rotation3D &r) |
The inverse of rotation_from_fixed_zyz() More... | |
FixedXYZ | get_fixed_xyz_from_rotation (const Rotation3D &r) |
The inverse of rotation_from_fixed_xyz() More... | |
Shortest segments | |
These methods return the shortest segment connecting two geometric objects. Such segments can be used to give the direction of the derivative of the distance between the two objects. The 0 point on the segment is in the first passed object and the 1 point is in the second. | |
Segment3D | get_shortest_segment (const Segment3D &s, const Vector3D &p) |
Segment3D | get_shortest_segment (const Segment3D &sa, const Segment3D &sb) |
3D Vectors | |
We provide a specialization of VectorD for 3-space and several additional functions on it. | |
Vector3D | get_vector_product (const Vector3D &p1, const Vector3D &p2) |
Returns the vector product (cross product) of two vectors. | |
Vector3D | get_orthogonal_vector (const Vector3D &v) |
Return a vector that is perpendicular to the given vector. More... | |
Vector3D | get_centroid (const Vector3Ds &ps) |
Returns the centroid of a set of vectors. | |
double | get_radius_of_gyration (const Vector3Ds &ps) |
Return the radius of gyration of a set of points. More... | |
Vector Generators | |
These functions generate vector objects. Some of the methods, those with random in their name, generate a single vector chosen uniformly from the specified domain. Others, the cover methods, generate a set of points distributed (somewhat) evenly over the domain. | |
template<int D> | |
VectorD< D > | get_random_vector_in (const BoundingBoxD< D > &bb) |
Generate a random vector in a box with uniform density. | |
template<int D> | |
VectorD< D > | get_random_vector_on (const BoundingBoxD< D > &bb) |
Generate a random vector on a box with uniform density. | |
template<int D> | |
VectorD< D > | get_random_vector_in (const SphereD< D > &s) |
Generate a random vector in a sphere with uniform density. | |
VectorD< 2 > | get_random_vector_in (const SphereD< 2 > &s) |
Vector3D | get_random_vector_in (const Cylinder3D &c) |
Generate a random vector in a cylinder with uniform density. | |
template<int D> | |
VectorD< D > | get_random_vector_on (const SphereD< D > &s) |
Generate a random vector on a sphere with uniform density. | |
template<int D> | |
base::Vector< VectorD< D > > | get_uniform_surface_cover (const SphereD< D > &s, unsigned int n) |
Generate a set of vectors which covers a sphere uniformly. More... | |
Vector3Ds | get_uniform_surface_cover (const Cylinder3D &cyl, int number_of_points) |
Generate a set of 3d points that uniformly cover a cylinder. | |
template<int D> | |
base::Vector< VectorD< D > > | get_uniform_upper_hemisphere_cover (const SphereD< D > &s, unsigned int n) |
Generate a set of 3D points that uniformly cover a hemisphere. More... | |
Vector3Ds | get_grid_surface_cover (const Cylinder3D &cyl, int number_of_cycles, int number_of_points_on_cycle) |
Generate a grid of 3d points on a cylinder surface. | |
Vector3Ds | get_uniform_surface_cover (const SpherePatch3D &sph, unsigned int number_of_points) |
Generate a set of 3d points that uniformly cover a patch of a sphere. More... | |
Vector3Ds | get_uniform_surface_cover (const Cone3D &cone, unsigned int number_of_points) |
template<int D> | |
base::Vector< VectorD< D > > | get_grid_interior_cover_by_spacing (const BoundingBoxD< D > &bb, double s) |
Vector3Ds | get_random_chain (unsigned int n, double r, const Vector3D &start=Vector3D(0, 0, 0), const Sphere3Ds &obstacles=Sphere3Ds()) |
Generate a random chain with no collisions. More... | |
Norms | |
We define a number of standard, \(L^p\), norms on VectorD.
| |
template<int D> | |
double | get_l2_norm (const VectorD< D > &v) |
template<int D> | |
double | get_l1_norm (const VectorD< D > &v) |
template<int D> | |
double | get_linf_norm (const VectorD< D > &v) |
typedef BoundingBoxD<1> IMP::algebra::BoundingBox1D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox1D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<2> IMP::algebra::BoundingBox2D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox2D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<3> IMP::algebra::BoundingBox3D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox3D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<4> IMP::algebra::BoundingBox4D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox4D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<5> IMP::algebra::BoundingBox5D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox5D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<6> IMP::algebra::BoundingBox6D |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBox6D .
Definition at line 165 of file BoundingBoxD.h.
typedef BoundingBoxD<-1> IMP::algebra::BoundingBoxKD |
Typedef for python.
Definition at line 165 of file BoundingBoxD.h.
Pass or store a set of BoundingBoxKD .
Definition at line 165 of file BoundingBoxD.h.
typedef IMP::base::Vector< Cone3D > IMP::algebra::Cone3Ds |
typedef IMP::base::Vector< Cylinder3D > IMP::algebra::Cylinder3Ds |
Pass or store a set of Cylinder3D .
Definition at line 85 of file Cylinder3D.h.
typedef Grid3D<double, DenseGridStorage3D<double> > IMP::algebra::DenseDoubleGrid3D |
A grid of doubles over a region of space.
Definition at line 92 of file algebra/python_only.h.
typedef Grid3D<float, DenseGridStorage3D<float> > IMP::algebra::DenseFloatGrid3D |
A grid of floats over a region of space.
Definition at line 95 of file algebra/python_only.h.
Pass or store a set of Ellipsoid3D .
Definition at line 66 of file Ellipsoid3D.h.
typedef IMP::base::Vector< FixedXYZ > IMP::algebra::FixedXYZs |
Pass or store a set of FixedXYZ .
Definition at line 476 of file Rotation3D.h.
typedef IMP::base::Vector< FixedZXZ > IMP::algebra::FixedZXZs |
Pass or store a set of FixedZXZ .
Definition at line 452 of file Rotation3D.h.
typedef IMP::base::Vector< FixedZYZ > IMP::algebra::FixedZYZs |
Pass or store a set of FixedZYZ .
Definition at line 426 of file Rotation3D.h.
Pass or store a set of LinearFit2D .
Definition at line 54 of file LinearFit.h.
Pass or store a set of ParabolicFit2D .
Definition at line 56 of file ParabolicFit.h.
typedef IMP::base::Vector< Plane3D > IMP::algebra::Plane3Ds |
Pass or store a set of ReferenceFrame3D .
Definition at line 84 of file ReferenceFrame3D.h.
Pass or store a set of Reflection3D .
Definition at line 37 of file Reflection3D.h.
typedef IMP::base::Vector< Rotation2D > IMP::algebra::Rotation2Ds |
Pass or store a set of Rotation2D .
Definition at line 123 of file Rotation2D.h.
typedef IMP::base::Vector< Rotation3D > IMP::algebra::Rotation3Ds |
Pass or store a set of Rotation3D .
Definition at line 220 of file Rotation3D.h.
typedef IMP::base::Vector< Segment3D > IMP::algebra::Segment3Ds |
Pass or store a set of Segment3D .
Definition at line 54 of file Segment3D.h.
typedef Grid3D<int, SparseGridStorage3D<int, BoundedGridStorage3D> > IMP::algebra::SparseIntGrid3D |
A sparse grid of integers over a bounded region of space.
Definition at line 85 of file algebra/python_only.h.
typedef Grid3D<int, SparseGridStorage3D<int, UnboundedGridStorage3D> > IMP::algebra::SparseUnboundedIntGrid3D |
A sparse grid of integers over all of space.
Definition at line 89 of file algebra/python_only.h.
typedef SphereD<1> IMP::algebra::Sphere1D |
typedef IMP::base::Vector< Sphere1D > IMP::algebra::Sphere1Ds |
typedef SphereD<2> IMP::algebra::Sphere2D |
typedef IMP::base::Vector< Sphere2D > IMP::algebra::Sphere2Ds |
typedef SphereD<3> IMP::algebra::Sphere3D |
typedef IMP::base::Vector< Sphere3D > IMP::algebra::Sphere3Ds |
typedef SphereD<4> IMP::algebra::Sphere4D |
typedef IMP::base::Vector< Sphere4D > IMP::algebra::Sphere4Ds |
typedef SphereD<5> IMP::algebra::Sphere5D |
typedef IMP::base::Vector< Sphere5D > IMP::algebra::Sphere5Ds |
typedef SphereD<6> IMP::algebra::Sphere6D |
typedef IMP::base::Vector< Sphere6D > IMP::algebra::Sphere6Ds |
typedef SphereD<-1> IMP::algebra::SphereKD |
typedef IMP::base::Vector< SphereKD > IMP::algebra::SphereKDs |
Pass or store a set of SpherePatch3D .
Definition at line 51 of file SpherePatch3D.h.
Pass or store a set of SphericalVector3D .
Definition at line 83 of file SphericalVector3D.h.
Pass or store a set of Transformation2D .
Definition at line 123 of file Transformation2D.h.
Pass or store a set of Transformation3D .
Definition at line 91 of file Transformation3D.h.
typedef IMP::base::Vector< Triangle3D > IMP::algebra::Triangle3Ds |
Pass or store a set of Triangle3D .
Definition at line 42 of file Triangle3D.h.
typedef VectorD<1> IMP::algebra::Vector1D |
typedef base::Vector<VectorD<1> > IMP::algebra::Vector1Ds |
typedef VectorD<2> IMP::algebra::Vector2D |
typedef base::Vector<VectorD<2> > IMP::algebra::Vector2Ds |
typedef VectorD<3> IMP::algebra::Vector3D |
typedef base::Vector<VectorD<3> > IMP::algebra::Vector3Ds |
typedef VectorD<4> IMP::algebra::Vector4D |
typedef base::Vector<VectorD<4> > IMP::algebra::Vector4Ds |
typedef VectorD<5> IMP::algebra::Vector5D |
typedef base::Vector<VectorD<5> > IMP::algebra::Vector5Ds |
typedef VectorD<6> IMP::algebra::Vector6D |
typedef base::Vector<VectorD<6> > IMP::algebra::Vector6Ds |
typedef VectorInputD<1> IMP::algebra::VectorInput1D |
typedef base::Vector<VectorInputD<1> > IMP::algebra::VectorInput1Ds |
typedef VectorInputD<2> IMP::algebra::VectorInput2D |
typedef base::Vector<VectorInputD<2> > IMP::algebra::VectorInput2Ds |
typedef VectorInputD<3> IMP::algebra::VectorInput3D |
typedef base::Vector<VectorInputD<3> > IMP::algebra::VectorInput3Ds |
typedef VectorInputD<4> IMP::algebra::VectorInput4D |
typedef base::Vector<VectorInputD<4> > IMP::algebra::VectorInput4Ds |
typedef VectorInputD<5> IMP::algebra::VectorInput5D |
typedef base::Vector<VectorInputD<5> > IMP::algebra::VectorInput5Ds |
typedef VectorInputD<6> IMP::algebra::VectorInput6D |
typedef base::Vector<VectorInputD<6> > IMP::algebra::VectorInput6Ds |
typedef VectorInputD<-1> IMP::algebra::VectorInputKD |
typedef base::Vector<VectorInputD<-1> > IMP::algebra::VectorInputKDs |
typedef VectorD<-1> IMP::algebra::VectorKD |
Store a set of objects.
Definition at line 33 of file vector_metrics.h.
typedef base::Vector<VectorD<-1> > IMP::algebra::VectorKDs |
Rotation2D IMP::algebra::compose | ( | const Rotation2D & | a, |
const Rotation2D & | b | ||
) |
For any vector v (a*b)*v = a*(b*v).
Definition at line 117 of file Rotation2D.h.
Transformation3D compose | ( | const Transformation3D & | a, |
const Transformation3D & | b | ||
) |
For any vector v (a*b)*v = a*(b*v).
Definition at line 117 of file Transformation3D.h.
Transformation2D compose | ( | const Transformation2D & | a, |
const Transformation2D & | b | ||
) |
For any vector v (a*b)*v = a*(b*v).
Definition at line 150 of file Transformation2D.h.
Transformation3Ds IMP::algebra::get_alignments_from_first_to_second | ( | const PrincipalComponentAnalysisD< 3 > & | pca1, |
const PrincipalComponentAnalysisD< 3 > & | pca2 | ||
) |
Get all possible alignments of the first principal component system to the second one
bool IMP::algebra::get_are_almost_equal | ( | const double | a, |
const double | b, | ||
const double | epsilon | ||
) |
epsilon is the tolerance allowed to consider the values as equal
Definition at line 112 of file algebra/utility.h.
std::pair< Vector3D, double > get_axis_and_angle | ( | const Rotation3D & | rot | ) |
VectorD< D > get_basis_vector_d | ( | unsigned int | coordinate | ) |
std::string IMP::algebra::get_data_path | ( | std::string | file_name | ) |
Each module has its own data directory, so be sure to use the version of this function in the correct module. To read the data file "data_library" that was placed in the data
directory of module "mymodule", do something like
This will ensure that the code works when IMP
is installed or used via the tools/imppy.sh
script.
double get_distance | ( | const Segment3D & | s, |
const Vector3D & | p | ||
) |
double get_distance | ( | const Segment3D & | a, |
const Segment3D & | b | ||
) |
double get_distance | ( | const Plane3D & | pln, |
const Vector3D & | p | ||
) |
double get_distance | ( | const SphereD< D > & | a, |
const SphereD< D > & | b | ||
) |
double get_distance | ( | const Rotation3D & | r0, |
const Rotation3D & | r1 | ||
) |
The distance runs between 0 and 1. More precisely, the distance returned is distance between the two quaternion vectors properly normalized, divided by sqrt(2).
A vector with distance d from the unit vector represents a rotation of
\( \theta= \cos^{-1}\left(1-\sqrt{2}d\right)\)
Definition at line 241 of file Rotation3D.h.
VectorD< D > get_elementwise_product | ( | const algebra::VectorD< D > & | a, |
const algebra::VectorD< D > & | b | ||
) |
VectorD< D > get_elementwise_product | ( | const Ints & | a, |
const algebra::VectorD< D > & | b | ||
) |
Sphere3D IMP::algebra::get_enclosing_sphere | ( | const Sphere3Ds & | ss | ) |
Sphere3D IMP::algebra::get_enclosing_sphere | ( | const Vector3Ds & | ss | ) |
std::string IMP::algebra::get_example_path | ( | std::string | file_name | ) |
Each module has its own example directory, so be sure to use the version of this function in the correct module. For example to read the file example_protein.pdb
located in the examples
directory of the IMP::atom module, do
This will ensure that the code works when IMP
is installed or used via the tools/imppy.sh
script.
FixedXYZ IMP::algebra::get_fixed_xyz_from_rotation | ( | const Rotation3D & | r | ) |
FixedZXZ get_fixed_zxz_from_rotation | ( | const Rotation3D & | r | ) |
FixedZYZ get_fixed_zyz_from_rotation | ( | const Rotation3D & | r | ) |
base::Vector<VectorD<D> > IMP::algebra::get_grid_interior_cover_by_spacing | ( | const BoundingBoxD< D > & | bb, |
double | s | ||
) |
Cover the interior of the bounding box by equal sized parallelograms of approximately full-width s, returning the list of centers of the cubes.
Definition at line 179 of file vector_generators.h.
Rotation3D get_identity_rotation_3d | ( | ) |
Definition at line 225 of file Rotation3D.h.
Transformation3D get_identity_transformation_3d | ( | ) |
Rotation3D get_interpolated | ( | const Rotation3D & | a, |
const Rotation3D & | b, | ||
double | f | ||
) |
It f ==0, return b, if f==1 return a.
Definition at line 509 of file Rotation3D.h.
Triangle3D get_largest_triangle | ( | const Vector3Ds & | points | ) |
Value IMP::algebra::get_linearly_interpolated | ( | const GridD< D, Storage, Value, Embedding > & | g, |
const VectorD< D > & | pt | ||
) |
Get the value from the grid with linear interpolation. Values outside the bounding box are snapped to the bounding box (effectively extending the boundary values out to infinity).
Definition at line 25 of file grid_utility.h.
Vector3D IMP::algebra::get_orthogonal_vector | ( | const Vector3D & | v | ) |
Or, if you are Israeli, it is a vertical vector.
Definition at line 42 of file Vector3D.h.
double get_power_distance | ( | const SphereD< D > & | a, |
const SphereD< D > & | b | ||
) |
double IMP::algebra::get_radius_of_gyration | ( | const Vector3Ds & | ps | ) |
Vector3Ds IMP::algebra::get_random_chain | ( | unsigned int | n, |
double | r, | ||
const Vector3D & | start = Vector3D(0, 0, 0) , |
||
const Sphere3Ds & | obstacles = Sphere3Ds() |
||
) |
This function generates a random chain, starting at (0,0,0) with n particles each with radius r. Consecutive particles are approximately distance 2r apart and no pair of particles is closer than 2r.
If an obstacles parameter is provided then chain spheres also don't intersect the obstacle spheres.
Transformation3D IMP::algebra::get_random_local_transformation | ( | Vector3D | origin, |
double | max_translation = 5. , |
||
double | max_angle_in_rad = 0.26 |
||
) |
[in] | origin | the origin of the rotation |
[in] | max_translation | detault value is 5 |
[in] | max_angle_in_rad | default value is 15 degree in radians |
Rotation3D get_random_rotation_3d | ( | ) |
Rotation3D get_random_rotation_3d | ( | const Rotation3D & | center, |
double | distance | ||
) |
This method generates a rotation that is within the provided distance of center.
[in] | center | The center of the rotational volume |
[in] | distance | See get_distance(const Rotation3D&,const Rotation3D&) for a full definition. |
VectorD< 2 > get_random_vector_in | ( | const SphereD< 2 > & | s | ) |
Generates a random vector in a circle with uniform density with respect to the area of the circle
s | a 2D sphere (circle) |
double IMP::algebra::get_relative_projection_on_segment | ( | const Segment3D & | s, |
const algebra::Vector3D & | p | ||
) |
Returns f, the 'relative' projection of a point p onto the line that contains s. Formally, the projection of p onto the line through s is s[0]+f*(s[1]-s[0]) f is in the range [0..1] if the projection of p is inside s.
s | segment in 3D |
p | point in 3D |
Rotation3D get_rotation_about_axis | ( | const Vector3D & | axis, |
double | angle | ||
) |
[in] | axis | the rotation axis passes through (0,0,0) |
[in] | angle | the rotation angle in radians in the clockwise direction |
Transformation3D get_rotation_about_point | ( | const Vector3D & | point, |
const Rotation3D & | rotation | ||
) |
Rotate about a point rather than the origin.
[in] | point | Center to rotate about |
[in] | rotation | The rotation to perform |
Definition at line 108 of file Transformation3D.h.
Transformation2D get_rotation_about_point | ( | const Vector2D & | point, |
const Rotation2D & | rotation | ||
) |
Generates a Transformation2D to rotate about a point rather than the origin.
[in] | point | Center to rotate about |
[in] | rotation | The rotation to perform (defined taking the origin as reference, not the new point). |
Definition at line 141 of file Transformation2D.h.
Rotation3D get_rotation_from_fixed_xyz | ( | double | xr, |
double | yr, | ||
double | zr | ||
) |
[in] | xr | Rotation around the X axis in radians |
[in] | yr | Rotation around the Y axis in radians |
[in] | zr | Rotation around the Z axis in radians |
Rotation3D get_rotation_from_fixed_zxz | ( | double | phi, |
double | theta, | ||
double | psi | ||
) |
[in] | phi | Rotation around the Z axis in radians |
[in] | theta | Rotation around the X axis in radians |
[in] | psi | Rotation around the Z axis in radians |
Rotation3D get_rotation_from_fixed_zyz | ( | double | Rot, |
double | Tilt, | ||
double | Psi | ||
) |
[in] | Rot | First Euler angle (radians) defining the rotation (Z axis) |
[in] | Tilt | Second Euler angle (radians) defining the rotation (Y axis) |
[in] | Psi | Third Euler angle (radians) defining the rotation (Z axis) |
Rotation3D get_rotation_from_vector4d | ( | const VectorD< 4 > & | v | ) |
Rotation3D IMP::algebra::get_rotation_from_x_y_axes | ( | const Vector3D & | x, |
const Vector3D & | y | ||
) |
Return the rotation which takes the native x and y axes to the given x and y axes. The two axis must be perpendicular unit vectors.
Rotation2D IMP::algebra::get_rotation_to_x_axis | ( | const Vector2D & | v | ) |
Builds the rotation that transforms the vector X of the origin of coordinates into the given vector
Definition at line 109 of file Rotation2D.h.
int IMP::algebra::get_rounded | ( | const T & | x | ) |
The result is of type integer but the argument can be of any type. Some examples:
Definition at line 49 of file algebra/utility.h.
FloatPair IMP::algebra::get_surface_area_and_volume | ( | const algebra::Sphere3Ds & | ss | ) |
Return the surface area and volume of the union of the balls bounded by the spheres. This method requires CGAL to work.
Transformation3D IMP::algebra::get_transformation_3d | ( | const Transformation2D & | t2d | ) |
IMP::algebra::Transformation3D get_transformation_aligning_first_to_second | ( | const Vector3DsOrXYZs0 & | source, |
const Vector3DsOrXYZs1 & | target | ||
) |
The points are assumed to be corresponding (that is, from[0] is aligned to to[0] etc.). The alignment computed is that which minimized the sum of squared distances between corresponding points. Return the
\[ \textit{argmin}_T \sum \left|T\left(f\left[i\right]\right)-t[i]\right|^2 \]
If the point sets lie in a 1 or 2 dimensional subspace, the alignment algorithm is unstable and not guaranteed to work. A warning is printed in this case.
Definition at line 46 of file geometric_alignment.h.
Transformation3D IMP::algebra::get_transformation_aligning_first_to_second | ( | Vector3Ds | a, |
Vector3Ds | b | ||
) |
Equivalent to
Transformation2D IMP::algebra::get_transformation_aligning_pair | ( | const Vector2Ds & | set_from, |
const Vector2Ds & | set_to | ||
) |
Builds the transformation required to obtain a set of points from the first one
const Storage::Value get_trilinearly_interpolated | ( | const GridD< 3, Storage, typename Storage::Value, Embedding > & | g, |
const Vector3D & | v, | ||
const typename Storage::Value & | outside = 0 |
||
) |
The voxel values are assumed to be at the center of the voxel and the passed outside value is used for voxels outside the grid. The type Voxel must support get_linearly_interpolated().
Definition at line 45 of file grid_utility.h.
Rotation3Ds IMP::algebra::get_uniform_cover_rotations_3d | ( | unsigned int | num_points | ) |
If you care about the distance between samples instead of the number of samples, the "surface area" of the set of rotations is pi^2. If you allocate each sample a volume of 4/3 pi d^3 (to space them d apart), Then you want 3/4 pi/d^3 points.
Creates at least num_points rotations.
base::Vector< VectorD< D > > get_uniform_surface_cover | ( | const SphereD< D > & | s, |
unsigned int | n | ||
) |
The function is currently pretty slow, especially in non-optimized builds. Complain if this bugs you. We might be able to do better, at least in 3D.
Creates at least the requested number of points.
Definition at line 120 of file vector_generators.h.
Vector3Ds get_uniform_surface_cover | ( | const SpherePatch3D & | sph, |
unsigned int | number_of_points | ||
) |
base::Vector<VectorD<D> > IMP::algebra::get_uniform_upper_hemisphere_cover | ( | const SphereD< D > & | s, |
unsigned int | n | ||
) |
The points all lie on the upper hemisphere, eg, all their z coordinates are greater than those of the center of the sphere.
Definition at line 140 of file vector_generators.h.
algebra::Rotation3Ds IMP::algebra::get_uniformly_sampled_rotations | ( | double | delta | ) |
[in] | delta | sample every delta angles in radians. |
void IMP::algebra::reversed_read | ( | void * | dest, |
size_t | size, | ||
size_t | nitems, | ||
std::ifstream & | f, | ||
bool | reverse | ||
) |
If the reverse parameter is true, the data will be read in reverse order.
void IMP::algebra::reversed_write | ( | const void * | src, |
size_t | size, | ||
size_t | nitems, | ||
std::ofstream & | f, | ||
bool | reverse = false |
||
) |
This function is the same as fread from C, but at the end there is a flag saying if data should be read in reverse order or not.
If the reverse parameter is true, the data will be written in reverse order.
void write_pts | ( | const Vector3Ds & | vs, |
base::TextOutput | out | ||
) |
void write_spheres | ( | const Sphere3Ds & | vs, |
base::TextOutput | out | ||
) |