Skip to content

Commit 441acc8

Browse files
authored
Merge pull request #113 from MolarVerse/hotfix/1.2.1
Hotfix: TrajectoryWriter QMCFC n_atoms fixed
2 parents 66c8d81 + da8ae49 commit 441acc8

File tree

5 files changed

+207
-203
lines changed

5 files changed

+207
-203
lines changed

PQAnalysis/core/cell/cell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def __str__(self) -> str:
233233
gamma = self.gamma
234234

235235
if self != Cell():
236-
return f"Cell({x=}, {y=}, {z=}, {alpha=}, {beta=}, {gamma=})"
236+
return f"Cell(x={x}, y={y}, z={z}, alpha={alpha}, beta={beta}, gamma={gamma})"
237237

238238
return "Cell()"
239239

PQAnalysis/io/traj_file/trajectory_writer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ def _write_header(self, n_atoms: int, cell: Cell = Cell()) -> None:
157157
The cell of the frame. Default is Cell().
158158
"""
159159

160+
# If the format is QMCFC, an additional atom is added to the count.
161+
if self.format == MDEngineFormat.QMCFC:
162+
n_atoms += 1
163+
160164
if cell != Cell():
161165
print(
162166
(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"yapf",
3434
"rich-argparse",
3535
"Cython",
36-
"setuptools",
36+
"setuptools<=71.1",
3737
]
3838

3939
[project.optional-dependencies]

tests/cli/test_rst2xyz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_main(test_with_data_dir, capsys):
5656

5757
captured = capsys.readouterr()
5858
assert captured.out == """
59-
4 15.0623 15.0964 20.0232 89.9232 90.2261 120.324
59+
5 15.0623 15.0964 20.0232 89.9232 90.2261 120.324
6060
6161
X 0.0 0.0 0.0
6262
C 1.0000000000 1.1000000000 1.2000000000

0 commit comments

Comments
 (0)