We provide two types of examples: Google Colab notebooks, which allow for a fast and easy introduction to PySAGES, and python scripts that are ready to be run on your machine/cluster with your own installation. If you are starting using PySAGES, we invite you to test and modify them for your needs. The Google Colab notebooks can be used with Google's GPUs in case you do not have easy access to one.
If you are new to advanced sampling techniques in general you can try this interactive introduction with PySAGES .
Examples for Methods using HOOMD-blue can be found in the subfolders hoomd-blue 2.x and hoomd-blue 3.x
- Harmonic bias restricting a particle in space:
- Umbella integration of a particle in an external potential:
- Artificial neural networks sampling of the dihedral angle of butane:
- Adaptive force-biasing sampling of the dihedral angle of butane using neural networks:
- Combined force-frequency sampling of the dihedral angle of butane:
- Harmonic bias restricting a particle in space: harmonic_bias
- Umbrella integration of a particle in an external potential: umbrella_integration
- Artificial neural networks sampling of the dihedral angle of butane: ann
- Adaptive force-biasing sampling of the dihedral angle of butane using neural networks: funn
- Combined force-frequency sampling of the dihedral angle of butane: cff
- Metadynamics sampling of the dihedral angle of butane: metadynamics
- Spline String sampling of a particle in an external potential: spline-string
- Harmonic bias restricting a particle in space: harmonic_bias
- Umbrella integration of a particle in an external potential: umbrella_integration
- Artificial neural networks sampling of the dihedral angle of butane: ann
- Adaptive force-biasing sampling of the dihedral angle of butane using neural networks: funn
- Combined force-frequency sampling of the dihedral angle of butane: cff
- Metadynamics sampling of the dihedral angle of butane: metadynamics
- Spline String sampling of a particle in an external potential: spline-string
Examples for Methods using OpenMM can be found in the subfolder openmm
- Harmonic bias for the dihedral angle of Alanine Dipeptide:
- Metadynamics sampling with Alanine Dipeptide:
- Metadynamics sampling with NaCL
- Spectral ABF sampling with Alanine Dipeptide:
- ABF with Alanine Dipeptide: ABF
- Forward flux sampling with Alanine Dipeptide: FFS
- Metadynamics with Alanine Dipeptide: Metadynamics
- Spectral ABF with Alanine Dipeptide: SpectralABF
- Umbrella integration with Alanine Dipeptide: Umbrella Integration
We have a Google Colab that shows how the MD engines and PySAGES can be installed together as a guide to install PySAGES. This notebook has a final step that sets up precompiled environments for all the other notebooks as well.
If you add a method or a CV please try to add an example for your addition here as well. Feel free to use any of the existing examples as templates or create your own. A script example or Google Colab works, ideally, you add both, but be sure to not include unnecessary binary data for your example i.e. try to generate initial conditions instead of shipping them.
We are also aiming to run the examples with the CI testing, so if you add your example and add it to the CI testing as well. If your example needs longer run time (we do not have GPUs for CI, yet) make sure to include an option to run it with fewer steps and or replica to finish in about 10 min.)
All notebooks come in 2 flavors:
- The
.ipynb
should contain a full run-through and results of all cells. - the
.md
is human readable and used for code revision.
It is our responsibility as developers to have versions in sync with one another in the beginning.
We recommend using the jupytext
package for this. Once a PR is submitted, we have a pre-commit hook to keep them synchronized.