struct rgpot::HalfList¶
Overview¶
A host’s half neighbour list over its atoms and their copies. More…
#include <Staged.hpp>
struct HalfList {
// fields
std::size_t nAtoms = 0;
std::size_t nOwned = 0;
const double* pos = nullptr;
const int* atmnrs = nullptr;
std::size_t nRows = 0;
const int* rows = nullptr;
const int* count = nullptr;
const int*const* neighbours = nullptr;
int indexMask = ~0;
bool newton = false;
};
Detailed Documentation¶
A host’s half neighbour list over its atoms and their copies.
Atoms [0, nOwned) are the host’s own and [nOwned, nAtoms) are copies. Row k belongs to the owned atom i = rows[k], whose neighbours are neighbours[i][0 .. count[i]): the layout of a LAMMPS NeighList (ilist, numneigh, firstneigh), with count and neighbours indexed by atom. indexMask clears any bits a host sets in an entry besides the index (LAMMPS NEIGHMASK).
A pair of owned atoms is listed once, in either row. A pair of an owned atom and a copy is listed in the owned atom’s row. With newton, only one of the two hosts that hold such a pair lists it, and the stages write the copy’s share as well for the host to add to its owner (LAMMPS newton_pair on). Without it both hosts list the pair and each writes its own atom. Entries beyond the cutoff are skipped, so a list built with a skin works. A copy sits at its image, so the separation of a pair is the plain difference of its positions.
Fields¶
const double* pos = nullptr
3 * nAtoms Cartesian coordinates.
const int* atmnrs = nullptr
Atomic number per atom.