mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13236 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
46fd9013a5
commit
fb2a894e03
|
@ -1,6 +1,6 @@
|
|||
This directory contains Python code which wraps LAMMPS as a library
|
||||
and allows the LAMMPS library interface to be invoked from Python,
|
||||
either from a script or interactively.
|
||||
either from a Python script or using Python interactively.
|
||||
|
||||
Details on the Python interface to LAMMPS and how to build LAMMPS as a
|
||||
shared library, for use with Python, are given in
|
||||
|
@ -16,16 +16,22 @@ variables in your shell script. Or you can run the python/install.py
|
|||
script directly to give you more control over where the two relevant
|
||||
files are installed. See doc/Section_python.html for details.
|
||||
|
||||
You can then launch Python and instantiate an instance of LAMMPS:
|
||||
You should then be able to launch Python and instantiate an instance
|
||||
of LAMMPS:
|
||||
|
||||
% python
|
||||
>>> from lammps import lammps
|
||||
>>> lmp = lammps()
|
||||
|
||||
If that gives no errors, you have succesfully wrapped LAMMPS with
|
||||
Python. See doc/Section_python.html#py_5 for tests you can then use
|
||||
Python. See doc/Section_python.html#py_7 for tests you can then use
|
||||
to run LAMMPS both in serial or parallel thru Python.
|
||||
|
||||
Note that you can also invoke Python code from within a LAMMPS input
|
||||
script, using the "python" command. See the doc/python.html doc page
|
||||
for details. The Python code you invoke can also call back to LAMMPS
|
||||
using the same interface described here for wrapping LAMMPS.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Once you have successfully wrapped LAMMPS, you can run the Python
|
||||
|
|
Loading…
Reference in New Issue