8000 Allow override t0 and g_t when computing free energy by zhang-ivy · Pull Request #585 · choderalab/openmmtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow override t0 and g_t when computing free energy #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion openmmtools/multistate/multistateanalyzer.py
7E38
Original file line number Diff line number Diff line change
Expand Up @@ -1442,11 +1442,18 @@ def get_effective_energy_timeseries(self, energies=None, neighborhoods=None, rep
logger.debug("Done.")
return u_n

def _compute_mbar_decorrelated_energies(self):
def _compute_mbar_decorrelated_energies(self, t0=None, subsample_rate=None):
"""Return an MBAR-ready decorrelated energy matrix.

The data is returned after discarding equilibration and truncating
the iterations to self.max_n_iterations.

Parameters
----------
t0 : int, optional
the number of equilibrated iterations to override number_equilibrated
subsample_rate : int, optional
the subsample rate to override g_t

Returns
-------
Expand All @@ -1464,6 +1471,8 @@ def _compute_mbar_decorrelated_energies(self):
# Use the cached information to generate the equilibration data.
sampled_energy_matrix, unsampled_energy_matrix, neighborhoods, replicas_state_indices = energy_data
number_equilibrated, g_t, Neff_max = self._get_equilibration_data(sampled_energy_matrix, neighborhoods, replicas_state_indices)
number_equilibrated = t0 if t0 is not None else number_equilibrated
g_t = subsample_rate if subsample_rate is not None else g_t

logger.debug("Assembling uncorrelated energies...")

Expand Down
0