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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.278
rev: v0.0.280
hooks:
- id: ruff
args: ["--fix"]
Expand Down
18 changes: 6 additions & 12 deletions dpdata/cp2k/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,18 @@ def cell_to_low_triangle(A, B, C, alpha, beta, gamma):
"""
if not np.pi * 5 / 180 < alpha < np.pi * 175 / 180:
raise RuntimeError(
"alpha=={}: must be a radian, and \
must be in np.pi*5/180 < alpha < np.pi*175/180".format(
alpha
)
f"alpha=={alpha}: must be a radian, and \
must be in np.pi*5/180 < alpha < np.pi*175/180"
)
if not np.pi * 5 / 180 < beta < np.pi * 175 / 180:
raise RuntimeError(
"beta=={}: must be a radian, and \
must be in np.pi*5/180 < beta < np.pi*175/180".format(
beta
)
f"beta=={beta}: must be a radian, and \
must be in np.pi*5/180 < beta < np.pi*175/180"
)
if not np.pi * 5 / 180 < gamma < np.pi * 175 / 180:
raise RuntimeError(
"gamma=={}: must be a radian, and \
must be in np.pi*5/180 < gamma < np.pi*175/180".format(
gamma
)
f"gamma=={gamma}: must be a radian, and \
must be in np.pi*5/180 < gamma < np.pi*175/180"
)
if not A > 0.2:
raise RuntimeError(f"A=={A}, must be greater than 0.2")
Expand Down