diff --git a/doc/doc2/Manual.html.html b/doc/doc2/Manual.html.html index da99bbbad0..9063e77b65 100644 --- a/doc/doc2/Manual.html.html +++ b/doc/doc2/Manual.html.html @@ -3,7 +3,7 @@
Library.cpp contains these 4 functions: +
Library.cpp contains these 5 basic functions:
void lammps_open(int, char **, MPI_Comm, void **) void lammps_close(void *) +int lammps_version(void *) void lammps_file(void *, char *) char *lammps_command(void *, char *)@@ -1893,6 +1894,14 @@ instances of LAMMPS to perform different calculations.
The lammps_close() function is used to shut down an instance of LAMMPS and free all its memory.
+The lammps_version() function can be used to determined the specific +version of the underlying LAMMPS code. This is particularly useful +when loading LAMMPS as a shared library via dlopen(). The code using +the library interface can than use this information to adapt to changes +to the LAMMPS command syntax between versions. The returned LAMMPS +version code is an integer (e.g. 2 Sep 2015 results in 20150902) that +is growing with every new LAMMPS version. +
The lammps_file() and lammps_command() functions are used to pass a file or string to LAMMPS as if it were an input script or single command in an input script. Thus the calling code can read or diff --git a/doc/doc2/Section_python.html b/doc/doc2/Section_python.html index 518e5de5cc..bcc34797cc 100644 --- a/doc/doc2/Section_python.html +++ b/doc/doc2/Section_python.html @@ -503,6 +503,8 @@ lmp = lammps("g++",list)
lmp.close() # destroy a LAMMPS object+
version = lmp.version() # return the numerical version id, e.g. LAMMPS 2 Sep 2015 -> 20150902 +
lmp.file(file) # run an entire input script, file = "in.lj" lmp.command(cmd) # invoke a single LAMMPS command, cmd = "run 100"diff --git a/doc/doc2/lattice.html b/doc/doc2/lattice.html index 2e75e2157d..c876428439 100644 --- a/doc/doc2/lattice.html +++ b/doc/doc2/lattice.html @@ -247,6 +247,39 @@ in commands that use the spacings should be decipherable.
Example commands for generating a Wurtzite crystal (courtesy +of Aidan Thompson), with its 8 atom unit cell. +
+variable a equal 4.340330 +variable b equal $a*sqrt(3.0) +variable c equal $a*sqrt(8.0/3.0) ++
variable 1_3 equal 1.0/3.0 +variable 2_3 equal 2.0/3.0 +variable 1_6 equal 1.0/6.0 +variable 5_6 equal 5.0/6.0 +variable 1_12 equal 1.0/12.0 +variable 5_12 equal 5.0/12/0 ++
lattice custom 1.0 &
+ a1 $a 0.0 0.0 &
+ a2 0.0 $b 0.0 &
+ a3 0.0 0.0 $c &
+ basis 0.0 0.0 0.0 &
+ basis 0.5 0.5 0.0 &
+ basis ${1_3} 0.0 0.5 &
+ basis ${5_6} 0.5 0.5 &
+ basis 0.0 0.0 0.625 &
+ basis 0.5 0.5 0.625 &
+ basis ${1_3} 0.0 0.125 &
+ basis ${5_6} 0.5 0.125
+
+region myreg block 0 1 0 1 0 1 +create_box 2 myreg +create_atoms 1 box ++
Restrictions:
The a1,a2,a3,basis keywords can only be used with style custom. diff --git a/doc/doc2/variable.html b/doc/doc2/variable.html index 9d10201bf3..aa4380cca0 100644 --- a/doc/doc2/variable.html +++ b/doc/doc2/variable.html @@ -49,7 +49,7 @@ python arg = function equal or atom args = one formula containing numbers, thermo keywords, math operations, group functions, atom values and vectors, compute/fix/variable references numbers = 0.0, 100, -5.4, 2.8e-4, etc - constants = PI + constants = PI, version thermo keywords = vol, ke, press, etc from thermo_style math operators = (), -x, x+y, x-y, x*y, x/y, x^y, x%y, x == y, x != y, x < y, x <= y, x > y, x >= y, x && y, x || y, !x @@ -422,7 +422,7 @@ references to other variables.
| Number | 0.2, 100, 1.0e20, -15.4, etc |
| Constant | PI |
| Constant | PI, version |
| Thermo keywords | vol, pe, ebond, etc |
| Math operators | (), -x, x+y, x-y, x*y, x/y, x^y, x%y, |
| Math operators | (), -x, x+y, x-y, x*y, x/y, x^y, x%y, x == y, x != y, x < y, x <= y, x > y, x >= y, x && y, x || y, !x |