Skip to content
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

pymbar.utils.ParameterError encountered with MBAR estimator #407

Open
xiki-tempula opened this issue Aug 26, 2020 · 1 comment
Open

pymbar.utils.ParameterError encountered with MBAR estimator #407

xiki-tempula opened this issue Aug 26, 2020 · 1 comment

Comments

@xiki-tempula
Copy link

I'm using alchemlyb as an interface to do MBAR calculations, where I found that for a set of dhdl files generated with Gromacs, mbar estimate will fail when using pymbar==3.0.5, giving:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/XXX/miniconda3/envs/flamel/lib/python3.8/site-packages/alchemlyb/estimators/mbar_.py", line 90, in fit
    out = self._mbar.getFreeEnergyDifferences(return_theta=True)
  File "/Users/XXX/miniconda3/envs/flamel/lib/python3.8/site-packages/pymbar/mbar.py", line 541, in getFreeEnergyDifferences
    Theta_ij = self._computeAsymptoticCovarianceMatrix(
  File "/Users/XXX/miniconda3/envs/flamel/lib/python3.8/site-packages/pymbar/mbar.py", line 1679, in _computeAsymptoticCovarianceMatrix
    check_w_normalized(W, N_k)
  File "/Users/XXX/miniconda3/envs/flamel/lib/python3.8/site-packages/pymbar/utils.py", line 358, in check_w_normalized
    raise ParameterError(
pymbar.utils.ParameterError: Warning: Should have \sum_n W_nk = 1.  Actual column sum for state 0 was 0.000092. 11 other columns have similar problems

However, when using pymbar==3.0.dev3 gives the correct answer.

The code to reproduce the problem is:

from alchemlyb.parsing.gmx import extract_u_nk
import pandas as pd
u_nk = pd.concat([extract_u_nk('dhdl_{}.xvg'.format(i), T=310) for i in range(11)])
from alchemlyb.estimators import MBAR
MBAR().fit(u_nk)

The files are https://drive.google.com/file/d/16bJGCEflqEm5xZhfOQbZ4TSNhorfob4m/view?usp=sharing

@xiki-tempula xiki-tempula changed the title pymbar.utils.ParameterError pymbar.utils.ParameterError encountered with MBAR estimator Aug 26, 2020
@davidlmobley
Copy link

cc @mrshirts -- same issue as #419 it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants