diff --git a/src/domain.cpp b/src/domain.cpp index 2d6d52c369..ad1e5896b8 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -1939,12 +1939,13 @@ void Domain::print_box(const std::string &prefix) if (comm->me == 0) { std::string mesg = prefix; if (triclinic == 0) { - mesg += fmt::format("orthogonal box = ({} {} {}) to ({} {} {})\n", - boxlo[0],boxlo[1],boxlo[2], - boxhi[0],boxhi[1],boxhi[2]); + mesg += fmt::format("orthogonal box = ({:.8g} {:.8g} {:.8g}) to " + "({:.8g} {:.8g} {:.8g})\n",boxlo[0],boxlo[1], + boxlo[2],boxhi[0],boxhi[1],boxhi[2]); } else { - mesg += fmt::format("triclinic box = ({} {} {}) to ({} {} {}) " - "with tilt ({} {} {})\n",boxlo[0],boxlo[1], + mesg += fmt::format("triclinic box = ({:.8g} {:.8g} {:.8g}) to " + "({:.8g} {:.8g} {:.8g}) with tilt " + "({:.8g} {:.8g} {:.8g})\n",boxlo[0],boxlo[1], boxlo[2],boxhi[0],boxhi[1],boxhi[2],xy,xz,yz); } utils::logmesg(lmp,mesg); diff --git a/src/lattice.cpp b/src/lattice.cpp index 32fac06484..cc403d592d 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -304,7 +304,8 @@ Lattice::Lattice(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) // print lattice spacings if (comm->me == 0) - utils::logmesg(lmp,fmt::format("Lattice spacing in x,y,z = {} {} {}\n", + utils::logmesg(lmp,fmt::format("Lattice spacing in x,y,z = " + "{:.8g} {:.8g} {:.8g}\n", xlattice,ylattice,zlattice)); }