Clipper
Public Member Functions | Static Public Member Functions | Friends | List of all members
clipper::Coord_orth Class Reference

orthogonal (Angstrom) coordinates More...

#include <coords.h>

Inheritance diagram for clipper::Coord_orth:
clipper::Vec3<>

Public Member Functions

 Coord_orth ()
 null constructor
 
 Coord_orth (const Vec3<> &v)
 constructor: copy/convert
 
 Coord_orth (const ftype &x, const ftype &y, const ftype &z)
 constructor: from x,y,z
 
 Coord_orth (const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3, const ftype &length, const ftype &angle, const ftype &torsion)
 constructor: from 3 coords and bond length, angle, torsion More...
 
const ftypex () const
 get x
 
const ftypey () const
 get y
 
const ftypez () const
 get z
 
ftype lengthsq () const
 return square of length of vector in Angstroms More...
 
Coord_frac coord_frac (const Cell &cell) const
 orthogonal-fractional coordinate conversion More...
 
Coord_orth transform (const RTop_orth &op) const
 return transformed coordinate
 
String format () const
 return formatted String representation More...
 
- Public Member Functions inherited from clipper::Vec3<>
 Vec3 ()
 null constructor
 
 Vec3 (const T &v0, const T &v1, const T &v2)
 constructor: from individual values
 
 Vec3 (const Vec3< TT > &v)
 constructor: copy/convert
 
bool equals (const Vec3< T > &v, const T &tol) const
 test equality
 
const T & operator[] (const int &i) const
 get element
 
T & operator[] (const int &i)
 set element
 
Vec3< T > unit () const
 return unit vector with same direction as this vector
 
bool is_null () const
 test for null vector
 
String format () const
 return formatted String representation
 
const Vec3< T > & operator+= (const Vec3< T > &v)
 add another vector to this one
 
const Vec3< T > & operator-= (const Vec3< T > &v)
 subtract another vector from this one
 

Static Public Member Functions

static ftype length (const Coord_orth &x1, const Coord_orth &x2)
 Return length of vector between two coord orths. More...
 
static ftype angle (const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3)
 Return angle between three coord orths. More...
 
static ftype torsion (const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3, const Coord_orth &x4)
 Return torsion between four coord orths. More...
 
- Static Public Member Functions inherited from clipper::Vec3<>
static Vec3< T > zero ()
 return zero vector
 
static Vec3< T > null ()
 return null vector (only valid for floating point types)
 
static T dot (const Vec3< T > &v1, const Vec3< T > &v2)
 Vector dot product (equivalent to *)
 
static Vec3< T > cross (const Vec3< T > &v1, const Vec3< T > &v2)
 Vector cross product.
 

Friends

Coord_orth operator- (const Coord_orth &x1)
 
Coord_orth operator+ (const Coord_orth &x1, const Coord_orth &x2)
 
Coord_orth operator- (const Coord_orth &x1, const Coord_orth &x2)
 
Coord_orth operator* (const ftype &s, const Coord_orth &x1)
 
Coord_orth operator* (const RTop_orth &op, const Coord_orth &x1)
 

Detailed Description

orthogonal (Angstrom) coordinates

Constructor & Destructor Documentation

clipper::Coord_orth::Coord_orth ( const Coord_orth x1,
const Coord_orth x2,
const Coord_orth x3,
const ftype length,
const ftype angle,
const ftype torsion 
)

constructor: from 3 coords and bond length, angle, torsion

The coordinate is calculated which extends the sequence of coordinates x1, x2, x3 with the specified distance to x3, angle to x2,x3, and torsion to x1,x2,x3.

Parameters
x1First coordinate.
x2Second coordinate.
x3Third coordinate.
lengthx3-new bond length in Angstroms.
anglex2-x3-new opening angle in Radians.
torsionx1-x2-x3-new torsion angle in Radians.

Member Function Documentation

ftype clipper::Coord_orth::lengthsq ( ) const
inline

return square of length of vector in Angstroms

Returns
The squared length in Angstroms squared
Coord_frac clipper::Coord_orth::coord_frac ( const Cell cell) const
inline

orthogonal-fractional coordinate conversion

Parameters
cellThe cell concerned
Returns
The transformed coordinate.
String clipper::Coord_orth::format ( ) const

return formatted String representation

Returns
The formatted text string
ftype clipper::Coord_orth::length ( const Coord_orth x1,
const Coord_orth x2 
)
static

Return length of vector between two coord orths.

Returns
The bond length x1-x2 in Angstroms.
ftype clipper::Coord_orth::angle ( const Coord_orth x1,
const Coord_orth x2,
const Coord_orth x3 
)
static

Return angle between three coord orths.

Returns
The bond angle x1-x2-x3 in Radians.
ftype clipper::Coord_orth::torsion ( const Coord_orth x1,
const Coord_orth x2,
const Coord_orth x3,
const Coord_orth x4 
)
static

Return torsion between four coord orths.

Returns
The bond torsion x1-x2-x3-x4 in Radians.

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