def pointwise_free_energies(self, therm_state=None): if therm_state is not None: assert 0 <= therm_state < self.nthermo mu = [_np.zeros(b.shape[0], dtype=_np.float64) for b in self.btrajs] _mbar.get_pointwise_unbiased_free_energies( therm_state, _np.log(self.therm_state_counts_full), self.btrajs, self.therm_energies, None, mu) return mu
def mbar_pointwise_free_energies(self, therm_state=None): assert self.mbar_therm_energies is not None, \ 'MEMM has to be estimate()\'d with init=\'mbar\' before pointwise free energies can be calculated.' if therm_state is not None: assert therm_state <= self.nthermo mu = [_np.zeros(d.shape[0], dtype=_np.float64) for d in self.dtrajs] _mbar.get_pointwise_unbiased_free_energies( therm_state, _np.log(self.therm_state_counts_full), self.btrajs, self.mbar_therm_energies, None, mu) return mu