Requesting a neighbor list
In this section, we will learn how to initialize and access a neighbor list for individual atoms.
The neighbor list is controlled by the NeighList
class represented by neigh_list.cpp
and neigh_list.h
. When a neighbor list is requested, the system neighbor list is generated by neighbour.cpp
, and access to various elements of the neighbor list is facilitated by the Neighlist
class.
In the case of pair styles, the neighbor list is created in pair.h
and is inherited by the child pair classes; this is depicted as follows:
A neighbor list is requested by the Pair:init_style()
method, as shown in Figure 3.6 from Chapter 3, Source Code Structure and Stages of Execution. A full, or a half, neighbor list can be requested as required. In the case of fixes, the fix.h
parent class does not request a neighbor list, so individual child fix classes need to request it when required. In the following...