Skip to content

Commit

Permalink
Merge pull request #413 from mir-group/notebooks
Browse files Browse the repository at this point in the history
Fix broken link to sparse GP tutorial
  • Loading branch information
jonpvandermause authored Sep 15, 2024
2 parents 8bb4b4d + 9d17c1d commit 08434cb
Show file tree
Hide file tree
Showing 13 changed files with 3,747 additions and 41 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/flare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ jobs:
cd tests
pytest test_lammps.py
- name: Run tutorial
run: |
pip install -U jupyter nbconvert
cp tutorials/sparse_gp_tutorial.ipynb tutorial.ipynb
jupyter nbconvert --to script tutorial.ipynb
sed -i '/^get_ipython()/s/^/# /' tutorial.py
sed -i '/^plt/s/^/# /' tutorial.py
wget http://quantum-machine.org/gdml/data/npz/md17_aspirin.npz
wget https://www.ctcms.nist.gov/potentials/Download/1999--Mishin-Y-Farkas-D-Mehl-M-J-Papaconstantopoulos-D-A--Al/2/Al99.eam.alloy
python tutorial.py
rm Al* aluminum.txt aspirin.txt md17_aspirin.npz tutorial.ipynb tutorial.py
- name: Install Sphinx and Breathe
run: |
sudo apt-get update
Expand Down Expand Up @@ -141,23 +153,3 @@ jobs:
# Change the directory if changes in Doxyfile
publish_dir: ./docs/build/html
if: github.event_name == 'pull_request' && matrix.lapack == 'on' && matrix.omp == 'on'

