forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13239 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
03662ee700
commit
c63d258cc0
|
@ -37,6 +37,8 @@ meam modified embedded atom method (MEAM) potential, MEAM package
|
|||
from Greg Wagner (Sandia)
|
||||
molfile hooks to VMD molfile plugins, used by the USER-MOLFILE package
|
||||
from Axel Kohlmeyer (Temple U) and the VMD development team
|
||||
python hooks to the system Python library, used by the PYTHON package
|
||||
from the LAMMPS development team
|
||||
qmmm quantum mechanics/molecular mechanics coupling interface
|
||||
from Axel Kohlmeyer (Temple U)
|
||||
quip interface to QUIP/libAtoms framework, USER-QUIP package
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# Settings that the LAMMPS build will import when this package library is used
|
||||
# See the README file for more explanation
|
||||
|
||||
python_SYSINC = -I/usr/local/include/python2.7
|
||||
python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
|
||||
python_SYSPATH =
|
|
@ -0,0 +1,6 @@
|
|||
# Settings that the LAMMPS build will import when this package library is used
|
||||
# See the README file for more explanation
|
||||
|
||||
python_SYSINC = -I/usr/local/include/python2.7
|
||||
python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
|
||||
python_SYSPATH =
|
|
@ -0,0 +1,6 @@
|
|||
# Settings that the LAMMPS build will import when this package library is used
|
||||
# See the README file for more explanation
|
||||
|
||||
python_SYSINC = -I/usr/local/include/python2.7
|
||||
python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
|
||||
python_SYSPATH =
|
|
@ -0,0 +1,54 @@
|
|||
The Makefile.lammps file in this directory is used when building
|
||||
LAMMPS with its PYTHON package installed. The file has several
|
||||
settings needed to compile and link LAMMPS with the Python library.
|
||||
You should choose a Makefile.lammps.* file compatible with your system
|
||||
and your version of Python, and copy it to Makefile.lammps before
|
||||
building LAMMPS itself. You may need to edit one of the provided
|
||||
files to match your system.
|
||||
|
||||
If you create a new Makefile.lammps file suitable for some version of
|
||||
Python on some system, that is not a match to one of the provided
|
||||
Makefile.lammps.* files, you can send it to the developers, and we can
|
||||
include it in the distribution for others to use.
|
||||
|
||||
To illustrate, these are example settings from the
|
||||
Makefile.lammps.python2.7 file:
|
||||
|
||||
python_SYSINC = -I/usr/local/include/python2.7
|
||||
python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
|
||||
python_SYSPATH =
|
||||
|
||||
python_SYSINC refers to the directory where Python's Python.h file is
|
||||
found. LAMMPS includes this file.
|
||||
|
||||
python_SYSLIB refers to the libraries needed to link to from an
|
||||
application (LAMMPS in this case) to "embed" Python in the
|
||||
application. The Python library itself is listed (-lpython2.7) are
|
||||
are several system libraries needed by Python.
|
||||
|
||||
python_SYSPATH = refers to the path (e.g. -L/usr/local/lib) where the
|
||||
Python library can be found. You may not need this setting if the
|
||||
path is already included in your LD_LIBRARY_PATH environment variable.
|
||||
|
||||
-------------------------
|
||||
|
||||
Note that the trickiest issue to figure out for inclusion in
|
||||
Makefile.lammps is what system libraries are needed by your Python to
|
||||
run in embedded mode on your machine.
|
||||
|
||||
Here is what this Python doc page says about it:
|
||||
|
||||
https://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-systems
|
||||
|
||||
"It is not necessarily trivial to find the right flags to pass to your
|
||||
compiler (and linker) in order to embed the Python interpreter into
|
||||
your application, particularly because Python needs to load library
|
||||
modules implemented as C dynamic extensions (.so files) linked against
|
||||
it.
|
||||
|
||||
To find out the required compiler and linker flags, you can execute
|
||||
the pythonX.Y-config script which is generated as part of the
|
||||
installation process (a python-config script may also be available)."
|
||||
|
||||
It then gives examples of how to use the pythonX.Y-config script
|
||||
and further instructions for what to do if that doesn't work.
|
Loading…
Reference in New Issue