From 22dacf27b5618fea80e286479248b82732b9e108 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Tue, 26 Nov 2024 15:04:21 -0500 Subject: [PATCH] Add decimal precision as per forum debate (10 decimals) Signed-off-by: Geoff Hutchison --- avogadro/io/xyzformat.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/avogadro/io/xyzformat.cpp b/avogadro/io/xyzformat.cpp index 59278bf48a..e2cc91c22c 100644 --- a/avogadro/io/xyzformat.cpp +++ b/avogadro/io/xyzformat.cpp @@ -326,12 +326,12 @@ bool XyzFormat::write(std::ostream& outStream, const Core::Molecule& mol) } outStream << std::setw(3) << std::left - << Elements::symbol(atom.atomicNumber()) << " " << std::setw(10) - << std::right << std::fixed << std::setprecision(5) - << atom.position3d().x() << " " << std::setw(10) << std::right - << std::fixed << std::setprecision(5) << atom.position3d().y() - << " " << std::setw(10) << std::right << std::fixed - << std::setprecision(5) << atom.position3d().z() << "\n"; + << Elements::symbol(atom.atomicNumber()) << " " << std::setw(15) + << std::right << std::fixed << std::setprecision(10) + << atom.position3d().x() << " " << std::setw(15) << std::right + << std::fixed << std::setprecision(10) << atom.position3d().y() + << " " << std::setw(15) << std::right << std::fixed + << std::setprecision(10) << atom.position3d().z() << "\n"; } return true;