make headers more compact
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
Calling Python from a LAMMPS input script
|
Calling Python from LAMMPS
|
||||||
*****************************************
|
**************************
|
||||||
|
|
||||||
LAMMPS has several commands which can be used to invoke Python
|
LAMMPS has several commands which can be used to invoke Python
|
||||||
code directly from an input script:
|
code directly from an input script:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
LAMMPS error handling in Python
|
Handling LAMMPS errors
|
||||||
*******************************
|
*******************************
|
||||||
|
|
||||||
Compiling the shared library with :ref:`C++ exception support <exceptions>` provides a better error
|
Compiling the shared library with :ref:`C++ exception support <exceptions>` provides a better error
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
Example Python scripts that use LAMMPS
|
Example Python scripts
|
||||||
======================================
|
======================
|
||||||
|
|
||||||
The python/examples directory has Python scripts which show how Python
|
The ``python/examples`` directory has Python scripts which show how Python
|
||||||
can run LAMMPS, grab data, change it, and put it back into LAMMPS.
|
can run LAMMPS, grab data, change it, and put it back into LAMMPS.
|
||||||
|
|
||||||
These are the Python scripts included as demos in the python/examples
|
These are the Python scripts included as demos in the ``python/examples``
|
||||||
directory of the LAMMPS distribution, to illustrate the kinds of
|
directory of the LAMMPS distribution, to illustrate the kinds of
|
||||||
things that are possible when Python wraps LAMMPS. If you create your
|
things that are possible when Python wraps LAMMPS. If you create your
|
||||||
own scripts, send them to us and we can include them in the LAMMPS
|
own scripts, send them to us and we can include them in the LAMMPS
|
||||||
@ -32,7 +32,7 @@ distribution.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
For the viz_tool.py and vizplotgui_tool.py commands, replace "tool"
|
For the ``viz_tool.py`` and ``vizplotgui_tool.py`` commands, replace "tool"
|
||||||
with "gl" or "atomeye" or "pymol" or "vmd", depending on what
|
with "gl" or "atomeye" or "pymol" or "vmd", depending on what
|
||||||
visualization package you have installed.
|
visualization package you have installed.
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
Extending the library and Python interface
|
Extending the Python interface
|
||||||
******************************************
|
******************************************
|
||||||
|
|
||||||
As noted previously, the Python class methods correspond one-to-one with
|
As noted previously, most of the :py:class:`lammps <lammps.lammps>`
|
||||||
the functions in the LAMMPS library interface in ``src/library.cpp`` and
|
Python class methods correspond one-to-one with the functions in the
|
||||||
``library.h``. This means you can extend the Python wrapper by
|
LAMMPS library interface in ``src/library.cpp`` and ``library.h``.
|
||||||
following these steps:
|
This means you can extend the Python wrapper by following these steps:
|
||||||
|
|
||||||
* Add a new interface function to ``src/library.cpp`` and
|
* Add a new interface function to ``src/library.cpp`` and
|
||||||
``src/library.h``.
|
``src/library.h``.
|
||||||
@ -17,3 +17,4 @@ following these steps:
|
|||||||
* You should now be able to invoke the new interface function from a
|
* You should now be able to invoke the new interface function from a
|
||||||
Python script.
|
Python script.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user