PROFASI
Version 1.5
|
Represents an abstract shape in space defined by a set of points. More...
#include <Shape.hh>
Public Member Functions | |
Shape () | |
Create an empty Shape object. | |
Shape (unsigned int i) | |
Shape object with i points. | |
void | Resize (unsigned int i) |
void | Point (int i, const Vector3 &v) |
Specify the location of i'th point. | |
Vector3 | Point (int i) const |
Get the location of the i'th point. | |
PointRepresentation & | Points () |
Return the whole vector of points. | |
int | NPoints () const |
Number of Points. | |
void | Translate (const Vector3 &t) |
void | Rotate (double th, const Vector3 &ax) |
Rotate shape by angle th about axis ax, through center of mass. | |
void | Scale (double xscl, double yscl, double zscl) |
Scale x, y and z directions with different factors. | |
void | Apply1 (Matrix< double > &mtR) |
Linear transformation by applying a matrix R on every vector. | |
void | Apply2 (Matrix< double > &mtR) |
More linear transformation by applying a matrix R on every vector. | |
virtual void | Save (const char *fln) |
Save shape in a file. | |
void | find_cm () |
find center of mass | |
void | find_and_move_to_cm () |
Find CMS and translate coordinates such that it is at origin. | |
Vector3 | center_of_mass () const |
Get center of mass. | |
double | gyr_r2 () const |
Get radius of gyration. | |
The Shape is a helper class for the similarity measure RMSD. A shape in space is defined by the coordinates of an enumerated set of points. A Shape can be tranlated and rotated in space, and in general acted upon by a linear transformation.
void Shape::Apply1 | ( | Matrix< double > & | mtR | ) |
Assumes that for mtR, the coordinates are column vectors
void Shape::Apply2 | ( | Matrix< double > & | mtR | ) |
Assumes that for mtR, the coordinates are row vectors
void Shape::Resize | ( | unsigned int | i | ) |
Change number of points to i
void Shape::Translate | ( | const Vector3 & | t | ) |
translate shape by vector t