The forces acting between atoms can be obtained by differentiation of the total energy with respect to atom positions. That is, to get the force on atom i one should take the three-dimensional derivative (gradient) of the potential V tot with respect to the position of atom i :