From 96d4f504d0ffe422098b372c0559b92457cd4e38 Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Wed, 27 Nov 2024 19:54:38 -0500 Subject: [PATCH] Minor docs fix for math rendering --- docs/conf.py | 5 +++++ docs/guide/conventions.md | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 3474d053..2dce2542 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,11 @@ "sphinx_rtd_theme", "myst_parser", ] +myst_enable_extensions = [ + "html_admonition", + "dollarmath", # "amsmath", # to parse Latex-style math +] + autodoc_member_order = "bysource" autosummary_generate = True source_suffix = [".rst", ".md"] diff --git a/docs/guide/conventions.md b/docs/guide/conventions.md index 4387e176..fbe2fff4 100644 --- a/docs/guide/conventions.md +++ b/docs/guide/conventions.md @@ -22,11 +22,13 @@ Training labels for stress in the original dataset must be pre-processed by the ``` Stress also includes an arbitrary sign convention, for which we adopt the choice that `virial = -stress x volume <=> stress = (-1/volume) * virial`. This is the most common sign convention in the literature (e.g. adopted by `ASE`), but notably differs from that used by VASP (see [here](https://www.vasp.at/wiki/index.php/ISIF)). In the sign convention used by `nequip`, stress is defined as the derivative of the energy $E$ with respect to the strain tensor $\eta_{ji}$: + $$\sigma_{ij} = \frac{\delta E} {\delta \eta_{ji}}$$ + such that a positive in the diagonals implies the system is _under tensile strain_ and wants to compress, while a negative value implies the system is _under compressive strain_ and wants to expand. When VASP results are parsed by `ASE`, the sign is flipped to match the `nequip` convention. ```{warning} Training labels for stress in the original dataset must be pre-processed by the user to be in **this sign convention**, which they may or may not already be depending on their origin. ``` -Users that have data with virials but seek to train on stress can use the data transform `nequip.data.transforms.VirialToStressTransform`. \ No newline at end of file +Users that have data with virials but seek to train on stress can use the data transform `nequip.data.transforms.VirialToStressTransform`.