.. index:: pair: struct; rgpot::HalfList .. _doxid-structrgpot_1_1_half_list: struct rgpot::HalfList ====================== .. toctree:: :hidden: Overview ~~~~~~~~ A host's half neighbour list over its atoms and their copies. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct HalfList { // fields std::size_t :target:`nAtoms` = 0; std::size_t :target:`nOwned` = 0; const double* :ref:`pos` = nullptr; const int* :ref:`atmnrs` = nullptr; std::size_t :target:`nRows` = 0; const int* :target:`rows` = nullptr; const int* :target:`count` = nullptr; const int*const* :target:`neighbours` = nullptr; int :target:`indexMask` = ~0; bool :target:`newton` = false; }; .. _details-structrgpot_1_1_half_list: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A host's half neighbour list over its atoms and their copies. :ref:`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 ------ .. index:: pair: variable; pos .. _doxid-structrgpot_1_1_half_list_1a3251a86bf4c293e43df21aa83ef0193d: .. ref-code-block:: cpp :class: doxyrest-title-code-block const double* pos = nullptr 3 \* nAtoms Cartesian coordinates. .. index:: pair: variable; atmnrs .. _doxid-structrgpot_1_1_half_list_1a74665257fb771665f1e42db3b44fb92b: .. ref-code-block:: cpp :class: doxyrest-title-code-block const int* atmnrs = nullptr Atomic number per atom.