Skip to content

Commit

Permalink
The first tutorial of OpenMM-Torch with NNPOps (#62)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
raimis authored Mar 1, 2022
1 parent db7c009 commit e6a3179
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Test tutorials"

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
schedule:
- cron: "0 0 * * 0" # Every Sunday at midnight

jobs:
tutorial-1:
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- name: "Check out"
uses: actions/checkout@v2

- name: "Install dependencies with conda"
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: devtools/conda-envs/test-tutorials.yml
python-version: 3.7 # Mimics Google Colab

- name: "List conda packages"
run: conda list

- name: "Convert the tutorial"
run: |
jupyter nbconvert --to python --stdout tutorials/openmm-torch-nnpops.ipynb > test.py
sed -i '/condacolab/d' test.py # Remove conda-colab
sed -i 's#&> /dev/null##g' test.py # Remove the output redirection
cat test.py
- name: "Run the tutorial"
run: ipython test.py
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ install the Python wrapper.
Using the OpenMM PyTorch plugin
===============================

Tutorials
---------

- [A simple simulation of alanine dipeptide with ANI-2x using OpenMM-Torch and NNPOps](tutorials/openmm-torch-nnpops.ipynb)

Exporting a PyTorch model for use in OpenMM
-------------------------------------------

Expand Down
5 changes: 5 additions & 0 deletions devtools/conda-envs/test-tutorials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: test
channels:
- conda-forge
dependencies:
- notebook
Loading

0 comments on commit e6a3179

Please sign in to comment.