Skip to content

Commit

Permalink
Add Zundel i-PI example to online docs
Browse files Browse the repository at this point in the history
  • Loading branch information
max-veit committed Mar 26, 2021
1 parent d4479cc commit 384ae15
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
12 changes: 12 additions & 0 deletions docs/source/examples/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Examples
========

This section contains self-contained examples of using `librascal` for various
atomistic modelling tasks. The examples are structured in the form of Jupyter
notebooks, rendered for viewing here and available for interactive execution in
the top-level :file:`examples/` directory.

.. toctree::
:maxdepth: 1

zundel_IP.ipynb
1 change: 1 addition & 0 deletions docs/source/examples/zundel_IP.ipynb
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Contents

installation
user_guide/user_guide
examples/examples
whitepaper
SOAP
dev_guide/developer
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/running_md.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ such as `ipyparallel <https://ipyparallel.readthedocs.io/en/latest/>`_.
LAMMPS (under construction)
---------------------------

`LAMMPS <https://lammps.sandia.gov/>` is one of the most widely used MD codes
`LAMMPS <https://lammps.sandia.gov/>`_ is one of the most widely used MD codes
and supports a wide array of energy and force models (including several machine
learning potentials), as well as parallel MD via spatial domain decomposition.
An interface to LAMMPS is currently in the works; stay tuned for more!
Expand Down
20 changes: 10 additions & 10 deletions examples/iPi/zundel/zundel_IP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"\n",
"The mathematical framework that we are going to use is the kernel-GAP fitting method, using both total energies and atomic forces as target properties. Basically the GAP-model total energy of a zundel molecule is computed using the following expression: \n",
"\n",
"\\begin{equation}\n",
"$$\n",
" E = E_0 + \\sum_i \\sum_{s=1}^M \\alpha_s K(\\bf{d_i} , \\bf{d_s} ) \n",
"\\end{equation}\n",
"$$\n",
"\n",
"where $E_0$ represents an energy baseline (given usually by the sum of atomic self-contributions), $\\bf{d_i}$ ($i = 1, \\dots, N_{atoms}$) are the set of (normalized SOAP) descriptors describing an environment centred around atom $i$, $\\bf{d_s}$ the set of descriptors corresponding to the environments of the sparse set (of size $M$) and K a kernel matrix that describes the similarity of two different atomic environments. In our application, the kernel is just the dot product, raised to some integer power $\\zeta$: \n",
"\n",
"\\begin{equation}\n",
"$$\n",
" K(\\bf{d_i} , \\bf{d_s} ) \\propto \\left| \\bf{d_i} \\cdot \\bf{d_s} \\right|^{\\zeta} \n",
"\\end{equation}\n",
"$$\n",
"\n",
"Finally $\\alpha_s$ represents the weights of each sparse environment, to be determined using Kernel-Ridge Regression (KRR).\n",
"For extensive details on the SOAP GAP-model fitting procedure and interesting physical applications, we invite the reader to refer to...(link to the chemrev Review, once available). Details on the implementation in Librascal instead are given in https://cosmo-epfl.github.io/librascal/SOAP.html."
Expand Down Expand Up @@ -57,7 +57,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Importing all the necessary Librascal modules"
"### Importing all the necessary Librascal modules"
]
},
{
Expand Down Expand Up @@ -417,7 +417,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Assessment of the model"
"## Assessment of the model"
]
},
{
Expand Down Expand Up @@ -523,9 +523,9 @@
"source": [
"Let us now compute the overall performance of the model. This is done by calculation of the Root-Mean-Square Error (RMSE), i.e. the standard deviation of the residuals according to the standard formula:\n",
"\n",
" \\begin{equation}\n",
"$$\n",
" \\text{RMSE} = \\sqrt{\\frac{1}{n_{\\text{test}}}\\sum_i (y_{\\text{pred}}^{i} - y_{\\text{test}}^{i})^2}\n",
" \\end{equation}\n",
"$$\n",
" \n",
"which we can compare to the standard deviation of the test set itsself to quantify how much the model captures the energy variations in the test set. The $\\% \\text{RMSE}$ of our model is about $5 \\%$ of the training set STD, which is sufficiently accurate to run MD safely. \n",
"\n",
Expand Down Expand Up @@ -615,7 +615,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# MD simulations"
"## MD simulations"
]
},
{
Expand Down Expand Up @@ -735,7 +735,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.10"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down

0 comments on commit 384ae15

Please sign in to comment.