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

Incompatibility with pymbar 3.0.4 #119

Closed
simonbray opened this issue Nov 18, 2019 · 2 comments
Closed

Incompatibility with pymbar 3.0.4 #119

simonbray opened this issue Nov 18, 2019 · 2 comments

Comments

@simonbray
Copy link

Hi, just as a disclaimer, I'm not at all familiar with this tool, so maybe there's a very trivial solution to this issue. I came across it while reviewing code for a colleague.

I am working in a conda environment and running this command:

alchemical_analysis -d data -o ./RESULTS -t 300 -s 0 -c -q xvg -p md -g -e -f 10 -w -u kcal

It fails with

Estimating the free energy change with MBAR...
Traceback (most recent call last):
  File "/home/simon/miniconda3/envs/test1/bin/alchemical_analysis", line 10, in <module>
    sys.exit(main())
  File "/home/simon/miniconda3/envs/test1/lib/python2.7/site-packages/alchemical_analysis/alchemical_analysis.py", line 1269, in main
    Deltaf_ij, dDeltaf_ij = estimatewithMBAR(u_kln, N_k, P.relative_tolerance, regular_estimate=True)
  File "/home/simon/miniconda3/envs/test1/lib/python2.7/site-packages/alchemical_analysis/alchemical_analysis.py", line 326, in estimatewithMBAR
    MBAR = pymbar.mbar.MBAR(u_kln, N_k, verbose = P.verbose, relative_tolerance = reltol, initialize = P.init_with)
  File "/home/simon/miniconda3/envs/test1/lib/python2.7/site-packages/pymbar/mbar.py", line 287, in __init__
    self._initializeFreeEnergies(verbose, method=initialize)
  File "/home/simon/miniconda3/envs/test1/lib/python2.7/site-packages/pymbar/mbar.py", line 1745, in _initializeFreeEnergies
    w_F, w_R, relative_tolerance=0.000001, verbose=False, compute_uncertainty=False)
TypeError: unsupported operand type(s) for +: 'float' and 'dict'

It seems the cause of the error is the newest (3.0.4) version of pymbar. When I run conda install pymbar==3.0.3 and then retry the command above it completes successfully.

ping @tsenapathi

@davidlmobley
Copy link
Member

Thanks. We have no plans to make further updates to this package and suggest using alchemlyb instead. If you find it doesn't have the functionality you need in terms of graphics, etc., we'd love to have your help migrating that functionality from here.

As per our main README.md:

Use Alchemlyb instead
We are in the process of migrating all functionality from here to instead use alchemlyb, which focuses on being a general Python library for performing analysis of alchemical calculations rather than a stand-alone command-line tool for analyzing these calculations. We recommend you move to using, and contribute to the development of, alchemlyb instead. It already has the following advantages, among others:

  • Python 3 compatible
  • Works as a library rather than a stand-alone tool, allowing easier connection with trajectory analysis
  • Has automated testing/continuous integration testing
  • Easily extensible
    However, some of the plotting functionality and analysis features available in alchemical analysis are not yet available in alchemlyb. If there is functionality which is particularly important to you which is missing there, please raise an issue on the alchemlyb issue tracker.

In the meantime, Alchemical Analysis is still available but deprecated and we discourage its use. Please use alchemlyb instead. We may occasionally perform minor/critical maintenance here, but intend to cease maintaining this package over time.

@simonbray
Copy link
Author

I understand, thanks for the reply.

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