Skip to content

Commit

Permalink
print system prob using scientific natation (#3008)
Browse files Browse the repository at this point in the history
When the probability of a system is smaller than 1e-3, it is shown as
`0.000`, which is useless. This commit changes it to the scientific
notation, displaying it like `1.547e-06`.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: Han Wang <[email protected]>
  • Loading branch information
njzjz and wanghan-iapcm authored Nov 28, 2023
1 parent c03416d commit efb0a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepmd/utils/data_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,11 @@ def print_summary(self, name):
log.info("found %d system(s):" % self.nsystems)
log.info(
("%s " % self._format_name_length("system", sys_width))
+ ("%6s %6s %6s %5s %3s" % ("natoms", "bch_sz", "n_bch", "prob", "pbc"))
+ ("%6s %6s %6s %9s %3s" % ("natoms", "bch_sz", "n_bch", "prob", "pbc"))
)
for ii in range(self.nsystems):
log.info(
"%s %6d %6d %6d %5.3f %3s"
"%s %6d %6d %6d %9.3e %3s"
% (
self._format_name_length(self.system_dirs[ii], sys_width),
self.natoms[ii],
Expand Down

0 comments on commit efb0a34

Please sign in to comment.