diff --git a/doc/src/Python_module.rst b/doc/src/Python_module.rst index 8b4fbe1c2e..59be645cbd 100644 --- a/doc/src/Python_module.rst +++ b/doc/src/Python_module.rst @@ -26,6 +26,23 @@ There are multiple Python interface classes in the :py:mod:`lammps` module: .. _mpi4py_url: https://mpi4py.readthedocs.io +.. admonition:: Version check + :class: note + + The :py:mod:`lammps` module stores the version number of the LAMMPS + version it is installed from. When initializing the + :py:class:`lammps ` class, this version is checked to + be the same as the result from :py:func:`lammps.version`, the version + of the LAMMPS shared library that the module interfaces to. If the + they are not the same an AttributeError exception is raised since a + mismatch of versions (e.g. due to incorrect use of the + ``LD_LIBRARY_PATH`` or ``PYTHONPATH`` environment variables can lead + to crashes or data corruption and otherwise incorrect behavior. + +.. automodule:: lammps + :members: + :noindex: + ---------- The ``lammps`` class API diff --git a/doc/src/fix_flow_gauss.rst b/doc/src/fix_flow_gauss.rst index c7907432dc..67a0218c9b 100644 --- a/doc/src/fix_flow_gauss.rst +++ b/doc/src/fix_flow_gauss.rst @@ -165,8 +165,9 @@ LAMMPS was built with that package. See the :doc:`Build package Related commands """""""""""""""" -:doc:`fix addforce `, :doc:`compute temp/profile - `, :doc:`velocity ` +:doc:`fix addforce `, +:doc:`compute temp/profile `, +:doc:`velocity ` Default """"""" diff --git a/python/lammps/__init__.py b/python/lammps/__init__.py index e73e514d8c..be496167e8 100644 --- a/python/lammps/__init__.py +++ b/python/lammps/__init__.py @@ -1,3 +1,13 @@ +""" +LAMMPS module global members: + +.. data:: __version__ + + Numerical representation of the LAMMPS version this + module was taken from. Has the same format as the + result of :py:func:`lammps.version`. +""" + from .constants import * from .core import * from .data import *