Writing a fix to apply a bond-boost potential
This is a list of the changes that are made to the source code:
- The new files that are created are
fix_addboost.cpp
andfix_addboost.h
. - The existing files that have been modified at
fix_addforce.cpp
,fix_addforce.h
, andfix_orient_fcc.cpp
. - The methods that have been modified are constructor, destructor,
init()
, andpost_force()
. - The new method that is added is
init_list()
. - The input parameters are
jgroup
,potentialType
,atomID
,param1
,param2
,param3
, andcutoff
. - The other quantities that are introduced can be seen in a full list in Figure 10.19 in the header file.
- The LAMMPS syntax is
fix FIX_NAME GROUP addboost GROUP2 ATOMID POTENTIAL P1 P2 P3 CUTOFF
(we will reviews this syntax in this section).
In this section, we will create a fix that applies a boost potential and boost force to the atom located farthest from a surface along the z direction, while ensuring that the neighboring atoms that interact...