Reviewing the compute group/group class
In this section, we will analyze a more elaborate compute that employs a larger number of methods.
The interaction energy and the forces between two groups of atoms can be obtained using compute group/group
and are implemented by the compute_group_group.cpp
and compute_group_group.h
classes. The LAMMPS input script command to implement this compute is as follows:
compute COMPUTE_ID G1 group/group G2
The COMPUTE_ID
parameter is the unique ID of the compute, while the G1
and G2
parameters are the IDs of the groups of atoms that the compute acts on (see manual: https://lammps.sandia.gov/doc/compute_group_group.html). The optional parameter keywords listed in the manual can be entered after these parameters to specify other options, such as the interaction type (pair potential or electrostatic) and molecule ID (same or different). The constructor method accommodates these optional...