Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/metatomic_torch/metatomic/torch/ase_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,10 @@ def _get_group_operations(
"`pip install spglib` or `conda install -c conda-forge spglib`"
) from e

if not (atoms.pbc.all()):
# No periodic boundary conditions: no symmetry
return [], []

# Lattice with column vectors a1,a2,a3 (spglib expects (cell, frac, Z))
A = atoms.cell.array.T # (3,3)
frac = atoms.get_scaled_positions() # (N,3) in [0,1)
Expand All @@ -1411,6 +1415,7 @@ def _get_group_operations(
(atoms.cell.array, frac, numbers),
symprec=symprec,
angle_tolerance=angle_tolerance,
_throw=True,
)

if data is None:
Expand Down
6 changes: 6 additions & 0 deletions python/metatomic_torch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ namespaces = true
[tool.pytest.ini_options]
python_files = ["*.py"]
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore:`torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning",
"ignore:`torch.jit.save` is deprecated. Please switch to `torch.export`:DeprecationWarning",
"ignore:`torch.jit.load` is deprecated. Please switch to `torch.export`:DeprecationWarning",
]
Loading