Closed salotz closed 1 year ago
The underlying issue is that we are using the OpenMMState.sim_state.getForces(asNumpy=True)
. If asNumpy=False
then it raises an error, but if True
then it returns a numpy array of the right shape filled with 0s that has no units.
This should probably be an upstream bug but I want to check on the latest OpenMM, I'm testing this 7.7.0.
Currently if the velocities are missing from an initial state the
HDF5Reporter
will raise an error in the case that the velocities are somehow autogenerated by the bound context. These autogenerated velocities are not necessarily unitted and so the probe for the velocities units will fail. Relevant stack trace portion: