move the entries about using the Python module into its own (sub) toctree

This commit is contained in:
Axel Kohlmeyer
2020-10-15 20:29:24 -04:00
parent 08d892d0d9
commit dd7a3a3a54
4 changed files with 131 additions and 115 deletions

View File

@ -1,16 +1,19 @@
Extending the library and Python interface
******************************************
As noted above, these Python class methods correspond one-to-one with
As noted previously, the Python class methods correspond one-to-one with
the functions in the LAMMPS library interface in ``src/library.cpp`` and
``library.h``. This means you can extend the Python wrapper via the
following steps:
``library.h``. This means you can extend the Python wrapper by
following these steps:
* Add a new interface function to ``src/library.cpp`` and
``src/library.h``.
* Rebuild LAMMPS as a shared library.
* Add a wrapper method to ``python/lammps.py`` for this interface
function.
* Define the corresponding ``argtypes`` list and ``restype``
in the ``lammps.__init__()`` function.
* Re-install the shared library and the python module, if needed
* You should now be able to invoke the new interface function from a
Python script.