Skip to content

Commit be55f59

Browse files
committed
update
1 parent 8a31787 commit be55f59

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/alchemlyb/workflows/abfe.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,27 @@ def read(self):
113113
f'Reading {len(u_nk)} lines of u_nk from {file}')
114114
u_nk_list.append(u_nk)
115115
except Exception as exc:
116-
msg = f'Error reading read u_nk from {file}.\n{exc}'
116+
msg = f'Error reading read u_nk from {file}.'
117117
if self.ignore_warnings:
118-
self.logger.exception(msg +
118+
self.logger.exception(msg + f'\n{exc}\n' +
119119
'This exception is being ignored because ignore_warnings=True.')
120120
else:
121121
self.logger.error(msg)
122-
raise ValueError(msg)
122+
raise ValueError(msg) from exc
123123

124124
try:
125125
dhdl = self._extract_dHdl(file, T=self.T)
126126
self.logger.info(
127127
f'Reading {len(dhdl)} lines of dhdl from {file}')
128128
dHdl_list.append(dhdl)
129129
except Exception as exc:
130-
msg = f'Error reading read dhdl from {file}.\n{exc}'
130+
msg = f'Error reading read dhdl from {file}.'
131131
if self.ignore_warnings:
132-
self.logger.exception(msg +
132+
self.logger.exception(msg + f'\n{exc}\n' +
133133
'This exception is being ignored because ignore_warnings=True.')
134134
else:
135135
self.logger.error(msg)
136-
raise ValueError(msg)
136+
raise ValueError(msg) from exc
137137

138138
# Sort the files according to the state
139139
self.logger.info('Sort files according to the u_nk.')
@@ -181,8 +181,9 @@ def run(self, skiptime=0, uncorr='dhdl', threshold=50,
181181
with the specified number of points in the time plot. The number of time
182182
points (an integer) must be provided. Specify as ``None`` will not do
183183
the convergence analysis. Default: None. By default, 'MBAR'
184-
estimator will be used for convergence analysis. If the dataset
185-
does not contain u_nk, please run
184+
estimator will be used for convergence analysis, as it is
185+
usually the fastest converging method. If the dataset does not
186+
contain u_nk, please run
186187
meth:`~alchemlyb.workflows.ABFE.check_convergence` manually
187188
with estimator='TI'.
188189

0 commit comments

Comments
 (0)