A pair-search grid object for one domain decomposition zone.
This is a rectangular 3D grid covering a potentially non-rectangular volume which is either the whole unit cell or the local zone or part of a non-local zone when using domain decomposition. The grid cells are even spaced along x/y and irregular along z. Each cell is sub-divided into atom clusters. With a CPU geometry, each cell contains 1 or 2 clusters. With a GPU geometry, each cell contains up to 8 clusters. The geometry is set by the pairlist type which is the only argument of the constructor.
When multiple grids are used, i.e. with domain decomposition, we want to avoid the overhead of multiple coordinate arrays or extra indexing. Therefore each grid stores a cell offset, so a contiguous cell index can be used to index atom arrays. All methods returning atom indices return indices which index into a full atom array.
Note that when atom groups, instead of individual atoms, are assigned to grid cells, individual atoms can be geometrically outside the cell and grid that they have been assigned to (as determined by the center or geometry of the atom group they belong to).
|
| Grid (PairlistType pairlistType, const bool &haveFep, PinningPolicy pinningPolicy) |
| Constructs a grid given the type of pairlist.
|
|
const Geometry & | geometry () const |
| Returns the geometry of the grid cells.
|
|
const GridDimensions & | dimensions () const |
| Returns the dimensions of the grid.
|
|
int | numColumns () const |
| Returns the total number of grid columns.
|
|
int | numCells () const |
| Returns the total number of grid cells.
|
|
int | cellOffset () const |
| Returns the cell offset of (the first cell of) this grid in the list of cells combined over all grids.
|
|
int | numCellsColumnMax () const |
| Returns the maximum number of grid cells in a column.
|
|
int | srcAtomBegin () const |
| Returns the start of the source atom range mapped to this grid.
|
|
int | srcAtomEnd () const |
| Returns the end of the source atom range mapped to this grid.
|
|
int | firstCellInColumn (int columnIndex) const |
| Returns the first cell index in the grid, starting at 0 in this grid.
|
|
int | numCellsInColumn (int columnIndex) const |
| Returns the number of cells in the column.
|
|
int | firstAtomInColumn (int columnIndex) const |
| Returns the index of the first atom in the column.
|
|
int | numAtomsInColumn (int columnIndex) const |
| Returns the number of real atoms in the column.
|
|
ArrayRef< const int > | cxy_na () const |
| Returns a view of the number of non-filler, atoms for each grid column. More...
|
|
ArrayRef< const int > | cxy_ind () const |
| Returns a view of the grid-local cell index for each grid column. More...
|
|
int | numAtomsPerCell () const |
| Returns the number of real atoms in the column.
|
|
int | paddedNumAtomsInColumn (int columnIndex) const |
| Returns the number of atoms in the column including padding.
|
|
int | atomIndexEnd () const |
| Returns the end of the atom index range on the grid, including padding.
|
|
bool | clusterIsPerturbed (int clusterIndex) const |
| Returns whether any atom in the cluster is perturbed.
|
|
bool | atomIsPerturbed (int clusterIndex, int atomIndexInCluster) const |
| Returns whether the given atom in the cluster is perturbed.
|
|
unsigned int | fepBits (int clusterIndex) const |
| Returns the free-energy perturbation bits for the cluster.
|
|
ArrayRef< const BoundingBox > | iBoundingBoxes () const |
| Returns the i-bounding boxes for all clusters on the grid.
|
|
ArrayRef< const BoundingBox > | jBoundingBoxes () const |
| Returns the j-bounding boxes for all clusters on the grid.
|
|
ArrayRef< const float > | packedBoundingBoxes () const |
| Returns the packed bounding boxes for all clusters on the grid, empty with a CPU list.
|
|
ArrayRef< const BoundingBox1D > | zBoundingBoxes () const |
| Returns the bounding boxes along z for all cells on the grid.
|
|
ArrayRef< const int > | clusterFlags () const |
| Returns the flags for all clusters on the grid.
|
|
ArrayRef< const int > | numClustersPerCell () const |
| Returns the number of clusters for all cells on the grid, empty with a CPU geometry.
|
|
int | atomToCluster (int atomIndex) const |
| Returns the cluster index for an atom.
|
|
int | numClusters () const |
| Returns the total number of clusters on the grid.
|
|
void | setDimensions (int ddZone, int numAtoms, const RVec &lowerCorner, const RVec &upperCorner, real *atomDensity, real maxAtomGroupRadius) |
| Sets the grid dimensions. More...
|
|
void | setCellIndices (int ddZone, int cellOffset, GridSetData *gridSetData, ArrayRef< GridWork > gridWork, Range< int > atomRange, int numGridAtomsWithoutFillers, ArrayRef< const int32_t > atomInfo, ArrayRef< const RVec > x, nbnxn_atomdata_t *nbat) |
| Sets the cell indices using indices in gridSetData and gridWork .
|
|