Implement particles with variable masses from hdf5 snapshots