PyEMMA icon indicating copy to clipboard operation
PyEMMA copied to clipboard

IndexError: index 188 is out of bounds for axis 0 with size 184

Open vas2201 opened this issue 3 years ago • 3 comments

HI ,

I am getting following error, while doing msm analysis, Could you please suggest me how to fix this error ?

Regards Vas


IndexError Traceback (most recent call last) Cell In[39], line 4 1 fig, axes = plt.subplots(1, 2, figsize=(10, 6), sharex=True, sharey=True) 2 pyemma.plots.plot_contour( 3 *tica_concatenated[:, :2].T, ----> 4 msm.pi[dtrajs_concatenated], 5 ax=axes[0], 6 mask=True, 7 cbar_label='stationary distribution') 8 pyemma.plots.plot_free_energy( 9 *tica_concatenated[:, :2].T, 10 weights=np.concatenate(msm.trajectory_weights()), 11 ax=axes[1], 12 legacy=False, kT=0.6, cbar_label='Free Energy (kcal/mol)') 13 for ax in axes.flat:

IndexError: index 188 is out of bounds for axis 0 with size 184

vas2201 avatar Jan 30 '23 21:01 vas2201

use msm.pi[np.concatenate(msm.dtrajs_active)] instead.

vas2201 avatar Jan 31 '23 16:01 vas2201

Is there a way to keep all microstates? I tried using mincount_connectivity=0 in bayesian_markov_model() but it didn't change anything.

AChatzigoulas avatar Mar 01 '23 18:03 AChatzigoulas

For it to be a valid msm with associated stationary distribution over all states you need regularization or ideally more statistics. It'll currently subselect the largest set of micro states which are still connected. Mincount connectivity in that sense is a misleading name, it means that it there are strictly more than 0 counts it's deemed connected

clonker avatar Mar 02 '23 16:03 clonker