Skip to content

Commit

Permalink
add test case to geometry read/write
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenhaute committed Jul 6, 2024
1 parent 0a1511e commit b533282
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@ def test_readwrite_cycle(dataset, tmp_path):
geometry.per_atom.numbers,
np.array([6, 8, 9]),
)
s = """7
O 0.269073490000000 0.952731530000000 0.639899630000000
C 0.379007320000000 -0.130111590000000 0.085677050000000
C -0.611025150000000 -0.821472640000000 -0.827555540000000
H 1.276678450000000 -0.822788000000000 0.432385510000000
H -0.364845780000000 -1.985677100000000 -0.791238000000000
H -1.419992260000000 -0.472979080000000 -0.156752270000000
H -0.764765500000000 -0.536376480000000 -1.844856190000000
"""
geometry = Geometry.from_string(s)
assert not geometry.periodic
assert len(geometry) == 7
assert geometry.energy is None


def test_dataset_empty(tmp_path):
Expand Down

0 comments on commit b533282

Please sign in to comment.