allocate less memory by putting a limit on number of particles allowed
in a box