msmbuilder / msmbuilder-legacy

Legacy release of MSMBuilder
http://msmbuilder.org
GNU General Public License v2.0
25 stars 28 forks source link

Checking for empty states #331

Closed rmcgibbo closed 10 years ago

rmcgibbo commented 10 years ago

Currently, you get an error like this when trying to use SaveStructures.py if a state has no assignments (and thus the variable state_counts==0)

  File "/home/lilipeng/epd/epd-7.3-2-rh5-x86_64/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/msmbuilder/project/project.py", line 299, in randomize
    result = random.randint(0, state_counts, size=size)
  File "mtrand.pyx", line 874, in mtrand.RandomState.randint (numpy/random/mtrand/mtrand.c:5970)
ValueError: low >= high

This might be a little more interpretable

rmcgibbo commented 10 years ago

That traceback comes from @lilipeng.

kyleabeauchamp commented 10 years ago

+1