Files
lammps/doc/rst/Python_overview.rst
Richard Berger 574e4067dc Add documentation files in RST format
This is the first step for moving the documentation format from *.txt to the
*.rst format.

In the last years we've been automatically converting txt files from Steve's
markup into RST to generate the documentation pages via Sphinx. The decision
has now been made to fully migrate to RST and avoid the conversion in the
future.

This will enable us to fully use RST and Sphinx to improve the documentation.

For the intermediate period, while there are still pending PRs with
documentation changes, we will keep both source files and update the RST files
accordingly.
2019-08-22 14:11:32 -06:00

31 lines
1.4 KiB
ReStructuredText

Overview of Python and LAMMPS
=============================
LAMMPS can work together with Python in three ways. First, Python can
wrap LAMMPS through the its :doc:`library interface <Howto_library>`, so
that a Python script can create one or more instances of LAMMPS and
launch one or more simulations. In Python lingo, this is called
"extending" Python with a LAMMPS module.
Second, a lower-level Python interface can be used indirectly through
the provided PyLammps and IPyLammps wrapper classes, written in Python.
These wrappers try to simplify the usage of LAMMPS in Python by
providing an object-based interface to common LAMMPS functionality.
They also reduces the amount of code necessary to parameterize LAMMPS
scripts through Python and make variables and computes directly
accessible.
Third, LAMMPS can use the Python interpreter, so that a LAMMPS
input script or styles can invoke Python code directly, and pass
information back-and-forth between the input script and Python
functions you write. This Python code can also callback to LAMMPS
to query or change its attributes through the LAMMPS Python module
mentioned above. In Python lingo, this is "embedding" Python in
LAMMPS. When used in this mode, Python can perform script operations
that the simple LAMMPS input script syntax can not.
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Commands_all.html