add the possibility to search for minimum and maximum weight inside a particle file