changes to Errors and Python doc pages
This commit is contained in:
35
doc/src/Python_overview.txt
Normal file
35
doc/src/Python_overview.txt
Normal file
@ -0,0 +1,35 @@
|
||||
"Previous Section"_Examples.html - "LAMMPS WWW Site"_lws -
|
||||
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
|
||||
Section"_Tools.html :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
Overview of Python and LAMMPS :h3
|
||||
|
||||
LAMMPS can work together with Python in three ways. First, Python can
|
||||
wrap LAMMPS through the its "library interface"_Howto_library.html, so
|
||||
that a Python script can create one or more instances of LAMMPS and
|
||||
launch one or more simulations. In Python lingo, this is "extending"
|
||||
Python with LAMMPS.
|
||||
|
||||
Second, a lower-level Python interface can be used indirectly through
|
||||
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 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. In Python lingo, this is "embedding" Python in
|
||||
LAMMPS. When used in this mode, Python can perform operations that
|
||||
the simple LAMMPS input script syntax cannot.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user