PROFASI  Version 1.5
prf::Vector3 Class Reference

A representation of three vectors. More...

`#include <Vector3.hh>`

## Public Member Functions

double phi () const
The azimuth angle.

double theta () const
The polar angle.

double mag2 () const
The magnitude squared.

double mag () const
The magnitude.

double perp2 () const
The transverse component squared..

double perp () const
The transverse component.

void phi (double)
Set phi keeping mag and theta constant.

void theta (double)
Set theta keeping mag and phi constant.

void mag (double)
Set magnitude keeping theta and phi constant.

Vector3operator= (const Vector3 &p)
Assignment.

Vector3operator+= (const Vector3 &p)

Vector3 operator+ (const Vector3 &p) const

Vector3operator-= (const Vector3 &p)
Subtraction.

Vector3 operator- (const Vector3 &p) const
Subtraction.

Vector3 operator- () const
Unary minus.

Vector3operator*= (double a)
Scaling with real numbers.

Vector3 operator* (double a) const
Scaling with real numbers.

double dot (const Vector3 &p) const
Scalar product.

Vector3 cross (const Vector3 &p) const
Cross product.

Vector3 operator* (const Vector3 &p) const
Cross product.

double angle (const Vector3 &) const
The angle w.r.t. another 3-vector.

double torsion (const Vector3 &prev, const Vector3 &next)

void rotateX (double)
Rotates the Vector3 around the x-axis.

void rotateY (double)
Rotates the Vector3 around the y-axis.

void rotateZ (double)
Rotates the Vector3 around the z-axis.

void rotate (double, const Vector3 &)
Rotates around the axis specified by another Vector3.

Components in cartesian coordinate system.

Access and change the components in cartesian coordinates.

double x () const

double y () const

double z () const

void x (double gx)

void y (double gy)

void z (double gz)

double operator[] (int i)

## Friends

Vector3 operator* (double a, const Vector3 &)
Scaling of 3-vectors with a real number.

## Detailed Description

The code for this class originally comes from the HEP_THREE_VECTOR class from the CLHEP package. It's a small but very useful class.

## Member Function Documentation

 double prf::Vector3::torsion ( const Vector3 & prev, const Vector3 & next )

The vectors prev, this and next can be thought of as leading from arbitrary points a->b, b->c, and c->d respectively. The torsion angle is defined as the angle on the plane perpendicular to the vector b->c (this), between the projections of the points. The sense of the angle is positive if the rotation vector from the projection of 'a' to the projection of 'd' is in the same direction as the vector "this".

The documentation for this class was generated from the following files:
• model/Aux/Vector3.hh
• model/Aux/Vector3.cc

PROFASI: Protein Folding and Aggregation Simulator, Version 1.5
© (2005-2016) Anders Irbäck and Sandipan Mohanty
Documentation generated on Mon Jul 18 2016 using Doxygen version 1.8.2