Resizing the box via system.box_l = new_box_l now throws a runtime error if there are particles present, because particle position folding cannot be guaranteed to be correct; use system.change_volume_and_rescale_particles() instead, which properly rescales particle positions.
Fixes #4834
Description of changes:
system.box_l = new_box_l
now throws a runtime error if there are particles present, because particle position folding cannot be guaranteed to be correct; usesystem.change_volume_and_rescale_particles()
instead, which properly rescales particle positions.