-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
2,215 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
name: CI on PR | ||
on: pull_request | ||
|
||
jobs: | ||
run-tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install package | ||
run: | | ||
bash ./build.sh | ||
pip install -e .[dev] | ||
- name: Run pytest | ||
run: pytest --junitxml=pytest.xml --cov-report=term-missing --cov mlspm tests | tee pytest-coverage.txt | ||
|
||
- name: Pytest coverage comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
name: CI on push | ||
on: push | ||
|
||
jobs: | ||
run-tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.11'] # Add 3.12 when pytorch has a wheel | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install package | ||
run: | | ||
bash ./build.sh | ||
pip install -e .[dev] | ||
- name: Lint with flake8 | ||
run: flake8 . | ||
|
||
- name: Run pytest | ||
run: pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
name: Update coverage badge | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-badge: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install package | ||
run: | | ||
bash ./build.sh | ||
pip install -e .[dev] | ||
- name: Run pytest | ||
run: pytest --cov-report=term-missing --cov=mlspm tests | tee pytest-coverage.txt | ||
|
||
- name: Pytest coverage comment | ||
id: coverage_comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
hide-comment: true | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
|
||
- name: Create coverage badge | ||
uses: schneegans/[email protected] | ||
with: | ||
auth: ${{ secrets.COVERAGE_GIST_SECRET }} | ||
gistID: 913d30e2a2e333eb407353072948042d | ||
filename: coverage.json | ||
label: Coverage | ||
message: ${{ steps.coverage_comment.outputs.coverage }} | ||
color: ${{ steps.coverage_comment.outputs.color }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ dependencies: | |
- torchvision | ||
- torchaudio | ||
- cuda | ||
- ninja | ||
- matplotlib | ||
- numpy | ||
- scipy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
The scripts here can be used to reproduce the results in Fig. 2 of the paper. | ||
The scripts here can be used to reproduce the results figures in the paper. | ||
- `predict_experiments.py`: Runs the prediction for all of the experimental AFM images of ice on Cu(111) and Au(111) using the three models pretrained on the Cu(111), Au(111)-monolayer, and Au(111)-bilayer datasets, and saves them on disk. | ||
- `plot_predictions.py`: Picks the appropriate predictions for each experiment and plots them to a figure. | ||
- `plot_predictions.py`: Picks the appropriate predictions for each experiment and plots them to a figure as in Fig. 2 of the paper. | ||
- `plot_relaxed_structures.py`: Plots the on-surface structures relaxed with a neural network potential and DFT as well as the corresponding simulations and experimental images as in Fig. 3 of the paper. | ||
- `plot_prediction_extra.py`: Plots the prediction and the relaxed structure with corresponding simulations and experimental images for the one extra ice cluster not in the main results figure. |
Oops, something went wrong.