BALL::RSComputer Class Reference
[Molecular Surface Computation]

#include <BALL/STRUCTURE/reducedSurface.h>

List of all members.

Classes

struct  ProbePosition

Public Types

Enums

enum  ProbeStatus { STATUS_OK = 0, STATUS_NOT_OK, STATUS_NOT_TESTED }
enum  AtomStatus { STATUS_ON_SURFACE = 0, STATUS_INSIDE, STATUS_UNKNOWN }

Public Member Functions

Constructors and Destructors

 RSComputer ()
 RSComputer (ReducedSurface *rs)
virtual ~RSComputer ()
Accessors

void run () throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)

Protected Attributes

ReducedSurface * rs_
std::vector< std::list< Index > > neighbours_
std::vector< AtomStatus > atom_status_
HashMap< Position, HashMap
< Position, std::list< Index > > > 
neighbours_of_two_
HashMap< Position, HashMap
< Position, HashMap< Position,
ProbePosition * > > > 
probe_positions_
HashSet< RSVertex * > new_vertices_
HashSet< RSFace * > new_faces_
std::vector< std::list
< RSVertex * > > 
vertices_

Private Member Functions

void preProcessing ()
void getRSComponent () throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)
bool treatFace (RSFace *face) throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)
bool treatEdge (RSEdge *edge) throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)
void correct (Index atom)
void extendComponent () throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)
Index thirdAtom (RSVertex *vertex1, RSVertex *vertex2, RSFace *face, TSphere3< double > &probe, TAngle< double > &phi) throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow)

Position getStartPosition () throw (Exception::DivisionByZero)

RSFace * findFirstFace () throw (Exception::DivisionByZero)
RSFace * findFace (Position direction, Position extrem) throw (Exception::DivisionByZero)

RSEdge * findFirstEdge ()
RSEdge * findEdge (Position direction, Position extrem)

RSVertex * findFirstVertex ()
Index findFirstAtom (Position direction, Position extrem)
Index findSecondAtom (Index atom, Position direction, Position extrem)
void findThirdAtom (Index atom1, Index atom2, const std::list< Index > &third, std::list< std::pair< Index, TSphere3< double > > > &atoms)

void neighboursOfTwoAtoms (Index atom1, Index atom2)
void neighboursOfThreeAtoms (Index atom1, Index atom2, Index atom3, std::list< Index > &output_list)
double getCircleExtremum (const TCircle3< double > &circle, Position direction, Position extrem)

RSEdge * createFreeEdge (RSVertex *vertex1, RSVertex *vertex2)
bool getCircles (Index atom1, Index atom2, TCircle3< double > &circle1, TCircle3< double > &circle2, TCircle3< double > &circle3)
TVector3< double > getFaceNormal (const TSphere3< double > &atom1, const TSphere3< double > &atom2, const TSphere3< double > &atom3, const TSphere3< double > &probe)
void updateFaceAndEdges (RSVertex *v1, RSVertex *v2, RSVertex *v3, RSEdge *e1, RSEdge *e2, RSEdge *e3, RSFace *f, const TSphere3< double > &probe)
RSFace * faceExists (RSFace *face, const std::list< RSVertex * > &vertices)

bool centerOfProbe (Index a1, Index a2, Index a3, TVector3< double > &c1, TVector3< double > &c2)
bool checkProbe (const TSphere3< double > &probe, Index atom1, Index atom2, Index atom3)
void correctProbePosition (Position atom)
void sort (Index u1, Index u2, Index u3, Index &s1, Index &s2, Index &s3)
void correctProbePosition (Position a1, Position a2, Position a3)
void insert (RSVertex *vertex)
void insert (RSEdge *edge)
void insert (RSFace *face)

Detailed Description

Generic RSComputer Class.


Member Enumeration Documentation

status of an atom 0 on surface 1 inside 2 outside

Enumerator:
STATUS_ON_SURFACE 
STATUS_INSIDE 
STATUS_UNKNOWN 

status of the probe positions of three atoms: 0 ok 1 not ok 2 not tested

Enumerator:
STATUS_OK 
STATUS_NOT_OK 
STATUS_NOT_TESTED 

Constructor & Destructor Documentation

BALL::RSComputer::RSComputer (  ) 

Default constructor. All components are initialized to (T)0 or NULL, respectivly.

BALL::RSComputer::RSComputer ( ReducedSurface *  rs  ) 

Detailed constructor.

virtual BALL::RSComputer::~RSComputer (  )  [virtual]

Destructor.


Member Function Documentation

