added get_particles and get_compartments functions