replace particles.state() by save_state()/restore_state()

2 jobs for master in 1 minute and 41 seconds