simularium / simulariumio

Python package that converts simulation outputs to the format consumed by the Simularium viewer website
Apache License 2.0
5 stars 3 forks source link

Bugfix/validate agent id size #116

Closed ascibisz closed 2 years ago

ascibisz commented 2 years ago

Problem

Simulariumio should error if Agent IDs are too large #78

Solution

If agent IDs are larger than a 32-bit signed int, throw a data error instead of writing to the .simulariumio file. This check is optional, and users can save with the validate_ids argument set to False if they want to avoid the additional validation step in order to improve performance.

I also manually verified that all of our converters are generating agent IDs sensibly and not continuing to increment agent IDs unnecessarily in subsequent time steps.

Type of change

Change summary: