Skip to content

Commit 29cb32a

Browse files
authored
chore: move magic number (#119)
* chore: move magic number * feat: bump version to 0.1.2 * chore: update changelog * fix: bug in Water RDF Not certain why this was not previously failing.
1 parent 62bf804 commit 29cb32a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Release 0.1.2
4+
5+
- Minor updates to improve code readability.
6+
37
## Release 0.1.1
48

59
- Fixing bug in the Reactivity UI page with the incorrect data being displayed in

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mlipaudit"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Library and CLI tool for benchmarking ML Interatomic Potentials"
55
readme = "README.md"
66
authors = [

src/mlipaudit/benchmarks/water_radial_distribution/water_radial_distribution.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ def analyze(self) -> WaterRadialDistributionResult:
238238
/ ((SOLVENT_PEAK_RANGE[0] + SOLVENT_PEAK_RANGE[1]) / 2)
239239
)
240240

241-
rmse_score = compute_metric_score(np.array([rmse]), RMSE_SCORE_THRESHOLD, ALPHA)
241+
rmse_score = compute_metric_score(
242+
np.array([rmse]), RMSE_SCORE_THRESHOLD, ALPHA
243+
).item()
242244
score = (peak_deviation_score + rmse_score) / 2
243245

244246
return WaterRadialDistributionResult(

src/mlipaudit/utils/stability.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from scipy.spatial.distance import pdist, squareform
1818

1919
HYDROGEN_BOND_CUTOFF_ANGSTROM = 2.5
20+
TEMPERATURE_THRESHOLD = 10_000.0
2021

2122

2223
def is_frame_stable(
@@ -91,7 +92,7 @@ def find_explosion_frame(simulation_state: SimulationState, temperature: float)
9192
raise ValueError("Simulation state does not contain temperature information.")
9293

9394
temperatures = simulation_state.temperature
94-
threshold = temperature + 10_000.0
95+
threshold = temperature + TEMPERATURE_THRESHOLD
9596

9697
exceed_indices = jnp.nonzero(temperatures > threshold)[0]
9798
if exceed_indices.shape[0] > 0:

0 commit comments

Comments
 (0)