Skip to content

Commit

Permalink
fix for inpcrd file writer
Browse files Browse the repository at this point in the history
  • Loading branch information
stefdoerr committed Sep 17, 2024
1 parent 9aa0b27 commit 2d27523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moleculekit/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ def INPCRDwrite(mol, filename):
f.write(f" {mol.numAtoms}\n")
for i in range(mol.numAtoms):
f.write(
f" {mol.coords[i, 0, mol.frame]:10.7f} {mol.coords[i, 1, mol.frame]:10.7f} {mol.coords[i, 2, mol.frame]:10.7f}"
f" {mol.coords[i, 0, mol.frame]:11.7f} {mol.coords[i, 1, mol.frame]:11.7f} {mol.coords[i, 2, mol.frame]:11.7f}"
)
if i % 2 == 1: # Add a newline every two atoms
f.write("\n")
Expand All @@ -896,7 +896,7 @@ def INPCRDwrite(mol, filename):
box = mol.box[:, mol.frame]
angles = mol.boxangles[:, mol.frame]
f.write(
f" {box[0]:10.7f} {box[1]:10.7f} {box[2]:10.7f} {angles[0]:10.7f} {angles[1]:10.7f} {angles[2]:10.7f}"
f" {box[0]:11.7f} {box[1]:11.7f} {box[2]:11.7f} {angles[0]:11.7f} {angles[1]:11.7f} {angles[2]:11.7f}"
)
f.write("\n")

Expand Down

0 comments on commit 2d27523

Please sign in to comment.