.. _sphx_glr_examples_neighbors:
Neighbor Lists
==============
Examples demonstrating efficient O(N) neighbor list construction using GPU-accelerated
cell list algorithms.
These examples show how to:
* Build neighbor lists for single and batched systems
* Use dense or sparse COO output formats
* Detect when neighbor lists need rebuilding
* Optimize performance with ``torch.compile``
* Integrate with molecular dynamics workflows
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /examples/neighbors/images/thumb/sphx_glr_01_simple_neighbor_list_thumb.png
:alt:
:doc:`/examples/neighbors/01_simple_neighbor_list`
.. raw:: html
Simple Neighbor List Example
.. raw:: html
.. only:: html
.. image:: /examples/neighbors/images/thumb/sphx_glr_02_batch_neighbor_list_thumb.png
:alt:
:doc:`/examples/neighbors/02_batch_neighbor_list`
.. raw:: html
Batch Neighbor List Example
.. raw:: html
.. only:: html
.. image:: /examples/neighbors/images/thumb/sphx_glr_03_rebuild_neighborlist_detection_thumb.png
:alt:
:doc:`/examples/neighbors/03_rebuild_neighborlist_detection`
.. raw:: html
Neighbor List Rebuild Detection Example
.. raw:: html
.. only:: html
.. image:: /examples/neighbors/images/thumb/sphx_glr_04_neighbors_list_torch_compile_performance_thumb.png
:alt:
:doc:`/examples/neighbors/04_neighbors_list_torch_compile_performance`
.. raw:: html
Torch.compile Performance Benefits Example
.. raw:: html
.. only:: html
.. image:: /examples/neighbors/images/thumb/sphx_glr_05_jax_neighbor_list_thumb.png
:alt:
:doc:`/examples/neighbors/05_jax_neighbor_list`
.. raw:: html
JAX Neighbor List Example
.. thumbnail-parent-div-close
.. raw:: html
.. toctree::
:hidden:
/examples/neighbors/01_simple_neighbor_list
/examples/neighbors/02_batch_neighbor_list
/examples/neighbors/03_rebuild_neighborlist_detection
/examples/neighbors/04_neighbors_list_torch_compile_performance
/examples/neighbors/05_jax_neighbor_list