shirtsgroup/cg_openmm

Fix configurational state heat capacities for low population fractions

cwalker7 opened this issue · 0 comments

When bootstrapping the individual state heat capacities with bootstrap_partial_heat_capacities(), KeyErrors can result when certain configurational states have low populations, leading to no data points in some bootstrap trials.

One solution could be to just ignore those trials when computing the average and uncertainty for the configurational states affected (such as by numpy.nanmean and nanstd). The get_partial_heat_capacities() function should be updated to keep track of which states do and don't have data, rather than setting state indices with n_conf_states = len(np.unique(array_folded_states))