# Forces

The forces acting on the atoms (technically, the *atomic nuclei*) are the negative gradients of the total energy with respect to the atomic positions, i.e., the usual definition:

[math]\displaystyle{ F_i^k = - \frac{\partial E}{\partial r_i^k}, }[/math]

where *i* is the atom index and *k* is each of the three Cartesian dimensions. Perhaps unintuitively, in GAP theory the force acting on atom *i* does not only depend on the atomic environment of *i* within its cutoff sphere of radius [math]\displaystyle{ r_\text{cut} }[/math]; it depends on the atomic environment within a sphere of radius [math]\displaystyle{ 2 r_\text{cut} }[/math] (i.e., the volume of the environment for force calculation is 8 times larger than for local energy calculation). This is because the force will depend on the derivatives of the local energies [math]\displaystyle{ \epsilon_j }[/math] like so:

[math]\displaystyle{ F_i^k = - \sum_j \frac{\partial \epsilon_j}{\partial r_i^k}, }[/math]

and the local energies in GAP generally depend on the *entire* atomic environment. Imagine three atoms on a straight line, *i*, *j* and *l*, where *j* is in the middle and *i* and *l* are separated by [math]\displaystyle{ 2 r_\text{cut} }[/math]. [math]\displaystyle{ \epsilon_i }[/math] does not depend on *l*, since *l* is outside of *i*'s cutoff sphere. However, the derivative [math]\displaystyle{ \partial \epsilon_j / \partial r_i^k }[/math] depends on *l* because *l* is within *j'*s cutoff sphere.

Currently, **TurboGAP** reports forces in the trajectory_out.xyz file, as an array property following ASE's extended XYZ format.