|
|
download LAMMPS [lammps-23Jun2022.tar.gz](https://download.lammps.org/tars/lammps-23Jun2022.tar.gz) St. Joan edition here (version used in this study)
|
|
|
|
|
|
# Introduction
|
|
|
|
|
|
LAMMPS is a classical molecular dynamics simulation code with a focus in materials modeling.
|
... | ... | @@ -14,13 +16,24 @@ The input contains two files: |
|
|
- `pair_style lj/charmm/coul/long 8.0 10.0` This is the line that specifies that we are using the *lj/charmm/coul/charmm* *pair_style*. If a different *pair_style* was selected, then `PairLJCharmmCoulLong::compute` would not be executed, and the optimizations would not have any impact. Moreover, the `8.0`and `10.0` represent the *cutoff distances*, which can have an impact to the execution of the function. For more information, check the LAMMPS [documentation](https://docs.lammps.org/pair_charmm.html#pair-style-lj-charmm-coul-long-command).
|
|
|
- `data.protein`: contains the initial data for the atoms in the simulation and their properties
|
|
|
|
|
|
# Algorithm
|
|
|
# Algorithm and Data structures
|
|
|
|
|
|
|
|
|
FIXME neighbor
|
|
|
LAMMPS computes interactions between atoms.
|
|
|
If a pair of atoms is "close" (within the *pair_style* cutoff distance), it produces a *short-range* interaction in "real space" and is computed using a *pair_style*.
|
|
|
If a pair of atoms are "neighbors" (that is, they are placed the *pair_style* cutoff distance), it produces a *short-range* interaction in "real space" and is computed using a *pair_style*.
|
|
|
If atoms aren't within the cutoff distance, these become *long-range* interactions in "reciprocal space" (FFT domain).
|
|
|
The `PairLJCharmmCoulLong::compute` computes short-range interactions.
|
|
|
|
|
|
File `neigh_list.h` contains the `int **firstneigh` array.
|
|
|
Note that the `**` denotes that it is a double pointer or pointer to pointer.
|
|
|
In other words, `int **firstneigh` is a pointer to an array of pointers to arrays of `int`.
|
|
|
|
|
|
`firstneigh[i]` contains an array of the
|
|
|
|
|
|
atom_vec.h -> contains `**x` and `**f` (3D)
|
|
|
neigh_list.h -> contains `**firstneigh` (for each i, store array of neighbors j)
|
|
|
|
|
|
LAMMPS uses 64-bit `double` precision numbers for floating point calculations and 32-bit `int` numbers for integer computations.
|
|
|
This can become somewhat of an issue with the `jlist` array, which is an array of `int`s which act as indexes of `x` and
|
|
|
|
... | ... | |