Skip to content

Commit

Permalink
Add decimal precision as per forum debate (10 decimals)
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
  • Loading branch information
ghutchis committed Nov 26, 2024
1 parent 7098118 commit 22dacf2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions avogadro/io/xyzformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 22dacf2

Please sign in to comment.