bool BALL::RSComputer::centerOfProbe ( Index  a1,
Index  a2,
Index  a3,
TVector3< double > &  c1,
TVector3< double > &  c2 
) [private]
bool BALL::RSComputer::checkProbe ( const TSphere3< double > &  probe,
Index  atom1,
Index  atom2,
Index  atom3 
) [private]
void BALL::RSComputer::correct ( Index  atom  )  [private]
void BALL::RSComputer::correctProbePosition ( Position  a1,
Position  a2,
Position  a3 
) [private]
void BALL::RSComputer::correctProbePosition ( Position  atom  )  [private]
RSEdge* BALL::RSComputer::createFreeEdge ( RSVertex *  vertex1,
RSVertex *  vertex2 
) [private]
void BALL::RSComputer::extendComponent (  )  throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow) [private]
RSFace* BALL::RSComputer::faceExists ( RSFace *  face,
const std::list< RSVertex * > &  vertices 
) [private]
RSEdge* BALL::RSComputer::findEdge ( Position  direction,
Position  extrem 
) [private]
RSFace* BALL::RSComputer::findFace ( Position  direction,
Position  extrem 
) throw (Exception::DivisionByZero) [private]
Index BALL::RSComputer::findFirstAtom ( Position  direction,
Position  extrem 
) [private]
RSEdge* BALL::RSComputer::findFirstEdge (  )  [private]
RSFace* BALL::RSComputer::findFirstFace (  )  throw (Exception::DivisionByZero) [private]
RSVertex* BALL::RSComputer::findFirstVertex (  )  [private]
Index BALL::RSComputer::findSecondAtom ( Index  atom,
Position  direction,
Position  extrem 
) [private]
void BALL::RSComputer::findThirdAtom ( Index  atom1,
Index  atom2,
const std::list< Index > &  third,
std::list< std::pair< Index, TSphere3< double > > > &  atoms 
) [private]
double BALL::RSComputer::getCircleExtremum ( const TCircle3< double > &  circle,
Position  direction,
Position  extrem 
) [private]
bool BALL::RSComputer::getCircles ( Index  atom1,
Index  atom2,
TCircle3< double > &  circle1,
TCircle3< double > &  circle2,
TCircle3< double > &  circle3 
) [private]
TVector3<double> BALL::RSComputer::getFaceNormal ( const TSphere3< double > &  atom1,
const TSphere3< double > &  atom2,
const TSphere3< double > &  atom3,
const TSphere3< double > &  probe 
) [private]
void BALL::RSComputer::getRSComponent (  )  throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow) [private]
Position BALL::RSComputer::getStartPosition (  )  throw (Exception::DivisionByZero) [private]
void BALL::RSComputer::insert ( RSFace *  face  )  [private]
void BALL::RSComputer::insert ( RSEdge *  edge  )  [private]
void BALL::RSComputer::insert ( RSVertex *  vertex  )  [private]
void BALL::RSComputer::neighboursOfThreeAtoms ( Index  atom1,
Index  atom2,
Index  atom3,
std::list< Index > &  output_list 
) [private]
void BALL::RSComputer::neighboursOfTwoAtoms ( Index  atom1,
Index  atom2 
) [private]
void BALL::RSComputer::preProcessing (  )  [private]

Compute the reduced surface

void BALL::RSComputer::sort ( Index  u1,
Index  u2,
Index  u3,
Index &  s1,
Index &  s2,
Index &  s3 
) [private]
Index BALL::RSComputer::thirdAtom ( RSVertex *  vertex1,
RSVertex *  vertex2,
RSFace *  face,
TSphere3< double > &  probe,
TAngle< double > &  phi 
) throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow) [private]
bool BALL::RSComputer::treatEdge ( RSEdge *  edge  )  throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow) [private]
bool BALL::RSComputer::treatFace ( RSFace *  face  )  throw (Exception::GeneralException, Exception::DivisionByZero, Exception::IndexOverflow) [private]
void BALL::RSComputer::updateFaceAndEdges ( RSVertex *  v1,
RSVertex *  v2,
RSVertex *  v3,
RSEdge *  e1,
RSEdge *  e2,
RSEdge *  e3,
RSFace *  f,
const TSphere3< double > &  probe 
) [private]

Member Data Documentation

std::vector< AtomStatus > BALL::RSComputer::atom_status_ [protected]
std::vector< std::list<Index> > BALL::RSComputer::neighbours_ [protected]
std::vector< std::list<RSVertex*> > BALL::RSComputer::vertices_ [protected]