BaseGrid

This class provides discrete representation of the molecule. The molecule is represented by a grid. Each voxel of the grid can be marked with DataT.

[ Lib_General64 | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

AUTHORS
CHANGES LOG
GOALS
USAGE

Class Summary

class BaseGrid
{
public:
// Constructors
template< class MoleculeT> BaseGrid(const MoleculeT& mol, const float inDelta, const float maxRadius);
void clear();
int getIndexForPoint( const Vector3& point) const ;
Vector3 getPointForIndex(int index) const ;
bool isValidIndex(int index) const ;
int getIntGridRadius( float radius ) const ;
protected:
float delta ;
vector < int > neigbor;
vector < float > neigborDist;
vector < DataT > grid;
}; // BaseGrid

Back to the top of BaseGrid


AUTHORS

Yuval Inbar Dina Duhovny ,

Copyright: SAMBA group, Tel-Aviv Univ. Israel, 2003.

Back to the top of BaseGrid


CHANGES LOG

Back to the top of BaseGrid


GOALS

The class is designed to represent a molecule as accurate as possible using small amount of space and fast algorithms for grid calculations.

Space Complexity of the Grid: The density of the grid: delta, is specified by the user. Assume that the width of the molecule along each of the axis is: x_width, y_width, z_width. The space used by the grid will be: x_width*y_width*z_width/(delta^3).

Back to the top of BaseGrid


USAGE

The BaseGrid class uses any set of points given by the user (Surface, Molecule ...) to generate the grid object.


  Surface msSurface;
  // ... read msSurface
  
  // initialization of grid
  BaseGrid* grid = new BaseGrid(msSurface, delta, maxDist) ;
   

Back to the top of BaseGrid


template< class MoleculeT> BaseGrid(const MoleculeT& mol, const float inDelta, const float maxRadius);

The BaseGrid constructor receives Connoly MS Surface, delta - grid density and maxRadius - maximum radius for distance function calculation.

  template< class MoleculeT>
  BaseGrid(const MoleculeT& mol, const float inDelta, const float maxRadius);

Back to the top of BaseGrid


void clear();

clears object (grid becomes empty)

  void clear();

Back to the top of BaseGrid


int getIndexForPoint( const Vector3& point) const ;

computes index in grid for a point.

  int getIndexForPoint( const Vector3& point) const                                                                                                                                                                                                                                                                                                                                          
;

Function is currently defined inline.


Back to the top of BaseGrid


Vector3 getPointForIndex(int index) const ;

computes a point corresponding to an index.

  Vector3 getPointForIndex(int index) const                                                                                                                                                                                                 
;

Function is currently defined inline.


Back to the top of BaseGrid


bool isValidIndex(int index) const ;

checks if the index is valid for the grid

  bool isValidIndex(int index) const                                             
;

Function is currently defined inline.


Back to the top of BaseGrid


int getIntGridRadius( float radius ) const ;

convert radius to grid valid radius (number of voxels)

  int getIntGridRadius( float radius ) const                                                
;

Function is currently defined inline.


Back to the top of BaseGrid


float delta ;

grid resolution

  float delta ;

Back to the top of BaseGrid


vector < int > neigbor;

cube neighbors there are 26 neighbors for each voxel

  vector < int > neigbor;

Back to the top of BaseGrid


vector < float > neigborDist;

cube neighbors' distances

  vector < float > neigborDist;

Back to the top of BaseGrid


vector < DataT > grid;

distances grid

  vector < DataT > grid;

Back to the top of BaseGrid


All Members

public:
// Constructors
template< class MoleculeT> BaseGrid(const MoleculeT& mol, const float inDelta, const float maxRadius);
void clear();
int getIndexForPoint( const Vector3& point) const ;
Vector3 getPointForIndex(int index) const ;
bool isValidIndex(int index) const ;
int getIntGridRadius( float radius ) const ;
protected:
float delta ;
vector < int > neigbor;
vector < float > neigborDist;
vector < DataT > grid;

Back to the top of BaseGrid


Ancestors

Class does not inherit from any other class.

Back to the top of BaseGrid


Descendants

Back to the top of BaseGrid


Generated from source by the Cocoon utilities on Tue Jan 5 18:47:29 2010 .

Report problems to jkotula@unimax.com