Skip to content

Commit

Permalink
Put the engine logo in the backlink from outputs
Browse files Browse the repository at this point in the history
This also split rst prolog out of the conf file since it
was starting to be quite large
  • Loading branch information
Luthaf committed Sep 12, 2024
1 parent 64196d5 commit 30bcf57
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 44 deletions.
63 changes: 63 additions & 0 deletions docs/src/_prolog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. this file contains ReST substitutions for images & logo that should be
.. available in all other source files. It is automatically injected inside
.. all the documentation files.
.. programming language logos
.. |C-32x32| image:: /../static/images/logo-c.*
:width: 32px
:height: 32px
:alt: C

.. |C-16x16| image:: /../static/images/logo-c.*
:width: 16px
:height: 16px
:alt: C

.. |Cxx-32x32| image:: /../static/images/logo-cxx.*
:width: 32px
:height: 32px
:alt: C++

.. |Cxx-16x16| image:: /../static/images/logo-cxx.*
:width: 16px
:height: 16px
:alt: C++

.. |Rust-32x32| image:: /../static/images/logo-rust.*
:width: 32px
:height: 32px
:alt: Rust

.. |Rust-16x16| image:: /../static/images/logo-rust.*
:width: 16px
:height: 16px
:alt: Rust

.. |Python-32x32| image:: /../static/images/logo-python.*
:width: 32px
:height: 32px
:alt: Python

.. |Python-16x16| image:: /../static/images/logo-python.*
:width: 16px
:height: 16px
:alt: Python

.. simulation engines logos
.. |ase-logo| image:: /../static/images/logo-ase.*
:height: 54px
:alt: ASE

.. |ipi-logo| image:: /../static/images/logo-ipi.*
:height: 48px
:alt: i-PI

.. |lammps-logo| image:: /../static/images/logo-lammps-large.*
:height: 44px
:alt: LAMMPS

.. |plumed-logo| image:: /../static/images/logo-plumed.*
:height: 75px
:alt: PLUMED
7 changes: 4 additions & 3 deletions docs/src/atomistic/outputs/energy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ The following simulation engines can use the ``"energy"`` output:
:link: engine-lammps
:link-type: ref

LAMMPS
|lammps-logo|

.. grid-item-card::
:text-align: center
:padding: 1
:link: engine-ase
:link-type: ref

ASE
|ase-logo|

.. grid-item-card::
:text-align: center
:padding: 1
:link: engine-ipi
:link-type: ref

i-PI
|ipi-logo|

.. _energy-output-gradients:

Expand Down Expand Up @@ -173,6 +173,7 @@ Energy ensembles must have the following metadata:
``"energy"``, with entries ranging from 0 to the number of members of the
ensemble minus one.

Currently, no simulation engines can use the ``"energy_ensemble"`` output.

Energy ensemble gradients
-------------------------
Expand Down
6 changes: 4 additions & 2 deletions docs/src/atomistic/outputs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following simulation engines can use the ``"features"`` output:
:link: engine-plumed
:link-type: ref

PLUMED
|plumed-logo|

.. grid-item-card::
:text-align: center
Expand All @@ -73,7 +73,9 @@ The following simulation engines can use the ``"features"`` output:

.. py:currentmodule:: metatensor.torch.atomistic.ase_calculator.MetatensorCalculator
ASE (using :py:meth:`run_model`)
|ase-logo|

(using :py:meth:`run_model`)

Features gradients
------------------
Expand Down
47 changes: 8 additions & 39 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,47 +110,15 @@ def setup(app):
.. |metatensor-operations-version| replace:: {metatensor.operations.__version__}
.. |metatensor-learn-version| replace:: {metatensor.learn.__version__}
.. |C-32x32| image:: /../static/images/logo-c.*
:width: 32px
:height: 32px
:alt: C
.. |C-16x16| image:: /../static/images/logo-c.*
:width: 16px
:height: 16px
:alt: C
.. |Cxx-32x32| image:: /../static/images/logo-cxx.*
:width: 32px
:height: 32px
:alt: C++
.. |Cxx-16x16| image:: /../static/images/logo-cxx.*
:width: 16px
:height: 16px
:alt: C++
.. |Rust-32x32| image:: /../static/images/logo-rust.*
:width: 32px
:height: 32px
:alt: Rust
.. |Rust-16x16| image:: /../static/images/logo-rust.*
:width: 16px
:height: 16px
:alt: Rust
.. |Python-32x32| image:: /../static/images/logo-python.*
:width: 32px
:height: 32px
:alt: Python
.. |Python-16x16| image:: /../static/images/logo-python.*
:width: 16px
:height: 16px
:alt: Python
"""

with open(os.path.join(ROOT, "docs", "src", "_prolog.rst")) as fd:
rst_prolog += fd.read()

# print(rst_prolog)

# raise 44

# -- General configuration ---------------------------------------------------

needs_sphinx = "7.4.0"
Expand Down Expand Up @@ -190,6 +158,7 @@ def setup(app):
"examples/index.rst",
"examples/sg_execution_times.rst",
"sg_execution_times.rst",
"_prolog.rst",
]

autoclass_content = "both"
Expand Down
Binary file added docs/static/images/logo-lammps-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 30bcf57

Please sign in to comment.