Reviewing the general structure of pair styles
As described in Chapter 3, Source Code Structure and Stages of Execution, each individual pair style inherits from pair.cpp
and pair.h
, including the init()
method.
In this section, we briefly cover the methods commonly used in the child pair style classes that are inherited from the pair.cpp
and pair.h
classes.
The parent classes take care of validating pair coefficient assignments, mixing parameters, determining cutoff, requesting neighbor lists, and setting up computations. Some of the methods and variables are also inherited from pair.h
. Hybrid styles are accommodated by the pair_hybrid.cpp
and pair_hybrid_overlay.cpp
classes.
The child pair style classes commonly contain the following methods:
allocate()
allocates memory to arrays used to calculate pair interaction forces.settings()
reads and processes global pair potential parameters entered after thepair_style
command in the LAMMPS input script.coeff...