Skip to content

Commit

Permalink
Minor docs fix for math rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase authored and cw-tan committed Nov 28, 2024
1 parent 34d89bd commit 96d4f50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 3 additions & 1 deletion docs/guide/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Users that have data with virials but seek to train on stress can use the data transform `nequip.data.transforms.VirialToStressTransform`.

0 comments on commit 96d4f50

Please sign in to comment.