MobleyLab / alchemical-analysis

An open tool implementing some recommended practices for analyzing alchemical free energy calculations
MIT License
120 stars 60 forks source link

Overlap Matrix with MBAR issue: KeyError=2 #125

Open Alfa-1 opened 4 years ago

Alfa-1 commented 4 years ago

Hi All,

I have compiled alchemical_analysis/pymbar with python_2.7.9 and I could not export the overlap matrix within MBAR procedure, though MBAR free energy estimation worked well.

I got this error:

O = MBAR.computeOverlap()[2] KeyError: 2

This issue can be easily fixed by editing the alchemical_analysis.py code.

1) Find this block in the code:

O = MBAR.computeOverlap()[2]

2) change the line to this:

O = MBAR.computeOverlap()['matrix']

I hope it helps, RD

raitis-b commented 3 years ago

Thank you! Was having exactly this problem!