Skip to content

Commit 891a4e9

Browse files
committed
Blacken.
1 parent 0897d1f commit 891a4e9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

emle/calculator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,12 +1327,15 @@ def _calculate_energy_and_gradients(
13271327
_logger.error(msg)
13281328
raise RuntimeError(msg)
13291329

1330-
if (self._qbc_deviation):
1330+
if self._qbc_deviation:
13311331
E_std = _torch.std(base_model._E_vac_qbc).item()
13321332
max_f_std = _torch.max(_torch.std(base_model._grads_qbc, axis=0)).item()
13331333
with open(self._qbc_deviation, "a") as f:
13341334
f.write(f"{E_std:12.5f}{max_f_std:12.5f}\n")
1335-
if self._qbc_deviation_threshold and max_f_std > self._qbc_deviation_threshold:
1335+
if (
1336+
self._qbc_deviation_threshold
1337+
and max_f_std > self._qbc_deviation_threshold
1338+
):
13361339
msg = "Force deviation threshold reached!"
13371340
raise ValueError(msg)
13381341

0 commit comments

Comments
 (0)