# - name: Run tutorial
# run: |
# cd tests
# # Download colab notebook
# export fileid="18_pTcWM19AUiksaRyCgg9BCpVyw744xv"
# wget -O tutorial.ipynb 'https://docs.google.com/uc?export=download&id='${fileid}
# # Convert notebook into python script
# pip install -U jupyter nbconvert
# jupyter nbconvert --to script tutorial.ipynb
# # Remove bash commands in the notebook
# sed '/!/d' tutorial.txt > tutorial.py
# cat test_tutorial.py tutorial.py > tuttest.py
# # Download datasets needed for the tutorial
# wget http://quantum-machine.org/gdml/data/npz/aspirin_dft.npz
# wget https://www.ctcms.nist.gov/potentials/Download/1999--Mishin-Y-Farkas-D-Mehl-M-J-Papaconstantopoulos-D-A--Al/2/Al99.eam.alloy
# # Run script
# pytest -s tuttest.py
# # Remove output files
# rm Al* aspirin_dft.npz tutorial.ipynb tuttest.py tutorial.py tutorial.txt
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ _C_flare*
**/xml
**/dist
**egg-info
tutorials/Al*
tutorials/*txt*
tutorials/*npz*
tutorials/*checkpoint*
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[![Build Status](https://github.com/mir-group/flare/actions/workflows/flare.yml/badge.svg)](https://github.com/mir-group/flare/actions) [![pypi](https://img.shields.io/pypi/v/mir-flare)](https://pypi.org/project/mir-flare/) [![activity](https://img.shields.io/github/commit-activity/m/mir-group/flare)](https://github.com/mir-group/flare/commits/master) [![codecov](https://codecov.io/gh/mir-group/flare/branch/master/graph/badge.svg)](https://codecov.io/gh/mir-group/flare)

***NOTE: This is the latest release [1.3.3](https://github.com/mir-group/flare/releases/tag/1.3.3) which includes significant changes compared to the previous version [0.2.4](https://github.com/mir-group/flare/releases/tag/0.2.4). Please check the updated tutorials and documentations from the links below.***

# FLARE: Fast Learning of Atomistic Rare Events

<p align="center">
Expand All @@ -16,24 +14,16 @@ FLARE is an open-source Python package for creating fast and accurate interatomi
<img src="https://github.com/mir-group/flare/blob/development/docs/images/Flare_features.jpg?raw=true">
</p>

Note:

We implement Sparse GP, all the kernels and descriptors in C++ with Python interface.

We implement Full GP, Mapped GP, RBCM, Squared Exponential kernel and 2+3-body descriptors in Python.

Please do NOT mix them.

## Documentations and Tutorials

Documentation of the code can be accessed here: https://mir-group.github.io/flare

[Applications using FLARE and gallery](https://mir-group.github.io/flare/related.html)

### Google Colab Tutorials
### Tutorials

[FLARE (ACE descriptors + sparse GP)](https://colab.research.google.com/drive/1QcHf5FVU_juZOvQ49FliJVzhon8MJ6PO)
The tutorial shows how to run flare with ACE and SGP on energy and force data, demoing "offline" training on the MD17 dataset and "online" on-the-fly training of a simple aluminum force field.
[FLARE (ACE descriptors + sparse GP)](https://github.com/mir-group/flare/blob/notebooks/tutorials/sparse_gp_tutorial.ipynb)
This tutorial shows how to run flare with a sparse Gaussian process model trained on energy and force data, demoing "offline" training on the MD17 dataset and "online" on-the-fly training of a simple aluminum force field.

[FLARE (LAMMPS active learning)](https://bit.ly/flarelmpotf)
This tutorial demonstrates new functionality for running active learning all within LAMMPS, with LAMMPS running the dynamics to allow arbitrarily complex molecular dynamics workflows while maintaining a simple interface. This also demonstrates how to use the C++ API directly from Python through `pybind11`. Finally, there's a simple demonstration of phonon calculations with FLARE using `phonopy`.
Expand Down
19 changes: 11 additions & 8 deletions docs/source/tutorials/colabs.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
FLARE: Active Learning Bayesian Force Fields
============================================

We have a few Google Colab tutorials that you can check out and play with.
We have a few tutorial notebooks that you can check out and play with.

`FLARE (ACE descriptors + sparse GP <https://colab.research.google.com/drive/1rZ-p3kN5CJbPJgD8HuQHSc7ecmwZYse6>`_.
The tutorial shows how to run flare with ACE and SGP on energy and force data, demoing "offline" training on the MD17 dataset and "online" on-the-fly training of a simple aluminum force field. All the trainings use yaml files for configuration.
`FLARE (ACE descriptors + sparse GP) <https://github.com/mir-group/flare/blob/notebooks/tutorials/sparse_gp_tutorial.ipynb>`_.
This tutorial shows how to run flare with a sparse Gaussian process model trained on energy and force data, demoing "offline" training on the MD17 dataset and "online" on-the-fly training of a simple aluminum force field.

`FLARE (ACE descriptors + sparse GP) with LAMMPS <https://colab.research.google.com/drive/1qgGlfu1BlXQgSrnolS4c4AYeZ-2TaX5Y>`_.
The tutorial shows how to compile LAMMPS with FLARE pair style and uncertainty compute code, and use LAMMPS for Bayesian active learning and uncertainty-aware molecular dynamics.

`FLARE (ACE descriptors + sparse GP) Python API <https://colab.research.google.com/drive/18_pTcWM19AUiksaRyCgg9BCpVyw744xv>`_.
The tutorial shows how to do the offline and online trainings with python scripts.
A video walkthrough of the tutorial, including detailed discussion of expected outputs, is available `here <https://youtu.be/-FH_VqRQrso>`_.
`FLARE (LAMMPS active learning) <https://bit.ly/flarelmpotf>`_.
This tutorial demonstrates new functionality for running active learning all within LAMMPS, with LAMMPS running the dynamics to allow arbitrarily complex molecular dynamics workflows while maintaining a simple interface. This also demonstrates how to use the C++ API directly from Python through `pybind11`. Finally, there's a simple demonstration of phonon calculations with FLARE using `phonopy`.

`FLARE (2+3-body + GP) <https://colab.research.google.com/drive/1Q2NCCQWYQdTW9-e35v1W-mBlWTiQ4zfT>`_.
The tutorial shows how to use flare 2+3 body descriptors and squared exponential kernel to train a Gaussian Process force field on-the-fly.
.. `FLARE (ACE descriptors + sparse GP) Python API <https://colab.research.google.com/drive/18_pTcWM19AUiksaRyCgg9BCpVyw744xv>`_.
.. The tutorial shows how to do the offline and online trainings with python scripts.
.. A video walkthrough of the tutorial, including detailed discussion of expected outputs, is available `here <https://youtu.be/-FH_VqRQrso>`_.
.. `FLARE (2+3-body + GP) <https://colab.research.google.com/drive/1Q2NCCQWYQdTW9-e35v1W-mBlWTiQ4zfT>`_.
.. The tutorial shows how to use flare 2+3 body descriptors and squared exponential kernel to train a Gaussian Process force field on-the-fly.
`Compute thermal conductivity from FLARE and Boltzmann transport equations <https://phoebe.readthedocs.io/en/develop/tutorials/mlPhononTransport.html>`_.
The tutorial shows how to use FLARE (LAMMPS) potential to compute lattice thermal conductivity from Boltzmann transport equation method,
Expand Down
Loading

0 comments on commit 08434cb

Please sign in to comment.