choderalab / pymbar

Python implementation of the multistate Bennett acceptance ratio (MBAR)
http://pymbar.readthedocs.io
MIT License
240 stars 93 forks source link

Should the histogram code automatically correct the PMF for unequal bins? #388

Closed mrshirts closed 2 years ago

mrshirts commented 4 years ago

If there are nonequal width bins, then larger bins have more probability and thus a lower free energy. Example; if there are 100 samples, and 50 of them are uniformly between 0 and 90, and 50 are between 90 and 100, and there are two bins, they will have equal free energy, but the PMF should be lower in the 90-100, bin, since it has 10x the density of points.

If one subtracts -ln(bin_width) from each bin, the resulting free energies are a better match.

Right now, we expect people to do it themselves. But perhaps we should do it automatically.

jaimergp commented 4 years ago

Maybe an optional keyword? Something like correct_unequal_bins=True?