pymbar icon indicating copy to clipboard operation
pymbar copied to clipboard

NameError: name 'ConvergenceError' is not defined

Open PhilippHoellmer opened this issue 1 year ago • 0 comments

In line 1963 of pymbar/pymbar/mbar.py, the code tries to catch a ConvergenceError that is nowhere defined in that file. Hence, if that part of the code is reached, one gets a NameError.

The simple solution is to import the ConvergenceError from pymbar.utils at the top of the file.

As a related question: At the same place of the code, would it also make sense to catch the pymbar.utils.BoundsError that, as the pymbar.utils.ConvergenceError, can be thrown by the bar function?

PhilippHoellmer avatar Feb 13 '24 16:02 PhilippHoellmer