|
bool | saveAtomsRecursively (StreamSaveContext &ssc, const Box &box, unsigned cnt, const unsigned atoms[], int depth) const |
| This is a recursive procedure that generates the grid points that lie in the specified bounding box. More...
|
|
unsigned | saveAtomGridInBox (unsigned iAtom, const Box &box, BoxPartitioner &partitioner, unsigned cnt, const unsigned atoms[], int(*shlBlocks)[2], FILE *stream) const |
| Method saves all grid points associated with specified atom, located in the specified box. More...
|
|
unsigned | noOfAtoms () const |
|
const AtomicGrid & | getAtomicGrid (unsigned i) const |
|
void | addAtom (const real coor[3], int charge, int atomNo) |
|
void | addAtom (const Atom &at, int atomNo) |
|
unsigned | saveBatch (unsigned batchLength, real(*coor)[3], real *weight, unsigned nBlocks, int(*shlBlocks)[2], FILE *f) const |
| Saves a batch of grid points to given file. More...
|
|
Streamlined, abstract grid generation class.
This class does not depend explicitly on the representation of the basis set and molecule. All such dependence is abstracted away in case the grid generator is to be used with another program.
unsigned Stream::saveAtomGridInBox |
( |
unsigned |
iAtom, |
|
|
const Box & |
box, |
|
|
BoxPartitioner & |
partitioner, |
|
|
unsigned |
cnt, |
|
|
const unsigned |
relevantAtoms[], |
|
|
int(*) |
shlBlocks[2], |
|
|
FILE * |
stream |
|
) |
| const |
|
protected |
Method saves all grid points associated with specified atom, located in the specified box.
It will also save the associated auxiliary information (usually a list of active orbitals) - this is why we pass an atom list. FIXME: this probably needs to be thought through: what factor decides the atom radius, really? Is it max(auxiliaryRadius, gridRadius)?
References AtomicGrid::center, Box::contains(), BoxPartitioner::coor, Box::getDistanceTo(), AtomicGrid::getRadialGrid(), Box::hi, ll_sphere(), Box::lo, RadialGrid::nAngular, RadialGrid::noOfRadPoints, BoxPartitioner::process(), RadialGrid::rad, Vector3D::v, and RadialGrid::weights.
bool Stream::saveAtomsRecursively |
( |
StreamSaveContext & |
ssc, |
|
|
const Box & |
box, |
|
|
unsigned |
atomCount, |
|
|
const unsigned |
atomIndices[], |
|
|
int |
depth |
|
) |
| const |
|
protected |
This is a recursive procedure that generates the grid points that lie in the specified bounding box.
As an optimization, a list of atoms that may overlap with given grid is passed so that linear scaling can be achieved. This goal is achieved by recursive division of the bounding box until there are no atoms that can overlap with it, or the minimal size is achieved. In the latter case, all atoms are iterated over and the grid points associated with them that lie in the bounding box are saved. An associated auxiliary information is saved as well.
An atom is considered relevant for given box, if its Voronoi polyhedra (+safety margin) overlaps with the box.
- Parameters
-
ssc | the saving context containing information about selected partitioner and other grid generation specifics. |
box | save only the points within the box. |
atomCount | the number of potentially relevant atoms that have grids overlapping with the box in question.. |
atomIndices | ... and their indices in the global array. |
depth | the recursion depth for logging purposes. |
randomly chosen parameter. We need in general a better way to determing whether the voronoi polyhedra associated with a given atom overlaps with the box in question...
References StreamSaveContext::boxCount, AtomicGrid::center, Box::getMaxDim(), Box::hi, Box::lo, StreamSaveContext::myRank, Box::overlapsWith(), StreamSaveContext::partitioner, AtomicGrid::radius(), StreamSaveContext::savedPoints, StreamSaveContext::shlBlocks, Box::size(), StreamSaveContext::stream, and Vector3D::v.
Referenced by saveThread().