explain that the computed force in python pair is force/r same as in Pair:single()

This commit is contained in:
Axel Kohlmeyer
2022-01-03 10:12:38 -05:00
parent 8c95a8db23
commit 90726ca088
2 changed files with 28 additions and 28 deletions

View File

@ -126,11 +126,11 @@ and *compute_energy*, which both take 3 numerical arguments:
* itype = the (numerical) type of the first atom
* jtype = the (numerical) type of the second atom
This functions need to compute the force and the energy, respectively,
and use the result as return value. The functions need to use the
*pmap* dictionary to convert the LAMMPS atom type number to the symbolic
value of the internal potential parameter data structure. Following
the *LJCutMelt* example, here are the two functions:
This functions need to compute the (scaled) force and the energy,
respectively, and use the result as return value. The functions need
to use the *pmap* dictionary to convert the LAMMPS atom type number
to the symbolic value of the internal potential parameter data structure.
Following the *LJCutMelt* example, here are the two functions:
.. code-block:: python
@ -154,10 +154,10 @@ the *LJCutMelt* example, here are the two functions:
for consistency with the C++ pair styles in LAMMPS, the
*compute_force* function follows the conventions of the Pair::single()
methods and does not return the full force, but the force scaled by
the distance between the two atoms, so this value only needs to be
multiplied by delta x, delta y, and delta z to conveniently obtain the
three components of the force vector between these two atoms.
methods and does not return the pairwise force directly, but the force
divided by the distance between the two atoms, so this value only needs
to be multiplied by delta x, delta y, and delta z to conveniently obtain
the three components of the force vector between these two atoms.
----------