Commit 0f883489 authored by sjplimp's avatar sjplimp Committed by GitHub
Browse files

Merge pull request #492 from lammps/pre-patch

update docs before patch release
parents 9db9fc9d b28ecd44
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -618,6 +618,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
"press/berendsen"_fix_press_berendsen.html,
"print"_fix_print.html,
"property/atom"_fix_property_atom.html,
"python"_fix_python.html,
"qeq/comb (o)"_fix_qeq_comb.html,
"qeq/dynamic"_fix_qeq.html,
"qeq/fire"_fix_qeq.html,
@@ -984,6 +985,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"peri/pmb (o)"_pair_peri.html,
"peri/ves"_pair_peri.html,
"polymorphic"_pair_polymorphic.html,
"python"_pair_python.html,
"reax"_pair_reax.html,
"rebo (o)"_pair_airebo.html,
"resquared (go)"_pair_resquared.html,
+26 −13
Original line number Diff line number Diff line
@@ -118,13 +118,21 @@ check which version of Python you have installed, by simply typing

11.2 Overview of using Python from a LAMMPS script :link(py_2),h4

LAMMPS has a "python"_python.html command which can be used in an
input script to define and execute a Python function that you write
the code for.  The Python function can also be assigned to a LAMMPS
python-style variable via the "variable"_variable.html command.  Each
time the variable is evaluated, either in the LAMMPS input script
itself, or by another LAMMPS command that uses the variable, this will
trigger the Python function to be invoked.
LAMMPS has several commands which can be used to invoke Python
code directly from an input script:

"python"_python.html
"variable python"_variable.html
"fix python"_fix_python.html
"pair_style python"_pair_python.html :ul

The "python"_python.html command which can be used to define and
execute a Python function that you write the code for.  The Python
function can also be assigned to a LAMMPS python-style variable via
the "variable"_variable.html command.  Each time the variable is
evaluated, either in the LAMMPS input script itself, or by another
LAMMPS command that uses the variable, this will trigger the Python
function to be invoked.

The Python code for the function can be included directly in the input
script or in an auxiliary file.  The function can have arguments which
@@ -155,13 +163,18 @@ commands.
See the "python"_python.html doc page and the "variable"_variable.html
doc page for its python-style variables for more info, including
examples of Python code you can write for both pure Python operations
and callbacks to LAMMPS. See "fix python"_fix_python.html to learn about
possibilities to execute Python code during each time step.
Through the "python pair style"_pair_python.html it is also possible
to define potential functions as python code.
and callbacks to LAMMPS.

To run pure Python code from LAMMPS, you only need to build LAMMPS
with the PYTHON package installed:
The "fix python"_fix_python.html command can execute
Python code at selected timesteps during a simulation run.

The "pair_style python"_pair_python command allows you to define
pairwise potentials as python code which encodes a single pairwise
interaction.  This is useful for rapid-developement and debugging of a
new potential.

To use any of these commands, you only need to build LAMMPS with the
PYTHON package installed:

make yes-python
make machine :pre
+14 −1
Original line number Diff line number Diff line
@@ -34,7 +34,20 @@ written to {filename} on timesteps that are multiples of {Nevery},
including timestep 0.  For time-averaged chemical species analysis,
please see the "fix reaxc/c/species"_fix_reaxc_species.html command.

The format of the output file should be self-explanatory.
The format of the output file should be reasonably self-explanatory.
The meaning of the column header abbreviations is as follows:

id = atom id
type = atom type
nb = number of bonds
id_1 = atom id of first bond
id_nb = atom id of Nth bond
mol = molecule id
bo_1 = bond order of first bond
bo_nb = bond order of Nth bond
abo = atom bond order (sum of all bonds)
nlp = number of lone pairs
q = atomic charge :ul

If the filename ends with ".gz", the output file is written in gzipped
format.  A gzipped dump file will be about 3x smaller than the text
+5 −4
Original line number Diff line number Diff line
@@ -7,12 +7,13 @@
:line

pair_style edip command :h3
pair_style edip/multi command :h3

[Syntax:]

pair_style edip :pre
pair_style edip/omp :pre
pair_style edip/multi :pre
pair_style style :pre

style = {edip} or {edip/multi} :ul

[Examples:]

@@ -168,4 +169,4 @@ appropriate units if your simulation doesn't use "metal" units.
:line

:link(EDIP)
[(EDIP)] J. F. Justo et al., Phys. Rev. B 58, 2539 (1998).
[(EDIP)] J F Justo et al, Phys Rev B 58, 2539 (1998).
+3 −1
Original line number Diff line number Diff line
@@ -11,7 +11,9 @@ pair_style gw/zbl command :h3

[Syntax:]

pair_style gw :pre
pair_style style :pre

style = {gw} or {gw/zbl} :ul

[Examples:]

Loading