:orphan:
.. _userdoc-how-to:
Examples
========
This section lists introductory examples and recipes to the various classes and
functions of ``torch-pme``. Example are sorted in increasing order of complexity. For
details on the API specification of the functions take a look at the
:ref:`userdoc-reference` section.
To run the all examples, install ``torchpme`` with the ``examples`` and ``metatensor``
optional dependencies.
.. code-block:: bash
pip install .[examples,metatensor]
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_1-charges-example_thumb.png
:alt:
:ref:`sphx_glr_examples_1-charges-example.py`
.. raw:: html
Computations with Multiple Charge Channels
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_2-neighbor-lists-usage_thumb.png
:alt:
:ref:`sphx_glr_examples_2-neighbor-lists-usage.py`
.. raw:: html
Advanced neighbor list usage
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_3-mesh-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_3-mesh-demo.py`
.. raw:: html
Examples of the MeshInterpolator class
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_4-kspace-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_4-kspace-demo.py`
.. raw:: html
Examples of the KSpaceFilter class
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_5-autograd-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_5-autograd-demo.py`
.. raw:: html
Custom models with automatic differentiation
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_6-splined-potential_thumb.png
:alt:
:ref:`sphx_glr_examples_6-splined-potential.py`
.. raw:: html
Splined potentials
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_7-lode-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_7-lode-demo.py`
.. raw:: html
Computing LODE descriptors
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_8-combined-potential_thumb.png
:alt:
:ref:`sphx_glr_examples_8-combined-potential.py`
.. raw:: html
Optimizing a linear combination of potentials
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_9-atomistic-model_thumb.png
:alt:
:ref:`sphx_glr_examples_9-atomistic-model.py`
.. raw:: html
Atomistic model for molecular dynamics
.. thumbnail-parent-div-close
.. raw:: html
.. toctree::
:hidden:
/examples/1-charges-example
/examples/2-neighbor-lists-usage
/examples/3-mesh-demo
/examples/4-kspace-demo
/examples/5-autograd-demo
/examples/6-splined-potential
/examples/7-lode-demo
/examples/8-combined-potential
/examples/9-atomistic-model
.. only:: html
.. container:: sphx-glr-footer sphx-glr-footer-gallery
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download all examples in Python source code: examples_python.zip `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download all examples in Jupyter notebooks: examples_jupyter.zip `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery