malramsay64 / statdyn-analysis

Collection of tools for the statistical dynamics analysis of Molecular Dynamics trajectories.
MIT License
6 stars 0 forks source link

Attempt to handle assertion errors #81

Closed malramsay64 closed 5 years ago

malramsay64 commented 5 years ago

I came across an assertion error

  File "/home/malcolm/.miniconda/envs/dynamics/lib/python3.6/site-packages/sdanalysis/frame.py", line 149, in _get_num_bodies
    assert num_particles == len(snapshot.particles.position)
AssertionError

which should attempt to be handled gracefully, particularly since this processing runs for so long

malramsay64 commented 5 years ago

There should be no assertions, with everything raising a runtime error instead which can be captured at a higher level.

malramsay64 commented 5 years ago

Fixed for most issues that will be found.