Exploring the general structure of fixes
In this section, we will skim through some methods commonly found in fix child classes.
Individual fixes inherit from fix.cpp
and fix.h
, where the parent classes read the first three arguments (fix ID, group ID, and fix style) from the LAMMPS input script. An essential method that must be present in the child classes is setmask()
, which dictates the place of the fix in the sequence of executing the timestep (see Chapter 3, Source Code Structure and the Stages of Execution). Other methods are incorporated as required in the fix and a full list of methods that can be inherited is available in the fix.h
file.
In the following sections, we will analyze some selected fixes and describe their functionalities using their source codes.