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

ValueError: too many values to unpack #21

Open
hovo1990 opened this issue Mar 12, 2015 · 4 comments
Open

ValueError: too many values to unpack #21

hovo1990 opened this issue Mar 12, 2015 · 4 comments

Comments

@hovo1990
Copy link

Trying python alchemical_analysis.py -d gromacs/data/3-methylindole-38steps -q xvg -p dhdl -u kJ -v
and I get

/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:236: RuntimeWarning: xtol=0.000000 is too small, no further improvement in the approximate
solution is possible.
warnings.warn(msg, RuntimeWarning)
Final dimensionless free energies
f_k =
[ 0. 2.85435075 5.36683423 7.54310132 9.41062672
11.00680904 12.36821823 13.52539 14.50082038 15.30933876
15.95876113 13.96406986 13.58387343 13.99782737 14.35144787
14.74395871 15.13605675 15.48968283 15.76312185 15.86488891
15.89546715 15.88720731 15.82995611 15.71117856 15.51663687
15.2322169 14.84601322 14.35037166 13.74694486 13.05530028
12.31496947 11.57396348 10.87411229 10.24438184 9.70162777
8.90365663 8.48915993 8.43014626]
MBAR initialization complete.
Traceback (most recent call last):
File "alchemical_analysis.py", line 1103, in
Deltaf_ij, dDeltaf_ij = estimatewithMBAR(u_kln, N_k, P.relative_tolerance, regular_estimate=True)
File "alchemical_analysis.py", line 239, in estimatewithMBAR
(Deltaf_ij, dDeltaf_ij) = MBAR.getFreeEnergyDifferences(uncertainty_method='svd-ew')
ValueError: too many values to unpack

@AMecklenfeld
Copy link

Hi,

I get the same error when using the tool on a cluster - on a local desktop pc it works just fine.
Have you been able to solve this problem?

@Lnaden
Copy link

Lnaden commented Nov 12, 2015

Which version(s) of MBAR are you running with this script?

I think it was 2.0 of mbar.py where the returns in getFreeEnergyDifferences() changed from just Deltaf_ij, dDeltaf_jj to Deltaf_ij, dDeltaf_ij, Theta_ij where Theta_ij is the co-variance matrix. By default, Theta_ij is returned as None unless requested with the keyword so that the length and order of the returns object is consistent.

@schlaicha
Copy link

Hi,

the problem with the return value of MBAR.getFreeEnergyDifferences() still persists and can indeed be fixed by changing the line accordingly,
(Deltaf_ij, dDeltaf_ij, Theta_ij) = MBAR.getFreeEnergyDifferences(uncertainty_method='svd-ew').

However, the covariance matrix is not used at all in alchemical_analysis.py am I right?

Thanks for feedback! Alex

@Lnaden
Copy link

Lnaden commented Mar 29, 2016

Correct, alchemical_analysis.py does not use the Theta_ij matrix. The only script in this repository that fetches the covariance is the harmonic-oscillators.py script for computeMultipleExpectations.

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

4 participants