Open ashiquelal opened 7 months ago
Used the Umbrella sampling example with my data. Gave me the following when the nbins where higher than an particular value:
File ~/opt/anaconda3/envs/pymbar/lib/python3.10/site-packages/pymbar/fes.py:1470 in FES._get_fes_histogram(self, x, reference_point, fes_reference, uncertainty_method) -> bin_label = histogram_data["bin_label"][tuple(l)] KeyError: (56,)
Can be solved by change the bin_label = histogram_data["bin_label"][tuple(l)] to (atleast in case 1D)
bin_label = histogram_data["bin_label"][tuple(l)]
try: bin_label = histogram_data["bin_label"][tuple(l)] except KeyError: if np.all(l[0] < bin_label_keys): # out of key below fx_vals[i] = np.nan dfx_vals[i] = np.nan continue if np.all(l[0] >= bin_label_keys): # out of key above fx_vals[i] = np.nan dfx_vals[i] = np.nan continue
Used the Umbrella sampling example with my data. Gave me the following when the nbins where higher than an particular value:
Can be solved by change the
bin_label = histogram_data["bin_label"][tuple(l)]
to (atleast in case 1D)