Now, we can use Eq. 334 in a Monte Carlo simulation of a system of charges, provided that periodic boundary conditions are used and the domain is cubic. (Extensions to non-cubic boxes and slab geometries are discussed to a limited extent in F&S.) We can also use the Ewald technique to calculate forces for use in molecular dynamics simulations.
The force on particle 
 due to the charges in the system is
given by
| (337) | 
For our purposes, the two contributions to 
 are due
to the 
-space energy and the short-ranged, real-space energy:
| (338) | 
The 
-space contribution is given by
![]()  | 
(339) | 
The real-space contribution is given by
![]()  | 
(340) |