Writing a fix to apply a custom wall force
Here is a list of changes that are made to the source code:
- The existing files that have been modified are
fix_wall_region.cpp
andfix_wall_region.h
. - The methods that have been modified are constructor,
init()
, andpost_force()
. - The new method added is
lj126Expanded()
. - The new input parameter introduced is
deltaLJ
. - The LAMMPS syntax is
fix FIX_NAME GROUP wall/region REGION lj126Expanded EPSILON SIGMA DELTALJ CUTOFF
(we'll review this syntax in this section).
In this section, we will add a custom wall potential to the inventory of existing ones in the Fix Wall/Region
class.
Theory (expanded Lennard–Jones wall force)
The Fix Wall/Region
class (https://lammps.sandia.gov/doc/fix_wall_region.html) defines the surface of a region as a wall that can apply forces to an atom that interacts with it. This force of interaction can be defined in terms of a potential function (for example, Lennard–...