: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_01-charges-example_thumb.png
:alt:
:ref:`sphx_glr_examples_01-charges-example.py`
.. raw:: html
Computations with Multiple Charge Channels
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_02-neighbor-lists-usage_thumb.png
:alt:
:ref:`sphx_glr_examples_02-neighbor-lists-usage.py`
.. raw:: html
Advanced neighbor list usage
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_03-mesh-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_03-mesh-demo.py`
.. raw:: html
Examples of the MeshInterpolator class
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_04-kspace-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_04-kspace-demo.py`
.. raw:: html
Examples of the KSpaceFilter class
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_05-autograd-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_05-autograd-demo.py`
.. raw:: html
Custom models with automatic differentiation
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_06-splined-potential_thumb.png
:alt:
:ref:`sphx_glr_examples_06-splined-potential.py`
.. raw:: html
Splined potentials
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_07-lode-demo_thumb.png
:alt:
:ref:`sphx_glr_examples_07-lode-demo.py`
.. raw:: html
Computing LODE descriptors
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_08-combined-potential_thumb.png
:alt:
:ref:`sphx_glr_examples_08-combined-potential.py`
.. raw:: html
Optimizing a linear combination of potentials
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_09-atomistic-model_thumb.png
:alt:
:ref:`sphx_glr_examples_09-atomistic-model.py`
.. raw:: html
Atomistic model for molecular dynamics
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_10-tuning_thumb.png
:alt:
:ref:`sphx_glr_examples_10-tuning.py`
.. raw:: html
Parameter tuning for range-separated models
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_11-4-site-water_thumb.png
:alt:
:ref:`sphx_glr_examples_11-4-site-water.py`
.. raw:: html
4-site water models
.. raw:: html
.. only:: html
.. image:: /examples/images/thumb/sphx_glr_basic-usage_thumb.png
:alt:
:ref:`sphx_glr_examples_basic-usage.py`
.. raw:: html
Basic Usage
.. thumbnail-parent-div-close
.. raw:: html
.. toctree::
:hidden:
/examples/01-charges-example
/examples/02-neighbor-lists-usage
/examples/03-mesh-demo
/examples/04-kspace-demo
/examples/05-autograd-demo
/examples/06-splined-potential
/examples/07-lode-demo
/examples/08-combined-potential
/examples/09-atomistic-model
/examples/10-tuning
/examples/11-4-site-water
/examples/basic-usage
.. 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