Skip to content

Commit

Permalink
Update all examples to use the new hypers
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Nov 14, 2024
1 parent 2085e14 commit 9ccb4d8
Show file tree
Hide file tree
Showing 10 changed files with 556 additions and 567 deletions.
58 changes: 29 additions & 29 deletions docs/src/how-to/long-range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
Long-range only LODE descriptor
===============================

Temporarily deactivated example
The :py:class:`LodeSphericalExpansion <rascaline.LodeSphericalExpansion>` allows
the calculation of a descriptor that includes all atoms within the system and
projects them onto a spherical expansion/ fingerprint within a given ``cutoff``.
This is very useful if long-range interactions between atoms are important to
describe the physics and chemistry of a collection of atoms. However, as stated
the descriptor contains **ALL** atoms of the system and sometimes it can be
desired to only have a long-range/exterior only descriptor that only includes
the atoms outside a given cutoff. Sometimes there descriptors are also denoted
by far-field descriptors.

.. The :py:class:`LodeSphericalExpansion <rascaline.LodeSphericalExpansion>` allows the
.. calculation of a descriptor that includes all atoms within the system and projects them
.. onto a spherical expansion/ fingerprint within a given ``cutoff``. This is very useful
.. if long-range interactions between atoms are important to describe the physics and
.. chemistry of a collection of atoms. However, as stated the descriptor contains **ALL**
.. atoms of the system and sometimes it can be desired to only have a long-range/exterior
.. only descriptor that only includes the atoms outside a given cutoff. Sometimes there
.. descriptors are also denoted by far-field descriptors.
A long range only descriptor can be particular useful when one already has a
good descriptor for the short-range density like (SOAP) and the long-range
descriptor (far field) should contain different information from what the
short-range descriptor already offers.

.. A long range only descriptor can be particular useful when one already has a good
.. descriptor for the short-range density like (SOAP) and the long-range descriptor (far
.. field) should contain different information from what the short-range descriptor already
.. offers.
Such descriptor can be constructed within `rascaline` as sketched by the image
below.

.. Such descriptor can be constructed within `rascaline` as sketched by the image below.
.. figure:: ../../static/images/long-range-descriptor.*
:align: center

.. .. figure:: ../../static/images/long-range-descriptor.*
.. :align: center
In this example will construct such a descriptor using the :ref:`radial integral
splining <python-utils-splines>` tools of `rascaline`.

.. In this example will construct such a descriptor using the :ref:`radial integral
.. splining <python-utils-splines>` tools of `rascaline`.
.. tabs::

.. .. tabs::
.. group-tab:: Python

.. .. group-tab:: Python
.. container:: sphx-glr-footer sphx-glr-footer-example

.. .. container:: sphx-glr-footer sphx-glr-footer-example
.. container:: sphx-glr-download sphx-glr-download-python

.. .. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code for this example: long-range-descriptor.py <../examples/long-range-descriptor.py>`

.. :download:`Download Python source code for this example: long-range-descriptor.py <../examples/long-range-descriptor.py>`
.. container:: sphx-glr-download sphx-glr-download-jupyter

.. .. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook for this example: long-range-descriptor.ipynb <../examples/long-range-descriptor.ipynb>`

.. :download:`Download Jupyter notebook for this example: long-range-descriptor.ipynb <../examples/long-range-descriptor.ipynb>`
.. .. include:: ../examples/long-range-descriptor.rst
.. :start-after: start-body
.. :end-before: end-body
.. include:: ../examples/long-range-descriptor.rst
:start-after: start-body
:end-before: end-body
28 changes: 13 additions & 15 deletions docs/src/how-to/splined-radial-integral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
Splined radial integral
=======================

Temporarily deactivated example
This examples shows how to feed custom radial integrals (as splines) to the Rust
calculators that use radial integrals: the SOAP and LODE spherical expansions,
and any other calculator based on these.

.. This examples shows how to feed custom radial integrals (as splines) to the Rust
.. calculators that use radial integrals: the SOAP and LODE spherical expansions,
.. and any other calculator based on these.
.. tabs::

.. .. tabs::
.. group-tab:: Python

.. .. group-tab:: Python
.. container:: sphx-glr-footer sphx-glr-footer-example

.. .. container:: sphx-glr-footer sphx-glr-footer-example
.. container:: sphx-glr-download sphx-glr-download-python

.. .. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code for this example: tabulated.py <../examples/splined-radial-integral.py>`

.. :download:`Download Python source code for this example: tabulated.py <../examples/splined-radial-integral.py>`
.. container:: sphx-glr-download sphx-glr-download-jupyter

.. .. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook for this example: tabulated.ipynb <../examples/splined-radial-integral.ipynb>`

.. :download:`Download Jupyter notebook for this example: tabulated.ipynb <../examples/splined-radial-integral.ipynb>`
.. .. include:: ../examples/splined-radial-integral.rst
.. :start-after: start-body
.. :end-before: end-body
.. include:: ../examples/splined-radial-integral.rst
:start-after: start-body
:end-before: end-body
2 changes: 2 additions & 0 deletions docs/src/references/api/python/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Miscellaneous
:undoc-members:

.. autofunction:: rascaline.convert_hypers

.. autofunction:: rascaline.utils.hypers_to_json
1 change: 1 addition & 0 deletions python/rascaline/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
splined-hypers.json
Loading

0 comments on commit 9ccb4d8

Please sign in to comment.