Skip to content

Commit 17fb116

Browse files
committed
Print full energy and max force precision
1 parent cd06c1d commit 17fb116

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

janus_core/calculations/geom_opt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ def run(self) -> None:
300300

301301
if self.logger:
302302
self.logger.info("After optimization spacegroup: %s", s_grp)
303-
self.logger.info("Max force: %.6f", max_force)
304-
self.logger.info("Final energy: %.6f", self.struct.get_potential_energy())
303+
self.logger.info("Max force: %s", max_force)
304+
self.logger.info("Final energy: %s", self.struct.get_potential_energy())
305305

306306
if not converged:
307307
warnings.warn(

tests/test_geomopt_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ def test_log(tmp_path):
8585
)
8686
assert result.exit_code == 0
8787

88+
# Only check reduced precision of energy and max force
8889
assert_log_contains(
8990
log_path,
9091
includes=[
9192
"Starting geometry optimization",
92-
"Final energy: -27.035128",
93-
"Max force: 0.000000",
93+
"Final energy: -27.035127",
94+
"Max force: ",
9495
],
9596
excludes="Using filter",
9697
)

0 commit comments

Comments
 (0)