Skip to content

Commit

Permalink
Google Colab integration (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: ricalessandri <ric.alessandri@gmail.com>
Co-authored-by: Pablo Zubieta <8410335+pabloferz@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 22, 2022
1 parent e8c9d56 commit 3eefa70
Show file tree
Hide file tree
Showing 18 changed files with 3,930 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
paths-ignore:
- 'README.md'
- 'docs/*'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
- 'docs/*'

workflow_dispatch:

Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -v/tmp:/tmp -t pysages bash -c "cd PySAGES/examples/harmonic_bias/ && ./run.sh && mv hist.pdf /tmp/"
docker run -v/tmp:/tmp -t pysages bash -c "cd PySAGES/examples/hoomd-blue/harmonic_bias/ && ./run.sh && mv hist.pdf /tmp/"
-
name: Upload artifact
uses: actions/upload-artifact@v2
Expand All @@ -81,7 +83,7 @@ jobs:
name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -t pysages bash -c "cd PySAGES/examples/abf/ && python3 ./alanine-dipeptide_openmm.py"
docker run -t pysages bash -c "cd PySAGES/examples/openmm/abf/ && python3 ./alanine-dipeptide_openmm.py"
umbrella-integration-hoomd:
runs-on: ubuntu-latest
Expand All @@ -100,7 +102,7 @@ jobs:
name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -v /tmp:/tmp -t pysages bash -c "cd PySAGES/examples/umbrella_integration/ && python3 ./gen_gsd.py && python3 integration.py --N-replica=5 --time-steps=1000 --discard-equi=0 && mkdir /tmp/plots && mv *.pdf /tmp/plots/"
docker run -v /tmp:/tmp -t pysages bash -c "cd PySAGES/examples/hoomd-blue/umbrella_integration/ && python3 ./gen_gsd.py && python3 integration.py --N-replica=5 --time-steps=1000 --discard-equi=0 && mkdir /tmp/plots && mv *.pdf /tmp/plots/"
-
name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/mwouts/jupytext
rev: v1.13.7
hooks:
- id: jupytext
args: [--sync]
language: python
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,27 @@ Currently, there is only support for
planned (for instance, for all engines already supported by the original SSAGES).

You first need to install one of the following plugins depending on your molecular
dynamics engine
dynamics engine:

- For HOOMD-blue visit [HOOMD-dlpack Plugin](https://github.com/SSAGESLabs/hoomd-dlext).
- For OpenMM go to [OpenMM](https://github.com/SSAGESLabs/openmm-dlext).
- For HOOMD-blue visit [HOOMD DLPack Plugin](https://github.com/SSAGESLabs/hoomd-dlext).
- For OpenMM go to [OpenMM DLPack Plugin](https://github.com/SSAGESLabs/openmm-dlext).

PySAGES also depends on [JAX](https://github.com/google/jax/), follow their installation
guide to set it up. *NOTE:* make sure you manually install jaxlib before PySAGES.
guide to set it up. *NOTE:* make sure you have jaxlib installed before using PySAGES.
Depending on your local setup, you will have to install the jaxlib CPU version or the CUDA compatible flavor.

To test GPU support HOOMD-blue, HOOMD-dlext and JAX need to be built or installed with
GPU support.
CUDA support.

Our installation tutorial on Google Colab enable you to see how PySAGES,
HOOMD-blue and OpenMM can be built and installed into such environment.
[![Install Env](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/SSAGESLabs/PySAGES/blob/main/docs/examples/Install_PySAGES_Environment.ipynb)

## Usage

PySAGES provide a straightforward interface to setup Collective Variables and Enhaced
Sampling methods to you MD simulations. See the documentation to learn more.
PySAGES provide a straightforward interface to setup Collective Variables and Enhanced
Sampling methods in your MD simulations. See the [documentation](https://pysages.readthedocs.io/en/latest/) to learn more.

If you want to learn more, you can also head over to the `examples` subfolder,
which contains scripts for running different HOOMD-blue and OpenMM biased simulations
We provide ready-to-go examples for common methods.
Checkout out the [examples](examples/) subfolder to look at different script and notebook examples.
These include pre-set simulations and a tutorial on how to install PySAGES along with the supported MD engines.
Loading

0 comments on commit 3eefa70

Please sign in to comment.