Skip to content

Commit

Permalink
enable macOS and Windows testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri committed Dec 5, 2024
1 parent 540871f commit a57fb19
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- What does this implement/fix? Explain your changes here. -->



# Contributor (creator of pull-request) checklist

- [ ] Tests updated (for new features and bugfixes)?
- [ ] Documentation updated (for new features)?
- [ ] Issue referenced (for PRs that solve an issue)?

# Reviewer checklist

- [ ] CHANGELOG updated with public API or any other important changes?
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
strategy:
matrix:
include:
# - os: ubuntu-22.04
# python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.12"
- os: macos-14
python-version: "3.12"
- os: windows-2022
python-version: "3.12"
# - os: macos-14
# python-version: "3.12"
# - os: windows-2022
# python-version: "3.12"

steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 10 additions & 6 deletions src/torchpme/utils/tuning/ewald.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,23 @@ def tune_ewald(
example, fixing the cutoff to 0.1
>>> smearing, parameter, cutoff = tune_ewald(
... torch.sum(charges**2, dim=0), cell, positions, cutoff=0.1, accuracy=1e-1
... torch.sum(charges**2, dim=0), cell, positions, cutoff=0.4, accuracy=1e-1
... )
You can check the values of the parameters, now the cutoff is fixed
>>> print(smearing)
0.03338293212285428
>>> print(round(smearing, 4))
0.1402
>>> print(parameter)
{'lr_wavelength': 0.009495381717988971}
We can also check the value of the other parameter like the ``lr_wavelength``
>>> print(round(parameter["lr_wavelength"], 3))
0.255
and finally as requested the value of the cutoff is fixed
>>> print(cutoff)
0.1
0.4
"""
_validate_parameters(sum_squared_charges, cell, positions, exponent, accuracy)
Expand Down

0 comments on commit a57fb19

Please sign in to comment.