Skip to content

Commit e6a3179

Browse files
authored
The first tutorial of OpenMM-Torch with NNPOps (#62)
* Add a tutorial * Rename * Add the Colab link and fix typos * Clean up the conda logs * Test the tutorial * Update the simulation lenght * Add a link to README * Fix a typo * Install Mambaforce * Update the notebook URL
1 parent db7c009 commit e6a3179

File tree

4 files changed

+491
-0
lines changed

4 files changed

+491
-0
lines changed

.github/workflows/tutorials.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Test tutorials"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
branches:
9+
- "master"
10+
schedule:
11+
- cron: "0 0 * * 0" # Every Sunday at midnight
12+
13+
jobs:
14+
tutorial-1:
15+
runs-on: "ubuntu-latest"
16+
defaults:
17+
run:
18+
shell: bash -l {0}
19+
steps:
20+
- name: "Check out"
21+
uses: actions/checkout@v2
22+
23+
- name: "Install dependencies with conda"
24+
uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
activate-environment: test
27+
environment-file: devtools/conda-envs/test-tutorials.yml
28+
python-version: 3.7 # Mimics Google Colab
29+
30+
- name: "List conda packages"
31+
run: conda list
32+
33+
- name: "Convert the tutorial"
34+
run: |
35+
jupyter nbconvert --to python --stdout tutorials/openmm-torch-nnpops.ipynb > test.py
36+
sed -i '/condacolab/d' test.py # Remove conda-colab
37+
sed -i 's#&> /dev/null##g' test.py # Remove the output redirection
38+
cat test.py
39+
40+
- name: "Run the tutorial"
41+
run: ipython test.py

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ install the Python wrapper.
6868
Using the OpenMM PyTorch plugin
6969
===============================
7070

71+
Tutorials
72+
---------
73+
74+
- [A simple simulation of alanine dipeptide with ANI-2x using OpenMM-Torch and NNPOps](tutorials/openmm-torch-nnpops.ipynb)
75+
7176
Exporting a PyTorch model for use in OpenMM
7277
-------------------------------------------
7378

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- notebook

0 commit comments

Comments
 (0)