Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The first tutorial of OpenMM-Torch with NNPOps #62

Merged
merged 10 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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