Possible regression loading .gsd files with diameter change from default diameter
I came across a possible regression in reading .gsd files that use the default diameter.
Works: 3.3.4 Pro
Broken: 3.4.4 Pro, 3.5.0 Pro
I generate the file defaults.gsd of some particles with a different diameter (1 and 1.1) on each frame.
Expected behavior: dragging the time slider between frames 0 and 1 and back updates the diameter in the display and the radius in the Particles data table.
Actual behavior: The particles are loaded with correct size at first. However, after displaying frame 1, the particles are drawn with diameter 1.1 even if the time slider is dragged back to frame 0.
When using the file non-defaults.gsd, I get the expected behavior. The difference is that non-defaults.gsd has a diameter of 2 on frame 0, which is not the default value in the gsd spec.
Code to generate the gsd files using gsd version 2.4.0:
import gsd.hoomd
f=gsd.hoomd.open(name='defaults.gsd',mode='wb')
s = gsd.hoomd.Snapshot()
s.particles.N=2
s.particles.types=['A']
s.particles.typeid=[0,0]
s.particles.position=[[0,0,0],[2,0,0]]
s.configuration.box=[3,3,3,0,0,0]
s.particles.diameter=[1, 1]
f.append(s)
s.particles.diameter = [1.1, 1.1]
f.append(s)
f2 = gsd.hoomd.open(name='non-defaults.gsd',mode='wb')
s.particles.diameter=[2, 2]
f2.append(s)
s.particles.diameter = [1.1, 1.1]
f2.append(s)