The RigidCLL library


RigidCLL.cpp File Reference

Implementation of the RigidCLL algorihm. More...

#include "RigidCLL.h"
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <math.h>
#include <limits>
Include dependency graph for RigidCLL.cpp:

Go to the source code of this file.

Defines

#define BB_MARGIN   2
 Margin for the bounding box.
#define MAX_UINT   std::numeric_limits<unsigned int>::max()
 Large unsigned integer.
#define ERROR(s)   {cerr<<s<<"\n";exit(0);}
 Error.
#define INF   std::numeric_limits<double>::max()
 Infinite.
#define MANHATTAN_DISTANCE(dx, dy, dz, a1, a2)   dx=a1->cp[0]-a2->cp[0];dy=a1->cp[1]-a2->cp[1];dz=a1->cp[2]-a2->cp[2]
 Partial distances between two atoms.

Functions

ostream & operator<< (ostream &os, const AtomInfo &a)
 Prints the atom info.
ostream & operator<< (ostream &os, const AtomPair &a)
 Prints the atom pair.

Detailed Description

Implementation of the RigidCLL algorihtm described in

  • V. Ruiz de Angulo, J. Cortés, J. M. Porta, Rigid-CLL: Avoiding Constant-distance Computations in Cell Linked-Lists Algorithms, Journal of Computational Chemistry, Vol. 33, No. 3, pp. 294-300, 2012

Definition in file RigidCLL.cpp.


Define Documentation

#define BB_MARGIN   2

When defining the grid, we use the bounding box in a given configuration and we enlarge it with a given margin. This margin is the one given in this constant and it is measured in bounding boxes. It is symmetrically applied to the two extremes of the bounding box along each axes.

If the bounding box along a given axis is [1,4] then the grid is defined in the range:

  • 1-BB_MARGIN*3
  • 4+BB_MARGIN*3

where 3 is the size of the bounding box (3=4-1).

This extension of the bounding box is usually enough, but if a molecule moves al lot it might not be sufficient. In this case RigidCLL would fail, this margin should be enlarged, and the library recompiled.

Todo:
Implement a version of RigiCLL which does not depent on the bounding box.

Definition at line 39 of file RigidCLL.cpp.

Referenced by RigidCLL::WarmUp().

#define MAX_UINT   std::numeric_limits<unsigned int>::max()
#define INF   std::numeric_limits<double>::max()

A very large number. We assume all atom coordinates are always below this value.

Definition at line 62 of file RigidCLL.cpp.

Referenced by RigidCLL::WarmUp().

#define MANHATTAN_DISTANCE ( dx,
dy,
dz,
a1,
a2   )     dx=a1->cp[0]-a2->cp[0];dy=a1->cp[1]-a2->cp[1];dz=a1->cp[2]-a2->cp[2]

Distance between two atoms computed for each of the 3 dimensions. This is used when computing the (squared) distance between two atoms.

Definition at line 70 of file RigidCLL.cpp.

Referenced by RigidCLL::BruteForceInteractions(), RigidCLL::BruteForceStericClash(), RigidCLL::CLLInteractions(), AtomInfo::distance(), and RigidCLL::Interactions().


Function Documentation

ostream& operator<< ( ostream &  os,
const AtomInfo a 
)

Prints the information stored in the atom.

Definition at line 113 of file RigidCLL.cpp.

References AtomInfo::cp, AtomInfo::id, AtomInfo::op, and AtomInfo::rID.

ostream& operator<< ( ostream &  os,
const AtomPair a 
)

Prints the information stored in the atom pair.

Definition at line 151 of file RigidCLL.cpp.

References AtomPair::a1, AtomPair::a2, AtomPair::d2, AtomPair::r1, and AtomPair::r2.