def __init__(self, num_particles, D, box, rs=None, seed=<NUM_LIT:1>, particles=None):
if rs is None:<EOL><INDENT>rs = np.random.RandomState(seed=seed)<EOL><DEDENT>self.rs = rs<EOL>self.init_random_state = rs.get_state()<EOL>self.box = box<EOL>if particles is None:<EOL><INDENT>self._plist = self._generate(num_particles, D, box, rs)<EOL><DEDENT>else:<EOL><INDENT>self._plist = list(particles)<EOL><DEDENT>self.rs_hash = hash_(self.init_random_state)[:<NUM_LIT:3>]<EOL>
A set of `N` Particle() objects with random position in `box`.

        Arguments:
            num_particles (int): number of particles to be generated
            D (float): diffusion coefficient in S.I. units (m^2/s)
            box (Box object): the simulation box
            rs (RandomState object): random state object used as random number
                generator. If None, use a random state initialized from seed.
            seed (uint): when `rs` is None, `seed` is used to initialize the
                random state. `seed` is ignored when `rs` is not None.
            particles (list or None): when not None, initialize the object from
                this list that must containing only `Particle` objects.