Merge pull request #23 from akohlmey/doc-corrections-and-updates

Doc corrections and updates
This commit is contained in:
sjplimp 2016-09-08 14:15:56 -06:00 committed by GitHub
commit 5d0da95a0b
367 changed files with 4678 additions and 4791 deletions

View File

@ -141,7 +141,9 @@
<h2>Version info:</h2>
<p>The LAMMPS &#8220;version&#8221; is the date when it was released, such as 1 May
2010. LAMMPS is updated continuously. Whenever we fix a bug or add a
feature, we release it immediately, and post a notice on <a class="reference external" href="http://lammps.sandia.gov/bug.html">this page of the WWW site</a>. Each dated copy of LAMMPS contains all the
feature, we release it immediately, and post a notice on <a class="reference external" href="http://lammps.sandia.gov/bug.html">this page of the WWW site</a>. Every 2-4 months one of the incremental releases
is subjected to more thorough testing and labeled as a <em>stable</em> version.</p>
<p>Each dated copy of LAMMPS contains all the
features and bug-fixes up to and including that version date. The
version date is printed to the screen and logfile every time you run
LAMMPS. It is also in the file src/version.h and in the LAMMPS
@ -166,11 +168,20 @@ run efficiently on parallel computers. It was developed at Sandia
National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely
under the terms of the GNU Public License (GPL).</p>
<p>The primary developers of LAMMPS are <a class="reference external" href="http://www.sandia.gov/~sjplimp">Steve Plimpton</a>, Aidan
Thompson, and Paul Crozier who can be contacted at
sjplimp,athomps,pscrozi at sandia.gov. The <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a> at
<a class="reference external" href="http://lammps.sandia.gov">http://lammps.sandia.gov</a> has more information about the code and its
uses.</p>
<p>The current core group of LAMMPS developers is at Sandia National
Labs and Temple University:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.sandia.gov/~sjplimp">Steve Plimpton</a>, sjplimp at sandia.gov</li>
<li>Aidan Thompson, athomps at sandia.gov</li>
<li>Stan Moore, stamoore at sandia.gov</li>
<li><a class="reference external" href="http://goo.gl/1wk0">Axel Kohlmeyer</a>, akohlmey at gmail.com</li>
</ul>
<p>Past core developers include Paul Crozier, Ray Shan and Mark Stevens,
all at Sandia. The <strong>LAMMPS home page</strong> at
<a class="reference external" href="http://lammps.sandia.gov">http://lammps.sandia.gov</a> has more information
about the code and its uses. Interaction with external LAMMPS developers,
bug reports and feature requests are mainly coordinated through the
<a class="reference external" href="https://github.com/lammps/lammps">LAMMPS project on GitHub.</a></p>
<hr class="docutils" />
<p>The LAMMPS documentation is organized into the following sections. If
you find errors or omissions in this manual or have suggestions for

View File

@ -346,8 +346,8 @@ package and are explained in the individual accelerator doc pages,
listed above:</p>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
<col width="74%" />
<col width="64%" />
<col width="36%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>build the accelerator library</td>
@ -356,40 +356,24 @@ listed above:</p>
<tr class="row-even"><td>install the accelerator package</td>
<td>make yes-opt, make yes-user-intel, etc</td>
</tr>
</tbody>
</table>
<div class="line-block">
<div class="line">install the accelerator package | make yes-opt, make yes-user-intel, etc |</div>
</div>
<blockquote>
<div>only for USER-INTEL, KOKKOS, USER-OMP, OPT packages |</div></blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
<col width="74%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>re-build LAMMPS</td>
<tr class="row-odd"><td>add compile/link flags to Makefile.machine in src/MAKE</td>
<td>only for USER-INTEL, KOKKOS, USER-OMP, OPT packages</td>
</tr>
<tr class="row-even"><td>re-build LAMMPS</td>
<td>make machine</td>
</tr>
</tbody>
</table>
<div class="line-block">
<div class="line">re-build LAMMPS | make machine |</div>
</div>
<blockquote>
<div>mpirun -np 32 lmp_machine -in in.script |</div></blockquote>
<blockquote>
<div>only for KOKKOS package |</div></blockquote>
<blockquote>
<div><a class="reference internal" href="package.html"><span class="doc">package</span></a> command, &lt;br&gt;
only if defaults need to be changed |</div></blockquote>
<blockquote>
<div><a class="reference internal" href="suffix.html"><span class="doc">suffix</span></a> command |</div></blockquote>
<table border="1" class="docutils">
<colgroup>
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>prepare and test a regular LAMMPS simulation</td>
<td>lmp_machine -in in.script; mpirun -np 32 lmp_machine -in in.script</td>
</tr>
<tr class="row-even"><td>enable specific accelerator support via &#8216;-k on&#8217; <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switch</span></a>,</td>
<td>only needed for KOKKOS package</td>
</tr>
<tr class="row-odd"><td>set any needed options for the package via &#8220;-pk&#8221; <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switch</span></a> or <a class="reference internal" href="package.html"><span class="doc">package</span></a> command,</td>
<td>only if defaults need to be changed</td>
</tr>
<tr class="row-even"><td>use accelerated styles in your input via &#8220;-sf&#8221; <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switch</span></a> or <a class="reference internal" href="suffix.html"><span class="doc">suffix</span></a> command</td>
<td>lmp_machine -in in.script -sf gpu</td>
</tr>
</tbody>
</table>
<p>Note that the first 4 steps can be done as a single command, using the
@ -528,7 +512,7 @@ full 16 lanes to each of the PCIe 2.0 16x slots.</li>
<li>The GPU package accelerates only pair force, neighbor list, and PPPM
calculations.</li>
<li>The GPU package requires neighbor lists to be built on the CPU when using
exclusion lists or a triclinic simulation box.</li>
exclusion lists, hybrid pair styles, or a triclinic simulation box.</li>
</ul>
</div>
</div>

View File

@ -247,15 +247,15 @@ inside the parenthesis is treated as an &#8220;immediate&#8221; variable and
evaluated as an <a class="reference internal" href="variable.html"><span class="doc">equal-style variable</span></a>. This is a way
to use numeric formulas in an input script without having to assign
them to variable names. For example, these 3 input script lines:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable X equal (xlo+xhi)/2+sqrt(v_area)
<pre class="literal-block">
variable X equal (xlo+xhi)/2+sqrt(v_area)
region 1 block $X 2 INF INF EDGE EDGE
variable X delete
</pre></div>
</div>
</pre>
<p>can be replaced by</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE
</pre></div>
</div>
<pre class="literal-block">
region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE
</pre>
<p>so that you do not have to define (or discard) a temporary variable X.</p>
<p>Note that neither the curly-bracket or immediate form of variables can
contain nested $ characters for other variables to substitute for.

View File

@ -486,8 +486,7 @@ be computed.</dd>
<dt><em>Bad TIP4P bond type for PPPMDisp/TIP4P</em></dt>
<dd>Specified bond type is not valid.</dd>
<dt><em>Bad fix ID in fix append/atoms command</em></dt>
<dd>The value of the fix_id for keyword spatial must start with the suffix
<a href="#id6"><span class="problematic" id="id7">f_</span></a>.</dd>
<dd>The value of the fix_id for keyword spatial must start with &#8216;f_&#8217;.</dd>
<dt><em>Bad grid of processors</em></dt>
<dd>The 3d grid of processors defined by the processors command does not
match the number of processors LAMMPS is being run on.</dd>
@ -6359,13 +6358,13 @@ have an infinite periodic crystal with bonds then it is impossible to
have fully consistent image flags, since some bonds will cross
periodic boundaries and connect two atoms with the same image
flag.</dd>
<dt><em>KIM Model does not provide `energy&#8217;; Potential energy will be zero</em></dt>
<dt><em>KIM Model does not provide &#8216;energy&#8217;; Potential energy will be zero</em></dt>
<dd>Self-explanatory.</dd>
<dt><em>KIM Model does not provide `forces&#8217;; Forces will be zero</em></dt>
<dt><em>KIM Model does not provide &#8216;forces&#8217;; Forces will be zero</em></dt>
<dd>Self-explanatory.</dd>
<dt><em>KIM Model does not provide `particleEnergy&#8217;; energy per atom will be zero</em></dt>
<dt><em>KIM Model does not provide &#8216;particleEnergy&#8217;; energy per atom will be zero</em></dt>
<dd>Self-explanatory.</dd>
<dt><em>KIM Model does not provide `particleVirial&#8217;; virial per atom will be zero</em></dt>
<dt><em>KIM Model does not provide &#8216;particleVirial&#8217;; virial per atom will be zero</em></dt>
<dd>Self-explanatory.</dd>
<dt><em>Kspace_modify slab param &lt; 2.0 may cause unphysical behavior</em></dt>
<dd>The kspace_modify slab parameter should be larger to insure periodic

View File

@ -303,11 +303,11 @@ longer times, e.g. to measure a particular quantity.</p>
</tbody>
</table>
<p>Here is how you can run and visualize one of the sample problems:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">indent</span>
<span class="n">cp</span> <span class="o">../../</span><span class="n">src</span><span class="o">/</span><span class="n">lmp_linux</span> <span class="o">.</span> <span class="c1"># copy LAMMPS executable to this dir</span>
<span class="n">lmp_linux</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">indent</span> <span class="c1"># run the problem</span>
</pre></div>
</div>
<pre class="literal-block">
cd indent
cp ../../src/lmp_linux . # copy LAMMPS executable to this dir
lmp_linux -in in.indent # run the problem
</pre>
<p>Running the simulation produces the files <em>dump.indent</em> and
<em>log.lammps</em>. You can visualize the dump file of snapshots with a
variety of 3rd-party tools highlighted on the
@ -321,17 +321,17 @@ ImageMagick or QuickTime or various Windows-based tools. See the
<a class="reference internal" href="dump_image.html"><span class="doc">dump image</span></a> doc page for more details. E.g. this
Imagemagick command would create a GIF file suitable for viewing in a
browser.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">convert</span> <span class="o">-</span><span class="n">loop</span> <span class="mi">1</span> <span class="o">*.</span><span class="n">jpg</span> <span class="n">foo</span><span class="o">.</span><span class="n">gif</span>
</pre></div>
</div>
<pre class="literal-block">
% convert -loop 1 *.jpg foo.gif
</pre>
</div>
<hr class="docutils" />
<div class="section" id="uppercase-directories">
<h2>7.2. Uppercase directories</h2>
<table border="1" class="docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
<col width="11%" />
<col width="89%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>ASPHERE</td>

View File

@ -252,13 +252,13 @@ scripts are based on. If that script had the line</p>
and tmp.restart.100) as it ran.</p>
<p>This script could be used to read the 1st restart file and re-run the
last 50 timesteps:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">read_restart</span> <span class="n">tmp</span><span class="o">.</span><span class="n">restart</span><span class="o">.</span><span class="mi">50</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">neighbor</span> <span class="mf">0.4</span> <span class="nb">bin</span>
<span class="n">neigh_modify</span> <span class="n">every</span> <span class="mi">1</span> <span class="n">delay</span> <span class="mi">1</span>
</pre></div>
</div>
<pre class="literal-block">
read_restart tmp.restart.50
</pre>
<pre class="literal-block">
neighbor 0.4 bin
neigh_modify every 1 delay 1
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">nve</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">langevin</span> <span class="mf">1.0</span> <span class="mf">1.0</span> <span class="mf">10.0</span> <span class="mi">904297</span>
</pre></div>
@ -281,25 +281,25 @@ notice that the thermodynamic data match at step 50 (if you also put a
uses random numbers in a way that does not allow for perfect restarts.</p>
<p>As an alternate approach, the restart file could be converted to a data
file as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="n">r</span> <span class="n">tmp</span><span class="o">.</span><span class="n">restart</span><span class="o">.</span><span class="mi">50</span> <span class="n">tmp</span><span class="o">.</span><span class="n">restart</span><span class="o">.</span><span class="n">data</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_g++ -r tmp.restart.50 tmp.restart.data
</pre>
<p>Then, this script could be used to re-run the last 50 steps:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">units</span> <span class="n">lj</span>
<span class="n">atom_style</span> <span class="n">bond</span>
<span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="mf">1.12</span>
<span class="n">pair_modify</span> <span class="n">shift</span> <span class="n">yes</span>
<span class="n">bond_style</span> <span class="n">fene</span>
<span class="n">special_bonds</span> <span class="mf">0.0</span> <span class="mf">1.0</span> <span class="mf">1.0</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">read_data</span> <span class="n">tmp</span><span class="o">.</span><span class="n">restart</span><span class="o">.</span><span class="n">data</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">neighbor</span> <span class="mf">0.4</span> <span class="nb">bin</span>
<span class="n">neigh_modify</span> <span class="n">every</span> <span class="mi">1</span> <span class="n">delay</span> <span class="mi">1</span>
</pre></div>
</div>
<pre class="literal-block">
units lj
atom_style bond
pair_style lj/cut 1.12
pair_modify shift yes
bond_style fene
special_bonds 0.0 1.0 1.0
</pre>
<pre class="literal-block">
read_data tmp.restart.data
</pre>
<pre class="literal-block">
neighbor 0.4 bin
neigh_modify every 1 delay 1
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">nve</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">langevin</span> <span class="mf">1.0</span> <span class="mf">1.0</span> <span class="mf">10.0</span> <span class="mi">904297</span>
</pre></div>
@ -307,10 +307,10 @@ file as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">timestep</span> <span class="mf">0.012</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">reset_timestep</span> <span class="mi">50</span>
<span class="n">run</span> <span class="mi">50</span>
</pre></div>
</div>
<pre class="literal-block">
reset_timestep 50
run 50
</pre>
<p>Note that nearly all the settings specified in the original <em>in.chain</em>
script must be repeated, except the <em>pair_coeff</em> and <em>bond_coeff</em>
commands since the new data file lists the force field coefficients.
@ -420,39 +420,40 @@ individual commands for more details on how these examples work.</p>
<p>If &#8220;multiple simulations&#8221; means continue a previous simulation for
more timesteps, then you simply use the <a class="reference internal" href="run.html"><span class="doc">run</span></a> command
multiple times. For example, this script</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">units</span> <span class="n">lj</span>
<span class="n">atom_style</span> <span class="n">atomic</span>
<span class="n">read_data</span> <span class="n">data</span><span class="o">.</span><span class="n">lj</span>
<span class="n">run</span> <span class="mi">10000</span>
<span class="n">run</span> <span class="mi">10000</span>
<span class="n">run</span> <span class="mi">10000</span>
<span class="n">run</span> <span class="mi">10000</span>
<span class="n">run</span> <span class="mi">10000</span>
</pre></div>
</div>
<pre class="literal-block">
units lj
atom_style atomic
read_data data.lj
run 10000
run 10000
run 10000
run 10000
run 10000
</pre>
<p>would run 5 successive simulations of the same system for a total of
50,000 timesteps.</p>
<p>If you wish to run totally different simulations, one after the other,
the <a class="reference internal" href="clear.html"><span class="doc">clear</span></a> command can be used in between them to
re-initialize LAMMPS. For example, this script</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">units</span> <span class="n">lj</span>
<span class="n">atom_style</span> <span class="n">atomic</span>
<span class="n">read_data</span> <span class="n">data</span><span class="o">.</span><span class="n">lj</span>
<span class="n">run</span> <span class="mi">10000</span>
<span class="n">clear</span>
<span class="n">units</span> <span class="n">lj</span>
<span class="n">atom_style</span> <span class="n">atomic</span>
<span class="n">read_data</span> <span class="n">data</span><span class="o">.</span><span class="n">lj</span><span class="o">.</span><span class="n">new</span>
<span class="n">run</span> <span class="mi">10000</span>
</pre></div>
</div>
<pre class="literal-block">
units lj
atom_style atomic
read_data data.lj
run 10000
clear
units lj
atom_style atomic
read_data data.lj.new
run 10000
</pre>
<p>would run 2 independent simulations, one after the other.</p>
<p>For large numbers of independent simulations, you can use
<a class="reference internal" href="variable.html"><span class="doc">variables</span></a> and the <a class="reference internal" href="next.html"><span class="doc">next</span></a> and
<a class="reference internal" href="jump.html"><span class="doc">jump</span></a> commands to loop over the same input script
multiple times with different settings. For example, this
script, named in.polymer</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable d index run1 run2 run3 run4 run5 run6 run7 run8
<pre class="literal-block">
variable d index run1 run2 run3 run4 run5 run6 run7 run8
shell cd $d
read_data data.polymer
run 10000
@ -460,8 +461,7 @@ shell cd ..
clear
next d
jump in.polymer
</pre></div>
</div>
</pre>
<p>would run 8 simulations in different directories, using a data.polymer
file in each directory. The same concept could be used to run the
same system at 8 different temperatures, using a temperature variable
@ -528,10 +528,10 @@ replica. The processors assigned to each replica are determined at
run-time by using the <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">-partition command-line switch</span></a> to launch LAMMPS on multiple
partitions, which in this context are the same as replicas. E.g.
these commands:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">16</span> <span class="n">lmp_linux</span> <span class="o">-</span><span class="n">partition</span> <span class="mi">8</span><span class="n">x2</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">temper</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">8</span> <span class="n">lmp_linux</span> <span class="o">-</span><span class="n">partition</span> <span class="mi">8</span><span class="n">x1</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">neb</span>
</pre></div>
</div>
<pre class="literal-block">
mpirun -np 16 lmp_linux -partition 8x2 -in in.temper
mpirun -np 8 lmp_linux -partition 8x1 -in in.neb
</pre>
<p>would each run 8 replicas, on either 16 or 8 processors. Note the use
of the <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">-in command-line switch</span></a> to specify
the input script which is required when running in multi-replica mode.</p>
@ -933,7 +933,7 @@ vectors of a general parallelepiped, where there is no restriction on
<strong>A</strong> x <strong>B</strong> . <strong>C</strong> &gt; 0. The equivalent LAMMPS <strong>a</strong>,<strong>b</strong>,<strong>c</strong> are a linear
rotation of <strong>A</strong>, <strong>B</strong>, and <strong>C</strong> and can be computed as follows:</p>
<img alt="_images/transform.jpg" class="align-center" src="_images/transform.jpg" />
<p>where A = <a href="#id3"><span class="problematic" id="id4">|</span></a><strong>A</strong>| indicates the scalar length of <strong>A</strong>. The ^ hat symbol
<p>where A = | <strong>A</strong> | indicates the scalar length of <strong>A</strong>. The hat symbol (^)
indicates the corresponding unit vector. <em>beta</em> and <em>gamma</em> are angles
between the vectors described below. Note that by construction,
<strong>a</strong>, <strong>b</strong>, and <strong>c</strong> have strictly positive x, y, and z components, respectively.
@ -1037,23 +1037,23 @@ BOUNDS for a snapshot is written to a dump file for a triclinic box,
an orthogonal bounding box which encloses the triclinic simulation box
is output, along with the 3 tilt factors (xy, xz, yz) of the triclinic
box, formatted as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ITEM</span><span class="p">:</span> <span class="n">BOX</span> <span class="n">BOUNDS</span> <span class="n">xy</span> <span class="n">xz</span> <span class="n">yz</span>
<span class="n">xlo_bound</span> <span class="n">xhi_bound</span> <span class="n">xy</span>
<span class="n">ylo_bound</span> <span class="n">yhi_bound</span> <span class="n">xz</span>
<span class="n">zlo_bound</span> <span class="n">zhi_bound</span> <span class="n">yz</span>
</pre></div>
</div>
<pre class="literal-block">
ITEM: BOX BOUNDS xy xz yz
xlo_bound xhi_bound xy
ylo_bound yhi_bound xz
zlo_bound zhi_bound yz
</pre>
<p>This bounding box is convenient for many visualization programs and is
calculated from the 9 triclinic box parameters
(xlo,xhi,ylo,yhi,zlo,zhi,xy,xz,yz) as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">xlo_bound</span> <span class="o">=</span> <span class="n">xlo</span> <span class="o">+</span> <span class="n">MIN</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="n">xy</span><span class="p">,</span><span class="n">xz</span><span class="p">,</span><span class="n">xy</span><span class="o">+</span><span class="n">xz</span><span class="p">)</span>
<span class="n">xhi_bound</span> <span class="o">=</span> <span class="n">xhi</span> <span class="o">+</span> <span class="n">MAX</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="n">xy</span><span class="p">,</span><span class="n">xz</span><span class="p">,</span><span class="n">xy</span><span class="o">+</span><span class="n">xz</span><span class="p">)</span>
<span class="n">ylo_bound</span> <span class="o">=</span> <span class="n">ylo</span> <span class="o">+</span> <span class="n">MIN</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="n">yz</span><span class="p">)</span>
<span class="n">yhi_bound</span> <span class="o">=</span> <span class="n">yhi</span> <span class="o">+</span> <span class="n">MAX</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span><span class="n">yz</span><span class="p">)</span>
<span class="n">zlo_bound</span> <span class="o">=</span> <span class="n">zlo</span>
<span class="n">zhi_bound</span> <span class="o">=</span> <span class="n">zhi</span>
</pre></div>
</div>
<pre class="literal-block">
xlo_bound = xlo + MIN(0.0,xy,xz,xy+xz)
xhi_bound = xhi + MAX(0.0,xy,xz,xy+xz)
ylo_bound = ylo + MIN(0.0,yz)
yhi_bound = yhi + MAX(0.0,yz)
zlo_bound = zlo
zhi_bound = zhi
</pre>
<p>These formulas can be inverted if you need to convert the bounding box
back into the triclinic box parameters, e.g. xlo = xlo_bound -
MIN(0.0,xy,xz,xy+xz).</p>
@ -1136,9 +1136,9 @@ of individual particles, after then are created.</p>
<p>The dipole style does not actually define finite-size particles, but
is often used in conjunction with spherical particles, via a command
like</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_style</span> <span class="n">hybrid</span> <span class="n">sphere</span> <span class="n">dipole</span>
</pre></div>
</div>
<pre class="literal-block">
atom_style hybrid sphere dipole
</pre>
<p>This is because when dipoles interact with each other, they induce
torques, and a particle must be finite-size (i.e. have a moment of
inertia) in order to respond and rotate. See the <a class="reference internal" href="atom_style.html"><span class="doc">atom_style dipole</span></a> command for details. The &#8220;set&#8221; command can be
@ -1372,11 +1372,11 @@ per-atom vector.</p>
<p>When a quantity is accessed, as in many of the output commands
discussed below, it can be referenced via the following bracket
notation, where ID in this case is the ID of a compute. The leading
&#8220;<a href="#id74"><span class="problematic" id="id75">c_</span></a>&#8221; would be replaced by &#8220;<a href="#id76"><span class="problematic" id="id77">f_</span></a>&#8221; for a fix, or &#8220;<a href="#id78"><span class="problematic" id="id79">v_</span></a>&#8221; for a variable:</p>
&#8220;c_&#8221; would be replaced by &#8220;f_&#8221; for a fix, or &#8220;v_&#8221; for a variable:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>c_ID</td>
@ -1911,13 +1911,13 @@ internal LAMMPS operations. Note that LAMMPS classes are defined
within a LAMMPS namespace (LAMMPS_NS) if you use them from another C++
application.</p>
<p>Library.cpp contains these 5 basic functions:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="n">lammps_open</span><span class="p">(</span><span class="nb">int</span><span class="p">,</span> <span class="n">char</span> <span class="o">**</span><span class="p">,</span> <span class="n">MPI_Comm</span><span class="p">,</span> <span class="n">void</span> <span class="o">**</span><span class="p">)</span>
<span class="n">void</span> <span class="n">lammps_close</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">)</span>
<span class="nb">int</span> <span class="n">lammps_version</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">)</span>
<span class="n">void</span> <span class="n">lammps_file</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
<span class="n">char</span> <span class="o">*</span><span class="n">lammps_command</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
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 *)
</pre>
<p>The lammps_open() function is used to initialize LAMMPS, passing in a
list of strings as if they were <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line arguments</span></a> when LAMMPS is run in
stand-alone mode from the command line, and a MPI communicator for
@ -1951,17 +1951,17 @@ interleaving the lammps_command() calls with other calls to extract
information from LAMMPS, perform its own operations, or call another
code&#8217;s library.</p>
<p>Other useful functions are also included in library.cpp. For example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">void</span> <span class="o">*</span><span class="n">lammps_extract_global</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
<span class="n">void</span> <span class="o">*</span><span class="n">lammps_extract_atom</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
<span class="n">void</span> <span class="o">*</span><span class="n">lammps_extract_compute</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
<span class="n">void</span> <span class="o">*</span><span class="n">lammps_extract_fix</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
<span class="n">void</span> <span class="o">*</span><span class="n">lammps_extract_variable</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
<span class="nb">int</span> <span class="n">lammps_set_variable</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">,</span> <span class="n">char</span> <span class="o">*</span><span class="p">)</span>
<span class="nb">int</span> <span class="n">lammps_get_natoms</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">)</span>
<span class="n">void</span> <span class="n">lammps_get_coords</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">double</span> <span class="o">*</span><span class="p">)</span>
<span class="n">void</span> <span class="n">lammps_put_coords</span><span class="p">(</span><span class="n">void</span> <span class="o">*</span><span class="p">,</span> <span class="n">double</span> <span class="o">*</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
void *lammps_extract_global(void *, char *)
void *lammps_extract_atom(void *, char *)
void *lammps_extract_compute(void *, char *, int, int)
void *lammps_extract_fix(void *, char *, int, int, int, int)
void *lammps_extract_variable(void *, char *, char *)
int lammps_set_variable(void *, char *, char *)
int lammps_get_natoms(void *)
void lammps_get_coords(void *, double *)
void lammps_put_coords(void *, double *)
</pre>
<p>These can extract various global or per-atom quantities from LAMMPS as
well as values calculated by a compute, fix, or variable. The
&#8220;set_variable&#8221; function can set an existing string-style variable to a
@ -2087,29 +2087,30 @@ liquid Ar via the GK formalism:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Sample LAMMPS input script for viscosity of liquid Ar</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>units real
<pre class="literal-block">
units real
variable T equal 86.4956
variable V equal vol
variable dt equal 4.0
variable p equal 400 # correlation length
variable s equal 5 # sample interval
variable d equal $p*$s # dump interval
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># convert from LAMMPS real units to SI</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable kB equal 1.3806504e-23 # [J/K/** Boltzmann
<pre class="literal-block">
variable kB equal 1.3806504e-23 # [J/K/** Boltzmann
variable atm2Pa equal 101325.0
variable A2m equal 1.0e-10
variable fs2s equal 1.0e-15
variable convert equal ${atm2Pa}*${atm2Pa}*${fs2s}*${A2m}*${A2m}*${A2m}
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># setup problem</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>dimension 3
<pre class="literal-block">
dimension 3
boundary p p p
lattice fcc 5.376 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box block 0 4 0 4 0 4
@ -2120,8 +2121,7 @@ pair_style lj/cut 13.0
pair_coeff * * 0.2381 3.405
timestep ${dt}
thermo $d
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># equilibration and thermalization</span>
</pre></div>
</div>
@ -2137,7 +2137,8 @@ run 8000
<span class="c1">#fix NVE all nve</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>reset_timestep 0
<pre class="literal-block">
reset_timestep 0
variable pxy equal pxy
variable pxz equal pxz
variable pyz equal pyz
@ -2151,9 +2152,8 @@ thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33
run 100000
variable v equal (v_v11+v_v22+v_v33)/3.0
variable ndens equal count(all)/vol
print &quot;average viscosity: $v [Pa.s/** @ $T K, ${ndens} /A^3&quot;
</pre></div>
</div>
print &quot;average viscosity: $v [Pa.s/** &#64; $T K, ${ndens} /A^3&quot;
</pre>
<p>The fifth method is related to the above Green-Kubo method,
but uses the Einstein formulation, analogous to the Einstein
mean-square-displacement formulation for self-diffusivity. The
@ -2274,7 +2274,7 @@ fix produces a global array as output with one row of values per
chunk.</p>
</div>
<div class="section" id="compute-chunk-commands">
<h3>6.23.3. Compute <a href="#id71"><span class="problematic" id="id72">*</span></a>/chunk commands:</h3>
<h3>6.23.3. Compute */chunk commands:</h3>
<p>Currently the following computes operate on chunks of atoms to produce
per-chunk values.</p>
<ul class="simple">
@ -2331,31 +2331,31 @@ velocity:</p>
<ol class="arabic simple" start="3">
<li>Center of mass of each molecule:</li>
</ol>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">compute</span> <span class="n">myChunk</span> <span class="nb">all</span> <span class="n">com</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myChunk</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
compute myChunk all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
</pre>
<ol class="arabic simple" start="4">
<li>Total force on each molecule and ave/max across all molecules:</li>
</ol>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">1000</span> <span class="mi">1</span> <span class="mi">1000</span> <span class="n">cc1</span> <span class="n">fx</span> <span class="n">fy</span> <span class="n">fz</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span>
<span class="n">variable</span> <span class="n">xave</span> <span class="n">equal</span> <span class="n">ave</span><span class="p">(</span><span class="n">f_1</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="n">variable</span> <span class="n">xmax</span> <span class="n">equal</span> <span class="nb">max</span><span class="p">(</span><span class="n">f_1</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="n">thermo</span> <span class="mi">1000</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">v_xave</span> <span class="n">v_xmax</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
fix 1 all ave/chunk 1000 1 1000 cc1 fx fy fz file tmp.out
variable xave equal ave(f_1[2])
variable xmax equal max(f_1[2])
thermo 1000
thermo_style custom step temp v_xave v_xmax
</pre>
<ol class="arabic simple" start="5">
<li>Histogram of cluster sizes:</li>
</ol>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cluster</span> <span class="nb">all</span> <span class="n">cluster</span><span class="o">/</span><span class="n">atom</span> <span class="mf">1.0</span>
<span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">c_cluster</span> <span class="n">compress</span> <span class="n">yes</span>
<span class="n">compute</span> <span class="n">size</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span> <span class="n">count</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">0</span> <span class="mi">20</span> <span class="mi">20</span> <span class="n">c_size</span> <span class="n">mode</span> <span class="n">vector</span> <span class="n">ave</span> <span class="n">running</span> <span class="n">beyond</span> <span class="n">ignore</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">histo</span>
</pre></div>
</div>
<pre class="literal-block">
compute cluster all cluster/atom 1.0
compute cc1 all chunk/atom c_cluster compress yes
compute size all property/chunk cc1 count
fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo
</pre>
<hr class="docutils" />
</div>
</div>
@ -2607,18 +2607,18 @@ by the <a class="reference internal" href="kspace_style.html"><span class="doc">
Ewald solvers can be used.</p>
<p>For the NaCL example problem, these pair style and bond style settings
are used:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">born</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span><span class="o">/</span><span class="n">cs</span> <span class="mf">20.0</span> <span class="mf">20.0</span>
<span class="n">pair_coeff</span> <span class="o">*</span> <span class="o">*</span> <span class="mf">0.0</span> <span class="mf">1.000</span> <span class="mf">0.00</span> <span class="mf">0.00</span> <span class="mf">0.00</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">3</span> <span class="mf">487.0</span> <span class="mf">0.23768</span> <span class="mf">0.00</span> <span class="mf">1.05</span> <span class="mf">0.50</span> <span class="c1">#Na-Na</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mf">145134.0</span> <span class="mf">0.23768</span> <span class="mf">0.00</span> <span class="mf">6.99</span> <span class="mf">8.70</span> <span class="c1">#Na-Cl</span>
<span class="n">pair_coeff</span> <span class="mi">4</span> <span class="mi">4</span> <span class="mf">405774.0</span> <span class="mf">0.23768</span> <span class="mf">0.00</span> <span class="mf">72.40</span> <span class="mf">145.40</span> <span class="c1">#Cl-Cl</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span>
<span class="n">bond_coeff</span> <span class="mi">1</span> <span class="mf">63.014</span> <span class="mf">0.0</span>
<span class="n">bond_coeff</span> <span class="mi">2</span> <span class="mf">25.724</span> <span class="mf">0.0</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style born/coul/long/cs 20.0 20.0
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
</pre>
<pre class="literal-block">
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
</pre>
<p>When running dynamics with the adiabatic core/shell model, the
following issues should be considered. Since the relative motion of
the core and shell particles corresponds to the polarization, typical
@ -2645,15 +2645,15 @@ used to assign the compute to the thermostat fix. Likewise the
<a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify temp</span></a> command can be used to make
this temperature be output for the overall system.</p>
<p>For the NaCl example, this can be done as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">group</span> <span class="n">cores</span> <span class="nb">type</span> <span class="mi">1</span> <span class="mi">2</span>
<span class="n">group</span> <span class="n">shells</span> <span class="nb">type</span> <span class="mi">3</span> <span class="mi">4</span>
<span class="n">compute</span> <span class="n">CSequ</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">cs</span> <span class="n">cores</span> <span class="n">shells</span>
<span class="n">fix</span> <span class="n">thermoberendsen</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">berendsen</span> <span class="mi">1427</span> <span class="mi">1427</span> <span class="mf">0.4</span> <span class="c1"># thermostat for the true physical system</span>
<span class="n">fix</span> <span class="n">thermostatequ</span> <span class="nb">all</span> <span class="n">nve</span> <span class="c1"># integrator as needed for the berendsen thermostat</span>
<span class="n">fix_modify</span> <span class="n">thermoberendsen</span> <span class="n">temp</span> <span class="n">CSequ</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">CSequ</span> <span class="c1"># output of center-of-mass derived temperature</span>
</pre></div>
</div>
<pre class="literal-block">
group cores type 1 2
group shells type 3 4
compute CSequ all temp/cs cores shells
fix thermoberendsen all temp/berendsen 1427 1427 0.4 # thermostat for the true physical system
fix thermostatequ all nve # integrator as needed for the berendsen thermostat
fix_modify thermoberendsen temp CSequ
thermo_modify temp CSequ # output of center-of-mass derived temperature
</pre>
<p>If <a class="reference internal" href="compute_temp_cs.html"><span class="doc">compute temp/cs</span></a> is used, the decoupled
relative motion of the core and the shell should in theory be
stable. However numerical fluctuation can introduce a small
@ -2702,14 +2702,14 @@ accessed by the <a class="reference internal" href="compute_property_atom.html">
command, to use as input to the <a class="reference internal" href="compute_chunk_atom.html"><span class="doc">compute chunk/atom</span></a> command to define the core/shell
pairs as chunks.</p>
<p>For example,</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">csinfo</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">atom</span> <span class="n">i_CSID</span> <span class="c1"># property/atom command</span>
<span class="n">read_data</span> <span class="n">NaCl_CS_x0</span><span class="o">.</span><span class="mi">1</span><span class="n">_prop</span><span class="o">.</span><span class="n">data</span> <span class="n">fix</span> <span class="n">csinfo</span> <span class="n">NULL</span> <span class="n">CS</span><span class="o">-</span><span class="n">Info</span> <span class="c1"># atom property added in the data-file</span>
<span class="n">compute</span> <span class="n">prop</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">atom</span> <span class="n">i_CSID</span>
<span class="n">compute</span> <span class="n">cs_chunk</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">c_prop</span>
<span class="n">compute</span> <span class="n">cstherm</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cs_chunk</span> <span class="n">temp</span> <span class="n">internal</span> <span class="n">com</span> <span class="n">yes</span> <span class="n">cdof</span> <span class="mf">3.0</span> <span class="c1"># note the chosen degrees of freedom for the core/shell pairs</span>
<span class="n">fix</span> <span class="n">ave_chunk</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">10</span> <span class="mi">1</span> <span class="mi">10</span> <span class="n">c_cstherm</span> <span class="n">file</span> <span class="n">chunk</span><span class="o">.</span><span class="n">dump</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
fix csinfo all property/atom i_CSID # property/atom command
read_data NaCl_CS_x0.1_prop.data fix csinfo NULL CS-Info # atom property added in the data-file
compute prop all property/atom i_CSID
compute cs_chunk all chunk/atom c_prop
compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0 # note the chosen degrees of freedom for the core/shell pairs
fix ave_chunk all ave/time 10 1 10 c_cstherm file chunk.dump mode vector
</pre>
<p>The additional section in the date file would be formatted like this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">CS</span><span class="o">-</span><span class="n">Info</span> <span class="c1"># header of additional section</span>
</pre></div>

View File

@ -193,8 +193,8 @@ C-style data structures (vectors and arrays).</p>
<p>Most of the new features described in this section require you to
write a new C++ derived class (except for exceptions described below,
where you can make small edits to existing files). Creating a new
class requires 2 files, a source code file (<em>.cpp) and a header file
(</em>.h). The derived class must provide certain methods to work as a
class requires 2 files, a source code file (*.cpp) and a header file
(*.h). The derived class must provide certain methods to work as a
new option. Depending on how different your new feature is compared
to existing features, you can either derive from the base class
itself, or from a derived class that already exists. Enabling LAMMPS
@ -209,19 +209,19 @@ and pair_foo.h that define a new class PairFoo that computes pairwise
potentials described in the classic 1997 <a class="reference internal" href="#foo"><span class="std std-ref">paper</span></a> by Foo, et al.
If you wish to invoke those potentials in a LAMMPS input script with a
command like</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">foo</span> <span class="mf">0.1</span> <span class="mf">3.5</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style foo 0.1 3.5
</pre>
<p>then your pair_foo.h file should be structured as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1">#ifdef PAIR_CLASS</span>
<span class="n">PairStyle</span><span class="p">(</span><span class="n">foo</span><span class="p">,</span><span class="n">PairFoo</span><span class="p">)</span>
<span class="c1">#else</span>
<span class="o">...</span>
<span class="p">(</span><span class="k">class</span> <span class="nc">definition</span> <span class="k">for</span> <span class="n">PairFoo</span><span class="p">)</span>
<span class="o">...</span>
<span class="c1">#endif</span>
</pre></div>
</div>
<pre class="literal-block">
#ifdef PAIR_CLASS
PairStyle(foo,PairFoo)
#else
...
(class definition for PairFoo)
...
#endif
</pre>
<p>where &#8220;foo&#8221; is the style keyword in the pair_style command, and
PairFoo is the class name defined in your pair_foo.cpp and pair_foo.h
files.</p>
@ -275,8 +275,8 @@ atoms.</p>
class. See atom_vec.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
<col width="24%" />
<col width="76%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>init</td>
@ -393,18 +393,18 @@ output the custom values.</p>
The code for these classes can use the per-atom properties defined by
fix property/atom. The Atom class has a find_custom() method that is
useful in this context:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">int</span> <span class="n">index</span> <span class="o">=</span> <span class="n">atom</span><span class="o">-&gt;</span><span class="n">find_custom</span><span class="p">(</span><span class="n">char</span> <span class="o">*</span><span class="n">name</span><span class="p">,</span> <span class="nb">int</span> <span class="o">&amp;</span><span class="n">flag</span><span class="p">);</span>
</pre></div>
</div>
<pre class="literal-block">
int index = atom-&gt;find_custom(char *name, int &amp;flag);
</pre>
<p>The &#8220;name&#8221; of a custom attribute, as specified in the <a class="reference internal" href="fix_property_atom.html"><span class="doc">fix property/atom</span></a> command, is checked to verify
that it exists and its index is returned. The method also sets flag =
0/1 depending on whether it is an integer or floating-point attribute.
The vector of values associated with the attribute can then be
accessed using the returned index as</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">int</span> <span class="o">*</span><span class="n">ivector</span> <span class="o">=</span> <span class="n">atom</span><span class="o">-&gt;</span><span class="n">ivector</span><span class="p">[</span><span class="n">index</span><span class="p">];</span>
<span class="n">double</span> <span class="o">*</span><span class="n">dvector</span> <span class="o">=</span> <span class="n">atom</span><span class="o">-&gt;</span><span class="n">dvector</span><span class="p">[</span><span class="n">index</span><span class="p">];</span>
</pre></div>
</div>
<pre class="literal-block">
int *ivector = atom-&gt;ivector[index];
double *dvector = atom-&gt;dvector[index];
</pre>
<p>Ivector or dvector are vectors of length Nlocal = # of owned atoms,
which store the attributes of individual atoms.</p>
<hr class="docutils" />
@ -474,8 +474,8 @@ per-atom kinetic energy.</p>
class. See compute.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
<col width="26%" />
<col width="74%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>init</td>
@ -551,8 +551,8 @@ DumpCustom class contained in the dump_custom.cpp file.</p>
class. See dump.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>write_header</td>
@ -597,8 +597,8 @@ implement.</p>
derived class. See fix.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>setmask</td>
@ -823,8 +823,8 @@ styles can be created to add new K-space options to LAMMPS.</p>
class. See kspace.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
<col width="25%" />
<col width="75%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>init</td>
@ -853,8 +853,8 @@ LAMMPS.</p>
class. See min.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
<col width="26%" />
<col width="74%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>init</td>
@ -882,8 +882,8 @@ includes some optional methods to enable its use with rRESPA.</p>
<p>Here is a brief description of the class methods in pair.h:</p>
<table border="1" class="docutils">
<colgroup>
<col width="32%" />
<col width="68%" />
<col width="33%" />
<col width="67%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>compute</td>
@ -929,8 +929,8 @@ styles can be created to add new region shapes to LAMMPS.</p>
class. See region.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>inside</td>
@ -965,8 +965,8 @@ a rigid body containing N sub-particles.</p>
class. See body.h for details.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
<col width="27%" />
<col width="73%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>data_body</td>
@ -1030,17 +1030,17 @@ via the <a class="reference internal" href="print.html"><span class="doc">print<
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> commands. Variables of style
&#8220;equal&#8221; can compute complex equations that involve the following types
of arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">thermo</span> <span class="n">keywords</span> <span class="o">=</span> <span class="n">ke</span><span class="p">,</span> <span class="n">vol</span><span class="p">,</span> <span class="n">atoms</span><span class="p">,</span> <span class="o">...</span>
<span class="n">other</span> <span class="n">variables</span> <span class="o">=</span> <span class="n">v_a</span><span class="p">,</span> <span class="n">v_myvar</span><span class="p">,</span> <span class="o">...</span>
<span class="n">math</span> <span class="n">functions</span> <span class="o">=</span> <span class="n">div</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">mult</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">add</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="o">...</span>
<span class="n">group</span> <span class="n">functions</span> <span class="o">=</span> <span class="n">mass</span><span class="p">(</span><span class="n">group</span><span class="p">),</span> <span class="n">xcm</span><span class="p">(</span><span class="n">group</span><span class="p">,</span><span class="n">x</span><span class="p">),</span> <span class="o">...</span>
<span class="n">atom</span> <span class="n">values</span> <span class="o">=</span> <span class="n">x</span><span class="p">[</span><span class="mi">123</span><span class="p">],</span> <span class="n">y</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">vx</span><span class="p">[</span><span class="mi">34</span><span class="p">],</span> <span class="o">...</span>
<span class="n">compute</span> <span class="n">values</span> <span class="o">=</span> <span class="n">c_mytemp</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
thermo keywords = ke, vol, atoms, ...
other variables = v_a, v_myvar, ...
math functions = div(x,y), mult(x,y), add(x,y), ...
group functions = mass(group), xcm(group,x), ...
atom values = x[123], y[3], vx[34], ...
compute values = c_mytemp[0], c_thermo_press[3], ...
</pre>
<p>Adding keywords for the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command
(which can then be accessed by variables) was discussed
<a class="reference internal" href="Section_howto.html#thermo"><span class="std std-ref">here</span></a> on this page.</p>
<a class="reference internal" href="#mod-13"><span class="std std-ref">here</span></a> on this page.</p>
<p>Adding a new math function of one or two arguments can be done by
editing one section of the Variable::evaulate() method. Search for
the word &#8220;customize&#8221; to find the appropriate location.</p>
@ -1053,7 +1053,7 @@ of the Variable::evaulate() method. Search for the word &#8220;customize&#8221;
to find the appropriate location.</p>
<p>Adding new <a class="reference internal" href="compute.html"><span class="doc">compute styles</span></a> (whose calculated values can
then be accessed by variables) was discussed
<a class="reference internal" href="Section_howto.html#compute"><span class="std std-ref">here</span></a> on this page.</p>
<a class="reference internal" href="#mod-3"><span class="std std-ref">here</span></a> on this page.</p>
</div>
<div class="section" id="submitting-new-features-for-inclusion-in-lammps">
<span id="mod-15"></span><h2>10.15. Submitting new features for inclusion in LAMMPS</h2>
@ -1157,7 +1157,7 @@ structures, performs its operations, and is formatted similar to other
LAMMPS source files, including the use of the error class for error
and warning messages.</li>
<li>If you want your contribution to be added as a user-contributed
feature, and it&#8217;s a single file (actually a <a href="#id8"><span class="problematic" id="id9">*</span></a>.cpp and <a href="#id10"><span class="problematic" id="id11">*</span></a>.h file) it can
feature, and it&#8217;s a single file (actually a *.cpp and *.h file) it can
rapidly be added to the USER-MISC directory. Send us the one-line
entry to add to the USER-MISC/README file in that dir, along with the
2 source files. You can do this multiple times if you wish to
@ -1192,12 +1192,12 @@ to HTML and PDF. The tools for this conversion are included in the
source distribution, and the translation can be as simple as doing
&#8220;make html pdf&#8221; in the doc folder.
Thus the documentation source files must be in the same format and
style as other <em>.txt files in the lammps/doc/src directory for similar
style as other *.txt files in the lammps/doc/src directory for similar
commands and styles; use one or more of them as a starting point.
A description of the markup can also be found in
lammps/doc/utils/txt2html/README.html
As appropriate, the text files can include links to equations
(see doc/Eqs/</em>.tex for examples, we auto-create the associated JPG
(see doc/Eqs/*.tex for examples, we auto-create the associated JPG
files), or figures (see doc/JPG for examples), or even additional PDF
files with further details (see doc/PDF for examples). The doc page
should also include literature citations as appropriate; see the
@ -1220,7 +1220,7 @@ These example inputs are also required for validating memory accesses
and testing for memory leaks with valgrind</li>
<li>If there is a paper of yours describing your feature (either the
algorithm/science behind the feature itself, or its initial usage, or
its implementation in LAMMPS), you can add the citation to the <a href="#id12"><span class="problematic" id="id13">*</span></a>.cpp
its implementation in LAMMPS), you can add the citation to the *.cpp
source file. See src/USER-EFF/atom_vec_electron.cpp for an example.
A LaTeX citation is stored in a variable at the top of the file and a
single line of code that references the variable is added to the

View File

@ -630,9 +630,9 @@ for aspherical particle models: ellipsoids, 2d lines, 3d triangles.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">asphere</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^asphere -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="Section_howto.html#howto-14"><span class="std std-ref">Section howto 6.14</span></a>,
<a class="reference internal" href="pair_gayberne.html"><span class="doc">pair_style gayberne</span></a>, <a class="reference internal" href="pair_resquared.html"><span class="doc">pair_style resquared</span></a>,
<a class="reference external" href="PDF/pair_gayberne_extra.pdf">doc/PDF/pair_gayberne_extra.pdf</a>,
@ -658,9 +658,9 @@ themselves. See the <a class="reference internal" href="body.html"><span class=
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">body</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^body -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="atom_style.html"><span class="doc">atom_style body</span></a>, <a class="reference internal" href="body.html"><span class="doc">body</span></a>,
<a class="reference internal" href="pair_body.html"><span class="doc">pair_style body</span></a>, examples/body</p>
<hr class="docutils" />
@ -682,9 +682,9 @@ COMPASS CLASS2 molecular force field.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">class2</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^class2 -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="bond_class2.html"><span class="doc">bond_style class2</span></a>, <a class="reference internal" href="angle_class2.html"><span class="doc">angle_style class2</span></a>, <a class="reference internal" href="dihedral_class2.html"><span class="doc">dihedral_style class2</span></a>, <a class="reference internal" href="improper_class2.html"><span class="doc">improper_style class2</span></a>, <a class="reference internal" href="pair_class2.html"><span class="doc">pair_style lj/class2</span></a></p>
<hr class="docutils" />
</div>
@ -708,9 +708,9 @@ approximation to Stokesian dynamics.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">colloid</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^colloid -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="fix_wall.html"><span class="doc">fix wall/colloid</span></a>, <a class="reference internal" href="pair_colloid.html"><span class="doc">pair_style colloid</span></a>, <a class="reference internal" href="pair_yukawa_colloid.html"><span class="doc">pair_style yukawa/colloid</span></a>, <a class="reference internal" href="pair_brownian.html"><span class="doc">pair_style brownian</span></a>, <a class="reference internal" href="pair_lubricate.html"><span class="doc">pair_style lubricate</span></a>, <a class="reference internal" href="pair_lubricateU.html"><span class="doc">pair_style lubricateU</span></a>, examples/colloid, examples/srd</p>
<hr class="docutils" />
</div>
@ -737,9 +737,9 @@ zlib info it specifies.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">compress</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^compress -a machine
</pre>
<p>Supporting info: src/COMPRESS/README, lib/compress/README, <a class="reference internal" href="dump.html"><span class="doc">dump atom/gz</span></a>, <a class="reference internal" href="dump.html"><span class="doc">dump cfg/gz</span></a>, <a class="reference internal" href="dump.html"><span class="doc">dump custom/gz</span></a>, <a class="reference internal" href="dump.html"><span class="doc">dump xyz/gz</span></a></p>
<hr class="docutils" />
</div>
@ -764,9 +764,9 @@ package.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">coreshell</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^coreshell -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="Section_howto.html#howto-26"><span class="std std-ref">Section howto 6.26</span></a>, <a class="reference internal" href="compute_temp_cs.html"><span class="doc">compute temp/cs</span></a>,
<a class="reference internal" href="pair_cs.html"><span class="doc">pair_style born/coul/long/cs</span></a>, <a class="reference internal" href="pair_cs.html"><span class="doc">pair_style buck/coul/long/cs</span></a>, pair_style
lj/cut/coul/long/cs&#8221;_pair_lj.html, examples/coreshell</p>
@ -789,9 +789,9 @@ dipole models with short-range or long-range interactions.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">dipole</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^dipole -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="atom_style.html"><span class="doc">atom_style dipole</span></a>, <a class="reference internal" href="pair_dipole.html"><span class="doc">pair_style lj/cut/dipole/cut</span></a>, <a class="reference internal" href="pair_dipole.html"><span class="doc">pair_style lj/cut/dipole/long</span></a>, <a class="reference internal" href="pair_dipole.html"><span class="doc">pair_style lj/long/dipole/long</span></a>, examples/dipole</p>
<hr class="docutils" />
</div>
@ -841,9 +841,9 @@ one step, with Type &#8220;python src/Make.py -h -gpu&#8221; to see the details.
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">gpu</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^gpu -a machine
</pre>
<p>Supporting info: src/GPU/README, lib/gpu/README, <a class="reference internal" href="Section_accelerate.html"><span class="doc">Section acclerate</span></a>, <a class="reference internal" href="accelerate_gpu.html"><span class="doc">Section accelerate gpu</span></a>, Pair Styles section of <a class="reference internal" href="Section_commands.html#cmd-5"><span class="std std-ref">Section commands 3.5</span></a> for any pair style listed with a (g),
<a class="reference internal" href="kspace_style.html"><span class="doc">kspace_style</span></a>, <a class="reference internal" href="package.html"><span class="doc">package gpu</span></a>,
examples/accelerate, bench/FERMI, bench/KEPLER</p>
@ -867,9 +867,9 @@ frictional and dissipative potentials.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">granular</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^granular -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="Section_howto.html#howto-6"><span class="std std-ref">Section howto 6.6</span></a>, <a class="reference internal" href="fix_pour.html"><span class="doc">fix pour</span></a>, <a class="reference internal" href="fix_wall_gran.html"><span class="doc">fix wall/gran</span></a>, <a class="reference internal" href="pair_gran.html"><span class="doc">pair_style gran/hooke</span></a>, <a class="reference internal" href="pair_gran.html"><span class="doc">pair_style gran/hertz/history</span></a>, examples/pour, bench/in.chute</p>
<hr class="docutils" />
</div>
@ -896,9 +896,9 @@ process. You should not need to edit this file.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">kim</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^kim -a machine
</pre>
<p>Supporting info: src/KIM/README, lib/kim/README, <a class="reference internal" href="pair_kim.html"><span class="doc">pair_style kim</span></a>, examples/kim</p>
<hr class="docutils" />
</div>
@ -928,12 +928,12 @@ choose which hardware to build for. Type &#8220;python src/Make.py -h
system, you will need to read the <a class="reference internal" href="accelerate_kokkos.html"><span class="doc">Section accelerate kokkos</span></a> doc page for details of what
Makefile.machine settings are needed.</p>
<p>To install via make or Make.py for each of 3 hardware options:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">kokkos_omp</span> <span class="c1"># for CPUs with OpenMP</span>
<span class="n">make</span> <span class="n">kokkos_cuda</span> <span class="c1"># for GPUs, check the KOKKOS_ARCH setting in Makefile.kokkos_cuda</span>
<span class="n">make</span> <span class="n">kokkos_phi</span> <span class="c1"># for Xeon Phis</span>
</pre></div>
</div>
<pre class="literal-block">
make yes-kokkos
make kokkos_omp # for CPUs with OpenMP
make kokkos_cuda # for GPUs, check the KOKKOS_ARCH setting in Makefile.kokkos_cuda
make kokkos_phi # for Xeon Phis
</pre>
<p>Make.py -p kokkos -kokkos omp -a machine # for CPUs with OpenMP
Make.py -p kokkos -kokkos cuda arch=35 -a machine # for GPUs of style arch
Make.py -p kokkos -kokkos phi -a machine # for Xeon Phis</p>
@ -942,9 +942,9 @@ Make.py -p kokkos -kokkos phi -a machine # for Xeon Phis</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">kokkos</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^kokkos -a machine
</pre>
<p>Supporting info: src/KOKKOS/README, lib/kokkos/README, <a class="reference internal" href="Section_accelerate.html"><span class="doc">Section acclerate</span></a>, <a class="reference internal" href="accelerate_kokkos.html"><span class="doc">Section accelerate kokkos</span></a>, Pair Styles section of <a class="reference internal" href="Section_commands.html#cmd-5"><span class="std std-ref">Section commands 3.5</span></a> for any pair style listed
with a (k), <a class="reference internal" href="package.html"><span class="doc">package kokkos</span></a>,
examples/accelerate, bench/FERMI, bench/KEPLER</p>
@ -977,9 +977,9 @@ see the details.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">kspace</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^kspace -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="kspace_style.html"><span class="doc">kspace_style</span></a>,
<a class="reference external" href="PDF/kspace.pdf">doc/PDF/kspace.pdf</a>, <a class="reference internal" href="Section_howto.html#howto-7"><span class="std std-ref">Section howto 6.7</span></a>, <a class="reference internal" href="Section_howto.html#howto-8"><span class="std std-ref">Section howto 6.8</span></a>, <a class="reference internal" href="Section_howto.html#howto-9"><span class="std std-ref">Section howto 6.9</span></a>, <a class="reference internal" href="pair_coul.html"><span class="doc">pair_style coul</span></a>,
other pair style command doc pages which have &#8220;long&#8221; or &#8220;msm&#8221; in their
@ -1005,9 +1005,9 @@ the full list.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">manybody</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^manybody -a machine
</pre>
<p>Supporting info:</p>
<p>Examples: Pair Styles section of <a class="reference internal" href="Section_commands.html#cmd-5"><span class="std std-ref">Section commands 3.5</span></a>, examples/comb, examples/eim,
examples/nb3d, examples/vashishta</p>
@ -1032,9 +1032,9 @@ in conjuction with dynamics.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">mc</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^mc -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="fix_atom_swap.html"><span class="doc">fix atom/swap</span></a>, <a class="reference internal" href="fix_bond_break.html"><span class="doc">fix bond/break</span></a>, <a class="reference internal" href="fix_bond_create.html"><span class="doc">fix bond/create</span></a>, <a class="reference internal" href="fix_bond_swap.html"><span class="doc">fix bond/swap</span></a>,
<a class="reference internal" href="fix_gcmc.html"><span class="doc">fix gcmc</span></a>, <a class="reference internal" href="pair_dsmc.html"><span class="doc">pair_style dsmc</span></a></p>
<hr class="docutils" />
@ -1079,9 +1079,9 @@ Intel Fortran compiler, rather than the GNU Fortran compiler.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">meam</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^meam -a machine
</pre>
<p>Supporting info: lib/meam/README, <a class="reference internal" href="pair_meam.html"><span class="doc">pair_style meam</span></a>,
examples/meam</p>
<hr class="docutils" />
@ -1104,9 +1104,9 @@ listing, &#8220;ls src/MISC&#8221;, to see the list of commands.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">misc</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^misc -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="compute_ti.html"><span class="doc">compute ti</span></a>, <a class="reference internal" href="fix_evaporate.html"><span class="doc">fix evaporate</span></a>, <a class="reference internal" href="fix_ttm.html"><span class="doc">fix tmm</span></a>, <a class="reference internal" href="fix_viscosity.html"><span class="doc">fix viscosity</span></a>, examples/misc</p>
<hr class="docutils" />
</div>
@ -1129,9 +1129,9 @@ covalent bonds. The pair styles include terms for the Dreiding
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">molecule</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^molecule -a machine
</pre>
<p>Supporting info:<a class="reference internal" href="atom_style.html"><span class="doc">atom_style</span></a>,
<a class="reference internal" href="bond_style.html"><span class="doc">bond_style</span></a>, <a class="reference internal" href="angle_style.html"><span class="doc">angle_style</span></a>,
<a class="reference internal" href="dihedral_style.html"><span class="doc">dihedral_style</span></a>,
@ -1159,9 +1159,9 @@ are also written and read in parallel.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">mpiio</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^mpiio -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="dump.html"><span class="doc">dump</span></a>, <a class="reference internal" href="restart.html"><span class="doc">restart</span></a>,
<a class="reference internal" href="write_restart.html"><span class="doc">write_restart</span></a>, <a class="reference internal" href="read_restart.html"><span class="doc">read_restart</span></a></p>
<hr class="docutils" />
@ -1192,9 +1192,9 @@ creates and uses.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">opt</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^opt -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="Section_accelerate.html"><span class="doc">Section acclerate</span></a>, <a class="reference internal" href="accelerate_opt.html"><span class="doc">Section accelerate opt</span></a>, Pair Styles section of <a class="reference internal" href="Section_commands.html#cmd-5"><span class="std std-ref">Section commands 3.5</span></a> for any pair style listed
with an (o), examples/accelerate, bench/KEPLER</p>
<hr class="docutils" />
@ -1218,9 +1218,9 @@ styles which implement different materials models.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">peri</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^peri -a machine
</pre>
<p>Supporting info:
<a class="reference external" href="PDF/PDLammps_overview.pdf">doc/PDF/PDLammps_overview.pdf</a>,
<a class="reference external" href="PDF/PDLammps_EPS.pdf">doc/PDF/PDLammps_EPS.pdf</a>,
@ -1261,9 +1261,9 @@ one step. Type &#8220;python src/Make.py -h -poems&#8221; to see the details.</
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">meam</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^meam -a machine
</pre>
<p>Supporting info: src/POEMS/README, lib/poems/README,
<a class="reference internal" href="fix_poems.html"><span class="doc">fix poems</span></a>, examples/rigid</p>
<hr class="docutils" />
@ -1296,9 +1296,9 @@ in one step. Type &#8220;python src/Make.py -h -python&#8221; to see the detail
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">python</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^python -a machine
</pre>
<p>Supporting info: examples/python</p>
<hr class="docutils" />
</div>
@ -1320,9 +1320,9 @@ that use QEq as part of their formulation.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">qeq</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^qeq -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="fix_qeq.html"><span class="doc">fix qeq/*</span></a>, examples/qeq</p>
<hr class="docutils" />
</div>
@ -1362,9 +1362,9 @@ one step. Type &#8220;python src/Make.py -h -reax&#8221; to see the details.</p
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">reax</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^reax -a machine
</pre>
<p>Supporting info: lib/reax/README, <a class="reference internal" href="pair_reax.html"><span class="doc">pair_style reax</span></a>,
<a class="reference internal" href="fix_reax_bonds.html"><span class="doc">fix reax/bonds</span></a>, examples/reax</p>
<hr class="docutils" />
@ -1394,9 +1394,9 @@ field calcalation on another set.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">replica</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^replica -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="Section_howto.html#howto-5"><span class="std std-ref">Section howto 6.5</span></a>,
<a class="reference internal" href="neb.html"><span class="doc">neb</span></a>, <a class="reference internal" href="prd.html"><span class="doc">prd</span></a>, <a class="reference internal" href="tad.html"><span class="doc">tad</span></a>, <a class="reference internal" href="temper.html"><span class="doc">temper</span></a>,
<a class="reference internal" href="run_style.html"><span class="doc">run_style verlet/split</span></a>, examples/neb, examples/prd,
@ -1422,9 +1422,9 @@ few large bodies or many small bodies.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">rigid</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^rigid -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="compute_erotate_rigid.html"><span class="doc">compute erotate/rigid</span></a>,
<a class="reference internal" href="fix_shake.html"><span class="doc">fix shake</span></a>, <a class="reference internal" href="fix_shake.html"><span class="doc">fix rattle</span></a>, <a class="reference internal" href="fix_rigid.html"><span class="doc">fix rigid/*</span></a>, examples/ASPHERE, examples/rigid</p>
<hr class="docutils" />
@ -1446,9 +1446,9 @@ simulations where a shock-wave passes through a material.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">shock</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^shock -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="fix_append_atoms.html"><span class="doc">fix append/atoms</span></a>, <a class="reference internal" href="fix_msst.html"><span class="doc">fix msst</span></a>, <a class="reference internal" href="fix_nphug.html"><span class="doc">fix nphug</span></a>, <a class="reference internal" href="fix_wall_piston.html"><span class="doc">fix wall/piston</span></a>, examples/hugoniostat, examples/msst</p>
<hr class="docutils" />
</div>
@ -1471,9 +1471,9 @@ properties of the potential are also included.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">snap</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^snap -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="pair_snap.html"><span class="doc">pair snap</span></a>, <a class="reference internal" href="compute_sna_atom.html"><span class="doc">compute sna/atom</span></a>, <a class="reference internal" href="compute_sna_atom.html"><span class="doc">compute snad/atom</span></a>,
<a class="reference internal" href="compute_sna_atom.html"><span class="doc">compute snav/atom</span></a>, examples/snap</p>
<hr class="docutils" />
@ -1496,9 +1496,9 @@ colloidal-scale particles.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">srd</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^srd -a machine
</pre>
<p>Supporting info: <a class="reference internal" href="fix_srd.html"><span class="doc">fix srd</span></a>, <a class="reference internal" href="fix_wall_srd.html"><span class="doc">fix wall/srd</span></a>, examples/srd, examples/ASPHERE</p>
<hr class="docutils" />
</div>
@ -1541,9 +1541,9 @@ src/Make.py -h -voronoi&#8221; to see the details.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">voronoi</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^voronoi -a machine
</pre>
<p>Supporting info: src/VORONOI/README, lib/voronoi/README, <a class="reference internal" href="compute_voronoi_atom.html"><span class="doc">compute voronoi/atom</span></a>, examples/voronoi</p>
<hr class="docutils" />
</div>
@ -1860,7 +1860,7 @@ src/Make.py -h -voronoi&#8221; to see the details.</p>
<tr class="row-even"><td><a class="reference internal" href="#user-smd"><span class="std std-ref">USER-SMD</span></a></td>
<td>smoothed Mach dynamics</td>
<td>Georg Ganzenmuller (EMI)</td>
<td><a class="reference external" href="PDF/SMD_LAMMPS_userguide.pdf">userguide.pdf</a></td>
<td><a class="reference external" href="PDF/SMD_LAMMPS_userguide.pdf">SMD User Guide</a></td>
<td>USER/smd</td>
<td><ul class="first last simple">
<li></li>
@ -1888,7 +1888,7 @@ src/Make.py -h -voronoi&#8221; to see the details.</p>
<tr class="row-even"><td><a class="reference internal" href="#user-sph"><span class="std std-ref">USER-SPH</span></a></td>
<td>smoothed particle hydrodynamics</td>
<td>Georg Ganzenmuller (EMI)</td>
<td><a class="reference external" href="PDF/SPH_LAMMPS_userguide.pdf">userguide.pdf</a></td>
<td><a class="reference external" href="PDF/SPH_LAMMPS_userguide.pdf">SPH User Guide</a></td>
<td>USER/sph</td>
<td><a class="reference external" href="http://lammps.sandia.gov/movies.html#sph">sph</a></td>
<td><ul class="first last simple">
@ -1986,9 +1986,9 @@ more details.</p>
<span class="n">make</span> <span class="n">machine</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="o">^</span><span class="n">atc</span> <span class="o">-</span><span class="n">a</span> <span class="n">machine</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -p ^atc -a machine
</pre>
<p>Supporting <a class="reference external" href="info:src/USER-ATC/README">info:src/USER-ATC/README</a>, <a class="reference internal" href="fix_atc.html"><span class="doc">fix atc</span></a>,
examples/USER/atc</p>
<p>Authors: Reese Jones (rjones at sandia.gov), Jeremy Templeton (jatempl
@ -2064,10 +2064,9 @@ equations of motion are integrated efficiently through the Shardlow
splitting algorithm. See src/USER-DPD/README for more details.</p>
<p>Supporting info: /src/USER-DPD/README, <a class="reference internal" href="compute_dpd.html"><span class="doc">compute dpd</span></a>
<a class="reference internal" href="compute_dpd_atom.html"><span class="doc">compute dpd/atom</span></a>
<a class="reference internal" href="fix_eos_table.html"><span class="doc">fix eos/cv</span></a> <a class="reference internal" href="fix_eos_table.html"><span class="doc">fix eos/table</span></a></p>
<blockquote>
<div><a class="reference internal" href="fix_eos_table_rx.html"><span class="doc">fix eos/table/rx</span></a> <a class="reference internal" href="fix_shardlow.html"><span class="doc">fix shardlow</span></a></div></blockquote>
<p><a class="reference internal" href="fix_rx.html"><span class="doc">fix rx</span></a> <a class="reference internal" href="pair_table_rx.html"><span class="doc">pair table/rx</span></a>
<a class="reference internal" href="fix_eos_table.html"><span class="doc">fix eos/cv</span></a> <a class="reference internal" href="fix_eos_table.html"><span class="doc">fix eos/table</span></a>
<a class="reference internal" href="fix_eos_table_rx.html"><span class="doc">fix eos/table/rx</span></a> <a class="reference internal" href="fix_shardlow.html"><span class="doc">fix shardlow</span></a>
<a class="reference internal" href="fix_rx.html"><span class="doc">fix rx</span></a> <a class="reference internal" href="pair_table_rx.html"><span class="doc">pair table/rx</span></a>
<a class="reference internal" href="pair_dpd_fdt.html"><span class="doc">pair dpd/fdt</span></a> <a class="reference internal" href="pair_dpd_fdt.html"><span class="doc">pair dpd/fdt/energy</span></a>
<a class="reference internal" href="pair_exp6_rx.html"><span class="doc">pair exp6/rx</span></a> <a class="reference internal" href="pair_multi_lucy.html"><span class="doc">pair multi/lucy</span></a>
<a class="reference internal" href="pair_multi_lucy_rx.html"><span class="doc">pair multi/lucy/rx</span></a>, examples/USER/dpd</p>
@ -2213,7 +2212,7 @@ Contact them directly if you have any questions.</p>
<p>Supporting info:</p>
<p>The files in this package are a potpourri of (mostly) unrelated
features contributed to LAMMPS by users. Each feature is a single
pair of files (<a href="#id2"><span class="problematic" id="id3">*</span></a>.cpp and <a href="#id4"><span class="problematic" id="id5">*</span></a>.h).</p>
pair of files (*.cpp and *.h).</p>
<p>More information about each feature can be found by reading its doc
page in the LAMMPS doc directory. The doc page which lists all LAMMPS
input script commands is as follows:</p>
@ -2382,18 +2381,18 @@ questions.</p>
<p>Supporting info:</p>
<p>This package implements smoothed Mach dynamics (SMD) in
LAMMPS. Currently, the package has the following features:</p>
<ul class="simple">
<li>Does liquids via traditional Smooth Particle Hydrodynamics (SPH)</li>
<li>Also solves solids mechanics problems via a state of the art
stabilized meshless method with hourglass control.</li>
<li>Can specify hydrostatic interactions independently from material
strength models, i.e. pressure and deviatoric stresses are separated.</li>
<li>Many material models available (Johnson-Cook, plasticity with
hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new
material models.</li>
<li>Rigid boundary conditions (walls) can be loaded as surface geometries
from <a href="#id8"><span class="problematic" id="id9">*</span></a>.STL files.</li>
</ul>
<p>* Does liquids via traditional Smooth Particle Hydrodynamics (SPH)</p>
<dl class="docutils">
<dt>* Also solves solids mechanics problems via a state of the art</dt>
<dd>stabilized meshless method with hourglass control.</dd>
<dt>* Can specify hydrostatic interactions independently from material</dt>
<dd>strength models, i.e. pressure and deviatoric stresses are separated.</dd>
<dt>* Many material models available (Johnson-Cook, plasticity with</dt>
<dd>hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new
material models.</dd>
<dt>* Rigid boundary conditions (walls) can be loaded as surface geometries</dt>
<dd>from *.STL files.</dd>
</dl>
<p>See the file doc/PDF/SMD_LAMMPS_userguide.pdf to get started.</p>
<p>There are example scripts for using this package in examples/USER/smd.</p>
<p>The person who created this package is Georg Ganzenmuller at the
@ -2424,16 +2423,18 @@ them directly if you have any questions.</p>
<p>Supporting info:</p>
<p>This package implements smoothed particle hydrodynamics (SPH) in
LAMMPS. Currently, the package has the following features:</p>
<ul class="simple">
<li>Tait, ideal gas, Lennard-Jones equation of states, full support for
complete (i.e. internal-energy dependent) equations of state</li>
<li>Plain or Monaghans XSPH integration of the equations of motion</li>
<li>Density continuity or density summation to propagate the density field</li>
<li>Commands to set internal energy and density of particles from the
input script</li>
<li>Output commands to access internal energy and density for dumping and
thermo output</li>
</ul>
<dl class="docutils">
<dt>* Tait, ideal gas, Lennard-Jones equation of states, full support for</dt>
<dd>complete (i.e. internal-energy dependent) equations of state</dd>
</dl>
<p>* Plain or Monaghans XSPH integration of the equations of motion</p>
<p>* Density continuity or density summation to propagate the density field</p>
<dl class="docutils">
<dt>* Commands to set internal energy and density of particles from the</dt>
<dd>input script</dd>
<dt>* Output commands to access internal energy and density for dumping and</dt>
<dd>thermo output</dd>
</dl>
<p>See the file doc/PDF/SPH_LAMMPS_userguide.pdf to get started.</p>
<p>There are example scripts for using this package in examples/USER/sph.</p>
<p>The person who created this package is Georg Ganzenmuller at the

View File

@ -343,10 +343,10 @@ described above.</p>
<p>If you set the paths to these files as environment variables, you only
have to do it once. For the csh or tcsh shells, add something like
this to your ~/.cshrc file, one line for each of the two files:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>setenv PYTHONPATH ${PYTHONPATH}:/home/sjplimp/lammps/python
<pre class="literal-block">
setenv PYTHONPATH ${PYTHONPATH}:/home/sjplimp/lammps/python
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</pre></div>
</div>
</pre>
<p>If you use the python/install.py script, you need to invoke it every
time you rebuild LAMMPS (as a shared library) or make changes to the
python/lammps.py file.</p>
@ -393,39 +393,21 @@ environment variable as described above.</p>
your Python with an interface to MPI. This also allows you to
make MPI calls directly from Python in your script, if you desire.</p>
<p>There are several Python packages available that purport to wrap MPI
as a library and allow MPI functions to be called from Python.</p>
<p>These include</p>
as a library and allow MPI functions to be called from Python. However,
development on most of them seems to be halted except on:</p>
<ul class="simple">
<li><a class="reference external" href="http://pympi.sourceforge.net/">pyMPI</a></li>
<li><a class="reference external" href="http://code.google.com/p/maroonmpi/">maroonmpi</a></li>
<li><a class="reference external" href="http://code.google.com/p/mpi4py/">mpi4py</a></li>
<li><a class="reference external" href="http://nbcr.sdsc.edu/forum/viewtopic.php?t=89&amp;sid=c997fefc3933bd66204875b436940f16">myMPI</a></li>
<li><a class="reference external" href="http://code.google.com/p/pypar">Pypar</a></li>
<li><a class="reference external" href="https://bitbucket.org/mpi4py/mpi4py">mpi4py</a></li>
<li><a class="reference external" href="https://github.com/daleroberts/pypar">PyPar</a></li>
</ul>
<p>All of these except pyMPI work by wrapping the MPI library and
exposing (some portion of) its interface to your Python script. This
means Python cannot be used interactively in parallel, since they do
not address the issue of interactive input to multiple instances of
Python running on different processors. The one exception is pyMPI,
which alters the Python interpreter to address this issue, and (I
believe) creates a new alternate executable (in place of &#8220;python&#8221;
itself) as a result.</p>
<p>In principle any of these Python/MPI packages should work to invoke
LAMMPS in parallel and to make MPI calls themselves from a Python
script which is itself running in parallel. However, when I
downloaded and looked at a few of them, their documentation was
incomplete and I had trouble with their installation. It&#8217;s not clear
if some of the packages are still being actively developed and
supported.</p>
<p>The packages Pypar and mpi4py have both been successfully tested with
LAMMPS. Pypar is simpler and easy to set up and use, but supports
<p>Both packages, PyPar and mpi4py have been successfully tested with
LAMMPS. PyPar is simpler and easy to set up and use, but supports
only a subset of MPI. Mpi4py is more MPI-feature complete, but also a
bit more complex to use. As of version 2.0.0, mpi4py is the only
python MPI wrapper that allows passing a custom MPI communicator to
the LAMMPS constructor, which means one can easily run one or more
LAMMPS instances on subsets of the total MPI ranks.</p>
<hr class="docutils" />
<p>Pypar requires the ubiquitous <a class="reference external" href="http://numpy.scipy.org">Numpy package</a>
<p>PyPar requires the ubiquitous <a class="reference external" href="http://numpy.scipy.org">Numpy package</a>
be installed in your Python. After launching Python, type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span>
</pre></div>
@ -439,15 +421,15 @@ top-level directory, type</p>
</div>
<p>The &#8220;sudo&#8221; is only needed if required to copy Numpy files into your
Python distribution&#8217;s site-packages directory.</p>
<p>To install Pypar (version pypar-2.1.4_94 as of Aug 2012), unpack it
<p>To install PyPar (version pypar-2.1.4_94 as of Aug 2012), unpack it
and from its &#8220;source&#8221; directory, type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">build</span>
<span class="n">sudo</span> <span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>Again, the &#8220;sudo&#8221; is only needed if required to copy Pypar files into
<p>Again, the &#8220;sudo&#8221; is only needed if required to copy PyPar files into
your Python distribution&#8217;s site-packages directory.</p>
<p>If you have successully installed Pypar, you should be able to run
<p>If you have successully installed PyPar, you should be able to run
Python and type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pypar</span>
</pre></div>
@ -465,17 +447,17 @@ on a simple test script</p>
<p>and see one line of output for each processor you run on.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To use Pypar and LAMMPS in parallel from Python, you must insure
<p class="last">To use PyPar and LAMMPS in parallel from Python, you must insure
both are using the same version of MPI. If you only have one MPI
installed on your system, this is not an issue, but it can be if you
have multiple MPIs. Your LAMMPS build is explicit about which MPI it
is using, since you specify the details in your lo-level
src/MAKE/Makefile.foo file. Pypar uses the &#8220;mpicc&#8221; command to find
src/MAKE/Makefile.foo file. PyPar uses the &#8220;mpicc&#8221; command to find
information about the MPI it uses to build against. And it tries to
load &#8220;libmpi.so&#8221; from the LD_LIBRARY_PATH. This may or may not find
the MPI library that LAMMPS is using. If you have problems running
both Pypar and LAMMPS together, this is an issue you may need to
address, e.g. by moving other MPI installations so that Pypar finds
both PyPar and LAMMPS together, this is an issue you may need to
address, e.g. by moving other MPI installations so that PyPar finds
the right one.</p>
</div>
<hr class="docutils" />
@ -502,11 +484,11 @@ on a simple test script</p>
</pre></div>
</div>
<p>where test.py contains the lines</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">mpi4py</span> <span class="k">import</span> <span class="n">MPI</span>
<span class="n">comm</span> <span class="o">=</span> <span class="n">MPI</span><span class="o">.</span><span class="n">COMM_WORLD</span>
<span class="nb">print</span> <span class="s2">&quot;Proc </span><span class="si">%d</span><span class="s2"> out of </span><span class="si">%d</span><span class="s2"> procs&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">comm</span><span class="o">.</span><span class="n">Get_rank</span><span class="p">(),</span><span class="n">comm</span><span class="o">.</span><span class="n">Get_size</span><span class="p">())</span>
</pre></div>
</div>
<pre class="literal-block">
from mpi4py import MPI
comm = MPI.COMM_WORLD
print &quot;Proc %d out of %d procs&quot; % (comm.Get_rank(),comm.Get_size())
</pre>
<p>and see one line of output for each processor you run on.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
@ -568,15 +550,15 @@ interactively from the bench directory:</p>
<p>Either way, you should see the results of running the in.lj benchmark
on a single processor appear on the screen, the same as if you had
typed something like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_g++ -in in.lj
</pre>
</div>
<div class="section" id="test-lammps-and-python-in-parallel">
<h3>11.6.2. <strong>Test LAMMPS and Python in parallel:</strong></h3>
<p>To run LAMMPS in parallel, assuming you have installed the
<a class="reference external" href="Pypar">Pypar</a> package as discussed above, create a test.py file
containing these lines:</p>
<a class="reference external" href="https://github.com/daleroberts/pypar">PyPar</a> package as discussed
above, create a test.py file containing these lines:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pypar</span>
<span class="kn">from</span> <span class="nn">lammps</span> <span class="k">import</span> <span class="n">lammps</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">()</span>
@ -586,36 +568,36 @@ containing these lines:</p>
</pre></div>
</div>
<p>To run LAMMPS in parallel, assuming you have installed the
<a class="reference external" href="mpi4py">mpi4py</a> package as discussed above, create a test.py file
containing these lines:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">mpi4py</span> <span class="k">import</span> <span class="n">MPI</span>
<span class="kn">from</span> <span class="nn">lammps</span> <span class="k">import</span> <span class="n">lammps</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">()</span>
<span class="n">lmp</span><span class="o">.</span><span class="n">file</span><span class="p">(</span><span class="s2">&quot;in.lj&quot;</span><span class="p">)</span>
<span class="n">me</span> <span class="o">=</span> <span class="n">MPI</span><span class="o">.</span><span class="n">COMM_WORLD</span><span class="o">.</span><span class="n">Get_rank</span><span class="p">()</span>
<span class="n">nprocs</span> <span class="o">=</span> <span class="n">MPI</span><span class="o">.</span><span class="n">COMM_WORLD</span><span class="o">.</span><span class="n">Get_size</span><span class="p">()</span>
<span class="nb">print</span> <span class="s2">&quot;Proc </span><span class="si">%d</span><span class="s2"> out of </span><span class="si">%d</span><span class="s2"> procs has&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">me</span><span class="p">,</span><span class="n">nprocs</span><span class="p">),</span><span class="n">lmp</span>
<span class="n">MPI</span><span class="o">.</span><span class="n">Finalize</span><span class="p">()</span>
</pre></div>
</div>
<a class="reference external" href="https://bitbucket.org/mpi4py/mpi4py">mpi4py</a> package as discussed
above, create a test.py file containing these lines:</p>
<pre class="literal-block">
from mpi4py import MPI
from lammps import lammps
lmp = lammps()
lmp.file(&quot;in.lj&quot;)
me = MPI.COMM_WORLD.Get_rank()
nprocs = MPI.COMM_WORLD.Get_size()
print &quot;Proc %d out of %d procs has&quot; % (me,nprocs),lmp
MPI.Finalize()
</pre>
<p>You can either script in parallel as:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">4</span> <span class="n">python</span> <span class="n">test</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<p>and you should see the same output as if you had typed</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">4</span> <span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span>
</pre></div>
</div>
<p>Note that if you leave out the 3 lines from test.py that specify Pypar
<pre class="literal-block">
% mpirun -np 4 lmp_g++ -in in.lj
</pre>
<p>Note that if you leave out the 3 lines from test.py that specify PyPar
commands you will instantiate and run LAMMPS independently on each of
the P processors specified in the mpirun command. In this case you
should get 4 sets of output, each showing that a LAMMPS run was made
on a single processor, instead of one set of output showing that
LAMMPS ran on 4 processors. If the 1-processor outputs occur, it
means that Pypar is not working correctly.</p>
<p>Also note that once you import the PyPar module, Pypar initializes MPI
means that PyPar is not working correctly.</p>
<p>Also note that once you import the PyPar module, PyPar initializes MPI
for you, and you can use MPI calls directly in your Python script, as
described in the Pypar documentation. The last line of your Python
described in the PyPar documentation. The last line of your Python
script should be pypar.finalize(), to insure MPI is shut down
correctly.</p>
</div>
@ -661,14 +643,14 @@ Python script, as follows:</p>
the files src/library.cpp and src/library.h you will see that they
correspond one-to-one with calls you can make to the LAMMPS library
from a C++ or C or Fortran program.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">()</span> <span class="c1"># create a LAMMPS object using the default liblammps.so library</span>
<span class="mi">4</span> <span class="n">optional</span> <span class="n">args</span> <span class="n">are</span> <span class="n">allowed</span><span class="p">:</span> <span class="n">name</span><span class="p">,</span> <span class="n">cmdargs</span><span class="p">,</span> <span class="n">ptr</span><span class="p">,</span> <span class="n">comm</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">(</span><span class="n">ptr</span><span class="o">=</span><span class="n">lmpptr</span><span class="p">)</span> <span class="c1"># use lmpptr as previously created LAMMPS object</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">(</span><span class="n">comm</span><span class="o">=</span><span class="n">split</span><span class="p">)</span> <span class="c1"># create a LAMMPS object with a custom communicator, requires mpi4py 2.0.0 or later</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;g++&quot;</span><span class="p">)</span> <span class="c1"># create a LAMMPS object using the liblammps_g++.so library</span>
<span class="n">lmp</span> <span class="o">=</span> <span class="n">lammps</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;g++&quot;</span><span class="p">,</span><span class="n">cmdargs</span><span class="o">=</span><span class="nb">list</span><span class="p">)</span> <span class="c1"># add LAMMPS command-line args, e.g. list = [&quot;-echo&quot;,&quot;screen&quot;]</span>
</pre></div>
</div>
<pre class="literal-block">
lmp = lammps() # create a LAMMPS object using the default liblammps.so library
4 optional args are allowed: name, cmdargs, ptr, comm
lmp = lammps(ptr=lmpptr) # use lmpptr as previously created LAMMPS object
lmp = lammps(comm=split) # create a LAMMPS object with a custom communicator, requires mpi4py 2.0.0 or later
lmp = lammps(name=&quot;g++&quot;) # create a LAMMPS object using the liblammps_g++.so library
lmp = lammps(name=&quot;g++&quot;,cmdargs=list) # add LAMMPS command-line args, e.g. list = [&quot;-echo&quot;,&quot;screen&quot;]
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp</span><span class="o">.</span><span class="n">close</span><span class="p">()</span> <span class="c1"># destroy a LAMMPS object</span>
</pre></div>
</div>
@ -677,49 +659,49 @@ from a C++ or C or Fortran program.</p>
<span class="n">lmp</span><span class="o">.</span><span class="n">command</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span> <span class="c1"># invoke a single LAMMPS command, cmd = &quot;run 100&quot;</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">xlo</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">extract_global</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="nb">type</span><span class="p">)</span> <span class="c1"># extract a global quantity</span>
<span class="c1"># name = &quot;boxxlo&quot;, &quot;nlocal&quot;, etc</span>
<span class="c1"># type = 0 = int</span>
<span class="c1"># 1 = double</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">coords</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">extract_atom</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="nb">type</span><span class="p">)</span> <span class="c1"># extract a per-atom quantity</span>
<span class="c1"># name = &quot;x&quot;, &quot;type&quot;, etc</span>
<span class="c1"># type = 0 = vector of ints</span>
<span class="c1"># 1 = array of ints</span>
<span class="c1"># 2 = vector of doubles</span>
<span class="c1"># 3 = array of doubles</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">eng</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">extract_compute</span><span class="p">(</span><span class="nb">id</span><span class="p">,</span><span class="n">style</span><span class="p">,</span><span class="nb">type</span><span class="p">)</span> <span class="c1"># extract value(s) from a compute</span>
<span class="n">v3</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">extract_fix</span><span class="p">(</span><span class="nb">id</span><span class="p">,</span><span class="n">style</span><span class="p">,</span><span class="nb">type</span><span class="p">,</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">)</span> <span class="c1"># extract value(s) from a fix</span>
<span class="c1"># id = ID of compute or fix</span>
<span class="c1"># style = 0 = global data</span>
<span class="c1"># 1 = per-atom data</span>
<span class="c1"># 2 = local data</span>
<span class="c1"># type = 0 = scalar</span>
<span class="c1"># 1 = vector</span>
<span class="c1"># 2 = array</span>
<span class="c1"># i,j = indices of value in global vector or array</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">var</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">extract_variable</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="n">group</span><span class="p">,</span><span class="n">flag</span><span class="p">)</span> <span class="c1"># extract value(s) from a variable</span>
<span class="c1"># name = name of variable</span>
<span class="c1"># group = group ID (ignored for equal-style variables)</span>
<span class="c1"># flag = 0 = equal-style variable</span>
<span class="c1"># 1 = atom-style variable</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">flag</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">set_variable</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="n">value</span><span class="p">)</span> <span class="c1"># set existing named string-style variable to value, flag = 0 if successful</span>
<span class="n">natoms</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">get_natoms</span><span class="p">()</span> <span class="c1"># total # of atoms as int</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">gather_atoms</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="nb">type</span><span class="p">,</span><span class="n">count</span><span class="p">)</span> <span class="c1"># return atom attribute of all atoms gathered into data, ordered by atom ID</span>
<span class="c1"># name = &quot;x&quot;, &quot;charge&quot;, &quot;type&quot;, etc</span>
<span class="c1"># count = # of per-atom values, 1 or 3, etc</span>
<span class="n">lmp</span><span class="o">.</span><span class="n">scatter_atoms</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="nb">type</span><span class="p">,</span><span class="n">count</span><span class="p">,</span><span class="n">data</span><span class="p">)</span> <span class="c1"># scatter atom attribute of all atoms from data, ordered by atom ID</span>
<span class="c1"># name = &quot;x&quot;, &quot;charge&quot;, &quot;type&quot;, etc</span>
<span class="c1"># count = # of per-atom values, 1 or 3, etc</span>
</pre></div>
</div>
<pre class="literal-block">
xlo = lmp.extract_global(name,type) # extract a global quantity
# name = &quot;boxxlo&quot;, &quot;nlocal&quot;, etc
# type = 0 = int
# 1 = double
</pre>
<pre class="literal-block">
coords = lmp.extract_atom(name,type) # extract a per-atom quantity
# name = &quot;x&quot;, &quot;type&quot;, etc
# type = 0 = vector of ints
# 1 = array of ints
# 2 = vector of doubles
# 3 = array of doubles
</pre>
<pre class="literal-block">
eng = lmp.extract_compute(id,style,type) # extract value(s) from a compute
v3 = lmp.extract_fix(id,style,type,i,j) # extract value(s) from a fix
# id = ID of compute or fix
# style = 0 = global data
# 1 = per-atom data
# 2 = local data
# type = 0 = scalar
# 1 = vector
# 2 = array
# i,j = indices of value in global vector or array
</pre>
<pre class="literal-block">
var = lmp.extract_variable(name,group,flag) # extract value(s) from a variable
# name = name of variable
# group = group ID (ignored for equal-style variables)
# flag = 0 = equal-style variable
# 1 = atom-style variable
</pre>
<pre class="literal-block">
flag = lmp.set_variable(name,value) # set existing named string-style variable to value, flag = 0 if successful
natoms = lmp.get_natoms() # total # of atoms as int
data = lmp.gather_atoms(name,type,count) # return atom attribute of all atoms gathered into data, ordered by atom ID
# name = &quot;x&quot;, &quot;charge&quot;, &quot;type&quot;, etc
# count = # of per-atom values, 1 or 3, etc
lmp.scatter_atoms(name,type,count,data) # scatter atom attribute of all atoms from data, ordered by atom ID
# name = &quot;x&quot;, &quot;charge&quot;, &quot;type&quot;, etc
# count = # of per-atom values, 1 or 3, etc
</pre>
<hr class="docutils" />
<p>The lines</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lammps</span> <span class="k">import</span> <span class="n">lammps</span>
@ -767,8 +749,8 @@ argument.</p>
returned, which you can use via normal Python subscripting. See the
extract() method in the src/atom.cpp file for a list of valid names.
Again, new names could easily be added. A pointer to a vector of
doubles or integers, or a pointer to an array of doubles (double <a href="#id3"><span class="problematic" id="id4">**</span></a>)
or integers (int <a href="#id5"><span class="problematic" id="id6">**</span></a>) is returned. You need to specify the appropriate
doubles or integers, or a pointer to an array of doubles (double **)
or integers (int **) is returned. You need to specify the appropriate
data type via the type argument.</p>
<p>For extract_compute() and extract_fix(), the global, per-atom, or
local data calulated by the compute or fix can be accessed. What is
@ -824,19 +806,19 @@ consecutively ordered, no coordinates are reset.</p>
<p>The array of coordinates passed to scatter_atoms() must be a ctypes
vector of ints or doubles, allocated and initialized something like
this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ctypes</span> <span class="k">import</span> <span class="o">*</span>
<span class="n">natoms</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">get_natoms</span><span class="p">()</span>
<span class="n">n3</span> <span class="o">=</span> <span class="mi">3</span><span class="o">*</span><span class="n">natoms</span>
<span class="n">x</span> <span class="o">=</span> <span class="p">(</span><span class="n">n3</span><span class="o">*</span><span class="n">c_double</span><span class="p">)()</span>
<span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">x</span> <span class="n">coord</span> <span class="n">of</span> <span class="n">atom</span> <span class="k">with</span> <span class="n">ID</span> <span class="mi">1</span>
<span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">y</span> <span class="n">coord</span> <span class="n">of</span> <span class="n">atom</span> <span class="k">with</span> <span class="n">ID</span> <span class="mi">1</span>
<span class="n">x</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">=</span> <span class="n">z</span> <span class="n">coord</span> <span class="n">of</span> <span class="n">atom</span> <span class="k">with</span> <span class="n">ID</span> <span class="mi">1</span>
<span class="n">x</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="n">x</span> <span class="n">coord</span> <span class="n">of</span> <span class="n">atom</span> <span class="k">with</span> <span class="n">ID</span> <span class="mi">2</span>
<span class="o">...</span>
<span class="n">x</span><span class="p">[</span><span class="n">n3</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">z</span> <span class="n">coord</span> <span class="n">of</span> <span class="n">atom</span> <span class="k">with</span> <span class="n">ID</span> <span class="n">natoms</span>
<span class="n">lmp</span><span class="o">.</span><span class="n">scatter_coords</span><span class="p">(</span><span class="s2">&quot;x&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="n">x</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
from ctypes import *
natoms = lmp.get_natoms()
n3 = 3*natoms
x = (n3*c_double)()
x[0] = x coord of atom with ID 1
x[1] = y coord of atom with ID 1
x[2] = z coord of atom with ID 1
x[3] = x coord of atom with ID 2
...
x[n3-1] = z coord of atom with ID natoms
lmp.scatter_coords(&quot;x&quot;,1,3,x)
</pre>
<p>Alternatively, you can just change values in the vector returned by
gather_atoms(&#8220;x&#8221;,1,3), since it is a ctypes vector of doubles.</p>
<hr class="docutils" />
@ -915,10 +897,10 @@ capability needed by these Python scripts.</p>
open-source version of PyMol in your Python, so that you can import it
from a Python script. See the PyMol WWW pages <a class="reference external" href="http://www.pymol.org">here</a> or
<a class="reference external" href="http://sourceforge.net/scm/?type=svn&amp;group_id=4546">here</a> for more details:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>http://www.pymol.org
http://sourceforge.net/scm/?type=svn&amp;group_id=4546
</pre></div>
</div>
<pre class="literal-block">
<a class="reference external" href="http://www.pymol.org">http://www.pymol.org</a>
<a class="reference external" href="http://sourceforge.net/scm/?type=svn&amp;group_id=4546">http://sourceforge.net/scm/?type=svn&amp;group_id=4546</a>
</pre>
<p>The latter link is to the open-source version.</p>
<p>Note that for VMD, you need a fairly current version (1.8.7 works for
me) and there are some lines in the pizza/vmd.py script for 4 PIZZA

View File

@ -173,10 +173,10 @@ experienced users.</p>
<p>When you download a LAMMPS tarball you will need to unzip and untar
the downloaded file with the following commands, after placing the
tarball in an appropriate directory.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">gunzip</span> <span class="n">lammps</span><span class="o">*.</span><span class="n">tar</span><span class="o">.</span><span class="n">gz</span>
<span class="n">tar</span> <span class="n">xvf</span> <span class="n">lammps</span><span class="o">*.</span><span class="n">tar</span>
</pre></div>
</div>
<pre class="literal-block">
gunzip lammps*.tar.gz
tar xvf lammps*.tar
</pre>
<p>This will create a LAMMPS directory containing two files and several
sub-directories:</p>
<table border="1" class="docutils">
@ -315,13 +315,13 @@ it will be never be touched by any LAMMPS updates.</p>
a list of available choices from src/MAKE and all of its
sub-directories. If one of those has the options you want or is the
machine you want, you can type a command like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">mpi</span>
<span class="ow">or</span>
<span class="n">make</span> <span class="n">serial_icc</span>
<span class="ow">or</span>
<span class="n">gmake</span> <span class="n">mac</span>
</pre></div>
</div>
<pre class="literal-block">
make mpi
or
make serial_icc
or
gmake mac
</pre>
<p>Note that the corresponding Makefile.machine can exist in src/MAKE or
any of its sub-directories. If a file with the same name appears in
multiple places (not a good idea), the order they are used is as
@ -362,13 +362,13 @@ then you should list them as part of the LIB variable. You should
not need to do this if you use mpicxx.</p>
<p>The DEPFLAGS setting is what triggers the C++ compiler to create a
dependency list for a source file. This speeds re-compilation when
source (<em>.cpp) or header (</em>.h) files are edited. Some compilers do
source (*.cpp) or header (*.h) files are edited. Some compilers do
not support dependency file creation, or may use a different switch
than -D. GNU g++ and Intel icc works with -D. If your compiler can&#8217;t
create dependency files, then you&#8217;ll need to create a Makefile.foo
patterned after Makefile.storm, which uses different rules that do not
involve dependency files. Note that when you build LAMMPS for the
first time on a new platform, a long list of <a href="#id5"><span class="problematic" id="id6">*</span></a>.d files will be printed
first time on a new platform, a long list of *.d files will be printed
out rapidly. This is not an error; it is the Makefile doing its
normal creation of dependencies.</p>
<p><strong>Step 4</strong></p>
@ -598,7 +598,7 @@ faster, depending on how many cores your compilation machine has. N
is the number of cores the build runs on.</p>
<p>You should get the executable lmp_foo when the build is complete.</p>
<hr class="docutils" />
<p id="start-2-3"><a href="#id7"><span class="problematic" id="id8">**</span></a><em>Errors that can occur when making LAMMPS:</em>**</p>
<p id="start-2-3"><a href="#id5"><span class="problematic" id="id6">**</span></a><em>Errors that can occur when making LAMMPS:</em>**</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If an error occurs when building LAMMPS, the compiler or linker
@ -632,17 +632,17 @@ is undefined&#8217;, then your machine does not support &#8220;long long&#8221;
integers. Try using the -DLAMMPS_LONGLONG_TO_LONG setting described
above in Step 4.</p>
<hr class="docutils" />
<p id="start-2-4"><a href="#id9"><span class="problematic" id="id10">**</span></a><em>Additional build tips:</em>**</p>
<p id="start-2-4"><a href="#id7"><span class="problematic" id="id8">**</span></a><em>Additional build tips:</em>**</p>
<ol class="arabic simple">
<li>Building LAMMPS for multiple platforms.</li>
</ol>
<p>You can make LAMMPS for multiple platforms from the same src
directory. Each target creates its own object sub-directory called
Obj_target where it stores the system-specific <a href="#id11"><span class="problematic" id="id12">*</span></a>.o files.</p>
Obj_target where it stores the system-specific *.o files.</p>
<ol class="arabic simple" start="2">
<li>Cleaning up.</li>
</ol>
<p>Typing &#8220;make clean-all&#8221; or &#8220;make clean-machine&#8221; will delete <a href="#id13"><span class="problematic" id="id14">*</span></a>.o object
<p>Typing &#8220;make clean-all&#8221; or &#8220;make clean-machine&#8221; will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.</p>
<p>(3) Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
@ -686,11 +686,11 @@ basis is limited by 4-byte integer storage to 2^31 atoms per processor
a problem would have a huge per-processor memory footprint due to
neighbor lists and would run very slowly in terms of CPU secs/timestep.</p>
<hr class="docutils" />
<p id="start-2-5"><a href="#id15"><span class="problematic" id="id16">**</span></a><em>Building for a Mac:</em>**</p>
<p id="start-2-5"><a href="#id9"><span class="problematic" id="id10">**</span></a><em>Building for a Mac:</em>**</p>
<p>OS X is BSD Unix, so it should just work. See the
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.</p>
<hr class="docutils" />
<p id="start-2-6"><a href="#id17"><span class="problematic" id="id18">**</span></a><em>Building for Windows:</em>**</p>
<p id="start-2-6"><a href="#id11"><span class="problematic" id="id12">**</span></a><em>Building for Windows:</em>**</p>
<p>The LAMMPS download page has an option to download both a serial and
parallel pre-built Windows executable. See the <a class="reference internal" href="#start-6"><span class="std std-ref">Running LAMMPS</span></a> section for instructions on running these executables
on a Windows box.</p>
@ -725,7 +725,7 @@ tool which can be used to install/un-install packages and build the
auxiliary libraries which some of them use. It can also auto-edit a
Makefile.machine to add settings needed by some packages.</p>
<hr class="docutils" />
<p id="start-3-1"><a href="#id19"><span class="problematic" id="id20">**</span></a><em>Package basics:</em>**</p>
<p id="start-3-1"><a href="#id13"><span class="problematic" id="id14">**</span></a><em>Package basics:</em>**</p>
<p>The source code for LAMMPS is structured as a set of core files which
are always included, plus optional packages. Packages are groups of
files that enable a specific set of features. For example, force
@ -742,9 +742,9 @@ package, you must have built LAMMPS with that package, else you will
get an error that the style is invalid or the command is unknown.
Every command&#8217;s doc page specfies if it is part of a package. You can
also type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_machine</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_machine -h
</pre>
<p>to run your executable with the optional <a class="reference internal" href="#start-7"><span class="std std-ref">-h command-line switch</span></a> for &#8220;help&#8221;, which will simply list the styles and
commands known to your executable, and immediately exit.</p>
<p>There are two kinds of packages in LAMMPS, standard and user packages.
@ -768,7 +768,7 @@ Information on how to submit additions you make to LAMMPS as single
files or either a standard or user-contributed package are given in
<a class="reference internal" href="Section_modify.html#mod-15"><span class="std std-ref">this section</span></a> of the documentation.</p>
<hr class="docutils" />
<p id="start-3-2"><a href="#id21"><span class="problematic" id="id22">**</span></a><em>Including/excluding packages:</em>**</p>
<p id="start-3-2"><a href="#id15"><span class="problematic" id="id16">**</span></a><em>Including/excluding packages:</em>**</p>
<p>To use (or not use) a package you must include it (or exclude it)
before building LAMMPS. From the src directory, this is typically as
simple as:</p>
@ -837,7 +837,7 @@ sub-directory. Typing &#8220;make package-diff&#8221; lists all differences
between these files. Again, type &#8220;make package&#8221; to see all of the
package-related make options.</p>
<hr class="docutils" />
<p id="start-3-3"><a href="#id23"><span class="problematic" id="id24">**</span></a><em>Packages that require extra libraries:</em>**</p>
<p id="start-3-3"><a href="#id17"><span class="problematic" id="id18">**</span></a><em>Packages that require extra libraries:</em>**</p>
<p>A few of the standard and user packages require additional auxiliary
libraries. Many of them are provided with LAMMPS, in which case they
must be compiled first, before LAMMPS is built, if you wish to include
@ -908,7 +908,7 @@ needed soft links. Type &#8220;python install.py&#8221; for further instruction
or settings in the lib/package/Makefile.lammps files are not correct,
the LAMMPS build will typically fail.</p>
<hr class="docutils" />
<p id="start-3-4"><a href="#id25"><span class="problematic" id="id26">**</span></a><em>Packages that require Makefile.machine settings</em>**</p>
<p id="start-3-4"><a href="#id19"><span class="problematic" id="id20">**</span></a><em>Packages that require Makefile.machine settings</em>**</p>
<p>A few packages require specific settings in Makefile.machine, to
either build or use the package effectively. These are the
USER-INTEL, KOKKOS, USER-OMP, and OPT packages, used for accelerating
@ -1081,7 +1081,7 @@ LAMMPS to other codes. See <a class="reference internal" href="Section_python.h
more info on wrapping and running LAMMPS from Python.</p>
<div class="section" id="static-library">
<h3>2.5.1. <strong>Static library:</strong></h3>
<p>To build LAMMPS as a static library (<a href="#id27"><span class="problematic" id="id28">*</span></a>.a file on Linux), type</p>
<p>To build LAMMPS as a static library (*.a file on Linux), type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">foo</span> <span class="n">mode</span><span class="o">=</span><span class="n">lib</span>
</pre></div>
</div>
@ -1095,7 +1095,7 @@ point to the most recently built static library.</p>
</div>
<div class="section" id="shared-library">
<h3>2.5.2. <strong>Shared library:</strong></h3>
<p>To build LAMMPS as a shared library (<a href="#id29"><span class="problematic" id="id30">*</span></a>.so file on Linux), which can be
<p>To build LAMMPS as a shared library (*.so file on Linux), which can be
dynamically loaded, e.g. from Python, type</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">foo</span> <span class="n">mode</span><span class="o">=</span><span class="n">shlib</span>
</pre></div>
@ -1122,18 +1122,18 @@ of the auxiliary library. The build instructions for the library
should tell you how to do this.</p>
<p>Here is an example of such errors when the system FFTW or provided
lib/colvars library have not been built as shared libraries:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
R_X86_64_32 against `.rodata&#39; can not be used when making a shared
<pre class="literal-block">
/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
R_X86_64_32 against '.rodata' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>/usr/bin/ld: ../../lib/colvars/libcolvars.a(colvarmodule.o):
relocation R_X86_64_32 against `__pthread_key_create&#39; can not be used
</pre>
<pre class="literal-block">
/usr/bin/ld: ../../lib/colvars/libcolvars.a(colvarmodule.o):
relocation R_X86_64_32 against '__pthread_key_create' can not be used
when making a shared object; recompile with -fPIC
../../lib/colvars/libcolvars.a: error adding symbols: Bad value
</pre></div>
</div>
</pre>
<p>As an example, here is how to build and install the <a class="reference external" href="http://www-unix.mcs.anl.gov/mpi">MPICH library</a>, a popular open-source version of MPI, distributed by
Argonne National Labs, as a shared library in the default
/usr/local/lib location:</p>
@ -1157,9 +1157,9 @@ current version of the shared library is always available to programs
that use it.</p>
<p>For the csh or tcsh shells, you would add something like this to your
~/.cshrc file:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</pre></div>
</div>
<pre class="literal-block">
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</pre>
</div>
<div class="section" id="calling-the-lammps-library">
<h3>2.5.4. <strong>Calling the LAMMPS library:</strong></h3>
@ -1188,20 +1188,20 @@ interface and how to extend it for your needs.</p>
<span id="start-6"></span><h2>2.6. Running LAMMPS</h2>
<p>By default, LAMMPS runs by reading commands from standard input. Thus
if you run the LAMMPS executable by itself, e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_linux</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_linux
</pre>
<p>it will simply wait, expecting commands from the keyboard. Typically
you should put commands in an input script and use I/O redirection,
e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_linux</span> <span class="o">&lt;</span> <span class="ow">in</span><span class="o">.</span><span class="n">file</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_linux &lt; in.file
</pre>
<p>For parallel environments this should also work. If it does not, use
the &#8216;-in&#8217; command-line switch, e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_linux</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">file</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_linux -in in.file
</pre>
<p><a class="reference internal" href="Section_commands.html"><span class="doc">This section</span></a> describes how input scripts are
structured and what commands they contain.</p>
<p>You can test LAMMPS on any of the sample inputs provided in the
@ -1210,13 +1210,13 @@ outputs are named log.*.name.P where name is a machine and P is the
number of processors it was run on.</p>
<p>Here is how you might run a standard Lennard-Jones benchmark on a
Linux box, using mpirun to launch a parallel job:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">src</span>
<span class="n">make</span> <span class="n">linux</span>
<span class="n">cp</span> <span class="n">lmp_linux</span> <span class="o">../</span><span class="n">bench</span>
<span class="n">cd</span> <span class="o">../</span><span class="n">bench</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">4</span> <span class="n">lmp_linux</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span>
</pre></div>
</div>
<pre class="literal-block">
cd src
make linux
cp lmp_linux ../bench
cd ../bench
mpirun -np 4 lmp_linux -in in.lj
</pre>
<p>See <a class="reference external" href="http://lammps.sandia.gov/bench.html">this page</a> for timings for this and the other benchmarks on
various platforms. Note that some of the example scripts require
LAMMPS to be built with one or more of its optional packages.</p>
@ -1256,7 +1256,7 @@ in.lj&#8221;, replacing in.lj with the name of your LAMMPS input script.</li>
matter what you type).</li>
<li>In this mode, output may not immediately show up on the screen, so if
your input script takes a long time to execute, you may need to be
patient before the output shows up. :l Alternatively, you can still
patient before the output shows up. Alternatively, you can still
use this executable to run on a single processor by typing something
like: &#8220;lmp_win_mpi -in in.lj&#8221;.</li>
</ul>
@ -1309,10 +1309,10 @@ letter abbreviation can be used:</p>
<li>-v or -var</li>
</ul>
<p>For example, lmp_ibm might be launched as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">16</span> <span class="n">lmp_ibm</span> <span class="o">-</span><span class="n">v</span> <span class="n">f</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="o">-</span><span class="n">l</span> <span class="n">my</span><span class="o">.</span><span class="n">log</span> <span class="o">-</span><span class="n">sc</span> <span class="n">none</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">alloy</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">16</span> <span class="n">lmp_ibm</span> <span class="o">-</span><span class="n">var</span> <span class="n">f</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="o">-</span><span class="n">log</span> <span class="n">my</span><span class="o">.</span><span class="n">log</span> <span class="o">-</span><span class="n">screen</span> <span class="n">none</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">alloy</span>
</pre></div>
</div>
<pre class="literal-block">
mpirun -np 16 lmp_ibm -v f tmp.out -l my.log -sc none -in in.alloy
mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none -in in.alloy
</pre>
<p>Here are the details on the options:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">-</span><span class="n">echo</span> <span class="n">style</span>
</pre></div>
@ -1395,11 +1395,11 @@ are intended for computational work like running LAMMPS. By default
Ng = 1 and Ns is not set.</p>
<p>Depending on which flavor of MPI you are running, LAMMPS will look for
one of these 3 environment variables</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">SLURM_LOCALID</span> <span class="p">(</span><span class="n">various</span> <span class="n">MPI</span> <span class="n">variants</span> <span class="n">compiled</span> <span class="k">with</span> <span class="n">SLURM</span> <span class="n">support</span><span class="p">)</span>
<span class="n">MV2_COMM_WORLD_LOCAL_RANK</span> <span class="p">(</span><span class="n">Mvapich</span><span class="p">)</span>
<span class="n">OMPI_COMM_WORLD_LOCAL_RANK</span> <span class="p">(</span><span class="n">OpenMPI</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
SLURM_LOCALID (various MPI variants compiled with SLURM support)
MV2_COMM_WORLD_LOCAL_RANK (Mvapich)
OMPI_COMM_WORLD_LOCAL_RANK (OpenMPI)
</pre>
<p>which are initialized by the &#8220;srun&#8221;, &#8220;mpirun&#8221; or &#8220;mpiexec&#8221; commands.
The environment variable setting for each MPI rank is used to assign a
unique GPU ID to the MPI task.</p>

View File

@ -218,7 +218,7 @@ own sub-directories with their own Makefiles.</p>
<li><a class="reference internal" href="#polybond"><span class="std std-ref">polymer bonding</span></a></li>
<li><span class="xref std std-ref">pymol_asphere</span></li>
<li><a class="reference internal" href="#pythontools"><span class="std std-ref">python</span></a></li>
<li><a class="reference internal" href="#reax"><span class="std std-ref">reax</span></a></li>
<li><a class="reference internal" href="#reax-tool"><span class="std std-ref">reax</span></a></li>
<li><a class="reference internal" href="#restart"><span class="std std-ref">restart2data</span></a></li>
<li><a class="reference internal" href="#vim"><span class="std std-ref">vim</span></a></li>
<li><a class="reference internal" href="#xmgrace"><span class="std std-ref">xmgrace</span></a></li>
@ -289,9 +289,9 @@ at: <a class="reference external" href="https://github.com/colvars/colvars/issue
<p>abf_integrate:</p>
<p>MC-based integration of multidimensional free energy gradient
Version 20110511</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Syntax</span><span class="p">:</span> <span class="o">./</span><span class="n">abf_integrate</span> <span class="o">&lt;</span> <span class="n">filename</span> <span class="o">&gt;</span> <span class="p">[</span><span class="o">-</span><span class="n">n</span> <span class="o">&lt;</span> <span class="n">nsteps</span> <span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span> <span class="o">&lt;</span> <span class="n">temp</span> <span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">m</span> <span class="p">[</span><span class="mi">0</span><span class="o">|</span><span class="mi">1</span><span class="p">]</span> <span class="p">(</span><span class="n">metadynamics</span><span class="p">)]</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span> <span class="o">&lt;</span> <span class="n">hill_height</span> <span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">f</span> <span class="o">&lt;</span> <span class="n">variable_hill_factor</span> <span class="o">&gt;</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
Syntax: ./abf_integrate &lt; filename &gt; [-n &lt; nsteps &gt;] [-t &lt; temp &gt;] [-m [0|1] (metadynamics)] [-h &lt; hill_height &gt;] [-f &lt; variable_hill_factor &gt;]
</pre>
<p>The LAMMPS interface to the colvars collective variable library, as
well as these tools, were created by Axel Kohlmeyer (akohlmey at
gmail.com) at ICTP, Italy.</p>
@ -419,7 +419,7 @@ Greathouse at Sandia (jagreat at sandia.gov).</p>
<div class="section" id="lmp2cfg-tool">
<span id="cfg"></span><h2>9.17. lmp2cfg tool</h2>
<p>The lmp2cfg sub-directory contains a tool for converting LAMMPS output
files into a series of <a href="#id1"><span class="problematic" id="id2">*</span></a>.cfg files which can be read into the
files into a series of *.cfg files which can be read into the
<a class="reference external" href="http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</a> visualizer. See
the README file for more information.</p>
<p>This tool was written by Ara Kooser at Sandia (askoose at sandia.gov).</p>
@ -538,7 +538,7 @@ README for more info on Pizza.py and how to use these scripts.</p>
<hr class="docutils" />
</div>
<div class="section" id="reax-tool">
<span id="reax"></span><h2>9.27. reax tool</h2>
<span id="id4"></span><h2>9.27. reax tool</h2>
<p>The reax sub-directory contains stand-alond codes that can
post-process the output of the <a class="reference internal" href="fix_reax_bonds.html"><span class="doc">fix reax/bonds</span></a>
command from a LAMMPS simulation using <a class="reference internal" href="pair_reax.html"><span class="doc">ReaxFF</span></a>. See

View File

@ -202,11 +202,11 @@ attention to 3 settings in this makefile.</p>
<p>See lib/gpu/Makefile.linux.double for examples of the ARCH settings
for different GPU choices, e.g. Fermi vs Kepler. It also lists the
possible precision settings:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">CUDA_PREC</span> <span class="o">=</span> <span class="o">-</span><span class="n">D_SINGLE_SINGLE</span> <span class="c1"># single precision for all calculations</span>
<span class="n">CUDA_PREC</span> <span class="o">=</span> <span class="o">-</span><span class="n">D_DOUBLE_DOUBLE</span> <span class="c1"># double precision for all calculations</span>
<span class="n">CUDA_PREC</span> <span class="o">=</span> <span class="o">-</span><span class="n">D_SINGLE_DOUBLE</span> <span class="c1"># accumulation of forces, etc, in double</span>
</pre></div>
</div>
<pre class="literal-block">
CUDA_PREC = -D_SINGLE_SINGLE # single precision for all calculations
CUDA_PREC = -D_DOUBLE_DOUBLE # double precision for all calculations
CUDA_PREC = -D_SINGLE_DOUBLE # accumulation of forces, etc, in double
</pre>
<p>The last setting is the mixed mode referred to above. Note that your
GPU must support double precision to use either the 2nd or 3rd of
these settings.</p>
@ -253,11 +253,11 @@ shared by 4 MPI tasks.</p>
which will automatically append &#8220;gpu&#8221; to styles that support it. Use
the &#8220;-pk gpu Ng&#8221; <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switch</span></a> to
set Ng = # of GPUs/node to use.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_machine</span> <span class="o">-</span><span class="n">sf</span> <span class="n">gpu</span> <span class="o">-</span><span class="n">pk</span> <span class="n">gpu</span> <span class="mi">1</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 1 MPI task uses 1 GPU</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">12</span> <span class="n">lmp_machine</span> <span class="o">-</span><span class="n">sf</span> <span class="n">gpu</span> <span class="o">-</span><span class="n">pk</span> <span class="n">gpu</span> <span class="mi">2</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 12 MPI tasks share 2 GPUs on a single 16-core (or whatever) node</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">48</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">12</span> <span class="n">lmp_machine</span> <span class="o">-</span><span class="n">sf</span> <span class="n">gpu</span> <span class="o">-</span><span class="n">pk</span> <span class="n">gpu</span> <span class="mi">2</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># ditto on 4 16-core nodes</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_machine -sf gpu -pk gpu 1 -in in.script # 1 MPI task uses 1 GPU
mpirun -np 12 lmp_machine -sf gpu -pk gpu 2 -in in.script # 12 MPI tasks share 2 GPUs on a single 16-core (or whatever) node
mpirun -np 48 -ppn 12 lmp_machine -sf gpu -pk gpu 2 -in in.script # ditto on 4 16-core nodes
</pre>
<p>Note that if the &#8220;-sf gpu&#8221; switch is used, it also issues a default
<a class="reference internal" href="package.html"><span class="doc">package gpu 1</span></a> command, which sets the number of
GPUs/node to 1.</p>
@ -276,9 +276,9 @@ GPU package pair styles.</p>
and use of multiple MPI tasks/GPU is the same.</p>
<p>Use the <a class="reference internal" href="suffix.html"><span class="doc">suffix gpu</span></a> command, or you can explicitly add an
&#8220;gpu&#8221; suffix to individual styles in your input script, e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">gpu</span> <span class="mf">2.5</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style lj/cut/gpu 2.5
</pre>
<p>You must also use the <a class="reference internal" href="package.html"><span class="doc">package gpu</span></a> command to enable the
GPU package, unless the &#8220;-sf gpu&#8221; or &#8220;-pk gpu&#8221; <a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switches</span></a> were used. It specifies the
number of GPUs/node to use, as well as other options.</p>

View File

@ -268,30 +268,30 @@ this information can normally be obtained with:</p>
</div>
<p>Several example Makefiles for building with the Intel compiler are
included with LAMMPS in the src/MAKE/OPTIONS/ directory:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Makefile</span><span class="o">.</span><span class="n">intel_cpu_intelmpi</span> <span class="c1"># Intel Compiler, Intel MPI, No Offload</span>
<span class="n">Makefile</span><span class="o">.</span><span class="n">knl</span> <span class="c1"># Intel Compiler, Intel MPI, No Offload</span>
<span class="n">Makefile</span><span class="o">.</span><span class="n">intel_cpu_mpich</span> <span class="c1"># Intel Compiler, MPICH, No Offload</span>
<span class="n">Makefile</span><span class="o">.</span><span class="n">intel_cpu_openpmi</span> <span class="c1"># Intel Compiler, OpenMPI, No Offload</span>
<span class="n">Makefile</span><span class="o">.</span><span class="n">intel_coprocessor</span> <span class="c1"># Intel Compiler, Intel MPI, Offload</span>
</pre></div>
</div>
<pre class="literal-block">
Makefile.intel_cpu_intelmpi # Intel Compiler, Intel MPI, No Offload
Makefile.knl # Intel Compiler, Intel MPI, No Offload
Makefile.intel_cpu_mpich # Intel Compiler, MPICH, No Offload
Makefile.intel_cpu_openpmi # Intel Compiler, OpenMPI, No Offload
Makefile.intel_coprocessor # Intel Compiler, Intel MPI, Offload
</pre>
<p>Makefile.knl is identical to Makefile.intel_cpu_intelmpi except that
it explicitly specifies that vectorization should be for Intel
Xeon Phi x200 processors making it easier to cross-compile. For
users with recent installations of Intel Parallel Studio, the
process can be as simple as:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">user</span><span class="o">-</span><span class="n">intel</span>
<span class="n">source</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">intel</span><span class="o">/</span><span class="n">parallel_studio_xe_2016</span><span class="o">.</span><span class="mf">3.067</span><span class="o">/</span><span class="n">psxevars</span><span class="o">.</span><span class="n">sh</span>
<span class="c1"># or psxevars.csh for C-shell</span>
<span class="n">make</span> <span class="n">intel_cpu_intelmpi</span>
</pre></div>
</div>
<pre class="literal-block">
make yes-user-intel
source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh
# or psxevars.csh for C-shell
make intel_cpu_intelmpi
</pre>
<p>Alternatively, the build can be accomplished with the src/Make.py
script, described in <a class="reference internal" href="Section_start.html#start-4"><span class="std std-ref">Section 2.4</span></a> of the
manual. Type &#8220;Make.py -h&#8221; for help. For an example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">v</span> <span class="o">-</span><span class="n">p</span> <span class="n">intel</span> <span class="n">omp</span> <span class="o">-</span><span class="n">intel</span> <span class="n">cpu</span> <span class="o">-</span><span class="n">a</span> <span class="n">file</span> <span class="n">intel_cpu_intelmpi</span>
</pre></div>
</div>
<pre class="literal-block">
Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi
</pre>
<p>Note that if you build with support for a Phi coprocessor, the same
binary can be used on nodes with or without coprocessors installed.
However, if you do not have coprocessors on your system, building
@ -385,10 +385,10 @@ set the number of OpenMP threads via the OMP_NUM_THREADS environment
variable if desired.</p>
<p>Examples (see documentation for your MPI/Machine for differences in
launching MPI applications):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">72</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">36</span> <span class="n">lmp_machine</span> <span class="o">-</span><span class="n">sf</span> <span class="n">intel</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 2 nodes, 36 MPI tasks/node, $OMP_NUM_THREADS OpenMP Threads</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">72</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">36</span> <span class="n">lmp_machine</span> <span class="o">-</span><span class="n">sf</span> <span class="n">intel</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="o">-</span><span class="n">pk</span> <span class="n">intel</span> <span class="mi">0</span> <span class="n">omp</span> <span class="mi">2</span> <span class="n">mode</span> <span class="n">double</span> <span class="c1"># Don&#39;t use any coprocessors that might be available, use 2 OpenMP threads for each task, use double precision</span>
</pre></div>
</div>
<pre class="literal-block">
mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script # 2 nodes, 36 MPI tasks/node, $OMP_NUM_THREADS OpenMP Threads
mpirun -np 72 -ppn 36 lmp_machine -sf intel -in in.script -pk intel 0 omp 2 mode double # Don't use any coprocessors that might be available, use 2 OpenMP threads for each task, use double precision
</pre>
<p><strong>Or run with the USER-INTEL package by editing an input script:</strong></p>
<p>As an alternative to adding command-line arguments, the input script
can be edited to enable the USER-INTEL package. This requires adding
@ -399,9 +399,9 @@ script. For the second example above, this would be:</p>
</div>
<p>To enable the USER-INTEL package only for individual styles, you can
add an &#8220;intel&#8221; suffix to the individual style, e.g.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">intel</span> <span class="mf">2.5</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style lj/cut/intel 2.5
</pre>
<p>Alternatively, the <a class="reference internal" href="suffix.html"><span class="doc">suffix intel</span></a> command can be added to
the input script to enable USER-INTEL styles for the commands that
follow in the input script.</p>

View File

@ -166,19 +166,19 @@ produce an executable compatible with specific hardware.</p>
<p>Here is a quick overview of how to use the KOKKOS package
for CPU acceleration, assuming one or more 16-core nodes.
More details follow.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">use</span> <span class="n">a</span> <span class="n">C</span><span class="o">++</span><span class="mi">11</span> <span class="n">compatible</span> <span class="n">compiler</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">mpi</span> <span class="n">KOKKOS_DEVICES</span><span class="o">=</span><span class="n">OpenMP</span> <span class="c1"># build with the KOKKOS package</span>
<span class="n">make</span> <span class="n">kokkos_omp</span> <span class="c1"># or Makefile.kokkos_omp already has variable set</span>
<span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">v</span> <span class="o">-</span><span class="n">p</span> <span class="n">kokkos</span> <span class="o">-</span><span class="n">kokkos</span> <span class="n">omp</span> <span class="o">-</span><span class="n">o</span> <span class="n">mpi</span> <span class="o">-</span><span class="n">a</span> <span class="n">file</span> <span class="n">mpi</span> <span class="c1"># or one-line build via Make.py</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">16</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 1 node, 16 MPI tasks/node, no threads</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">2</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">1</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">16</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 2 nodes, 1 MPI task/node, 16 threads/task</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">2</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">8</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 1 node, 2 MPI tasks/node, 8 threads/task</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">32</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">4</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">4</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 8 nodes, 4 MPI tasks/node, 4 threads/task</span>
</pre></div>
</div>
<pre class="literal-block">
use a C++11 compatible compiler
make yes-kokkos
make mpi KOKKOS_DEVICES=OpenMP # build with the KOKKOS package
make kokkos_omp # or Makefile.kokkos_omp already has variable set
Make.py -v -p kokkos -kokkos omp -o mpi -a file mpi # or one-line build via Make.py
</pre>
<pre class="literal-block">
mpirun -np 16 lmp_mpi -k on -sf kk -in in.lj # 1 node, 16 MPI tasks/node, no threads
mpirun -np 2 -ppn 1 lmp_mpi -k on t 16 -sf kk -in in.lj # 2 nodes, 1 MPI task/node, 16 threads/task
mpirun -np 2 lmp_mpi -k on t 8 -sf kk -in in.lj # 1 node, 2 MPI tasks/node, 8 threads/task
mpirun -np 32 -ppn 4 lmp_mpi -k on t 4 -sf kk -in in.lj # 8 nodes, 4 MPI tasks/node, 4 threads/task
</pre>
<ul class="simple">
<li>specify variables and settings in your Makefile.machine that enable OpenMP, GPU, or Phi support</li>
<li>include the KOKKOS package and build LAMMPS</li>
@ -188,39 +188,39 @@ More details follow.</p>
assuming one or more nodes, each with 16 cores and a GPU. More
details follow.</p>
<p>discuss use of NVCC, which Makefiles to examine</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">use</span> <span class="n">a</span> <span class="n">C</span><span class="o">++</span><span class="mi">11</span> <span class="n">compatible</span> <span class="n">compiler</span>
<span class="n">KOKKOS_DEVICES</span> <span class="o">=</span> <span class="n">Cuda</span><span class="p">,</span> <span class="n">OpenMP</span>
<span class="n">KOKKOS_ARCH</span> <span class="o">=</span> <span class="n">Kepler35</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">machine</span>
<span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="n">kokkos</span> <span class="o">-</span><span class="n">kokkos</span> <span class="n">cuda</span> <span class="n">arch</span><span class="o">=</span><span class="mi">31</span> <span class="o">-</span><span class="n">o</span> <span class="n">kokkos_cuda</span> <span class="o">-</span><span class="n">a</span> <span class="n">file</span> <span class="n">kokkos_cuda</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">1</span> <span class="n">lmp_cuda</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">6</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># one MPI task, 6 threads on CPU</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">4</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">1</span> <span class="n">lmp_cuda</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">6</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># ditto on 4 nodes</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">2</span> <span class="n">lmp_cuda</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">8</span> <span class="n">g</span> <span class="mi">2</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># two MPI tasks, 8 threads per CPU</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">32</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">2</span> <span class="n">lmp_cuda</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">8</span> <span class="n">g</span> <span class="mi">2</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># ditto on 16 nodes</span>
</pre></div>
</div>
<pre class="literal-block">
use a C++11 compatible compiler
KOKKOS_DEVICES = Cuda, OpenMP
KOKKOS_ARCH = Kepler35
make yes-kokkos
make machine
Make.py -p kokkos -kokkos cuda arch=31 -o kokkos_cuda -a file kokkos_cuda
</pre>
<pre class="literal-block">
mpirun -np 1 lmp_cuda -k on t 6 -sf kk -in in.lj # one MPI task, 6 threads on CPU
mpirun -np 4 -ppn 1 lmp_cuda -k on t 6 -sf kk -in in.lj # ditto on 4 nodes
</pre>
<pre class="literal-block">
mpirun -np 2 lmp_cuda -k on t 8 g 2 -sf kk -in in.lj # two MPI tasks, 8 threads per CPU
mpirun -np 32 -ppn 2 lmp_cuda -k on t 8 g 2 -sf kk -in in.lj # ditto on 16 nodes
</pre>
<p>Here is a quick overview of how to use the KOKKOS package
for the Intel Phi:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">use</span> <span class="n">a</span> <span class="n">C</span><span class="o">++</span><span class="mi">11</span> <span class="n">compatible</span> <span class="n">compiler</span>
<span class="n">KOKKOS_DEVICES</span> <span class="o">=</span> <span class="n">OpenMP</span>
<span class="n">KOKKOS_ARCH</span> <span class="o">=</span> <span class="n">KNC</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">machine</span>
<span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">p</span> <span class="n">kokkos</span> <span class="o">-</span><span class="n">kokkos</span> <span class="n">phi</span> <span class="o">-</span><span class="n">o</span> <span class="n">kokkos_phi</span> <span class="o">-</span><span class="n">a</span> <span class="n">file</span> <span class="n">mpi</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">host</span><span class="o">=</span><span class="n">MIC</span><span class="p">,</span> <span class="n">Intel</span> <span class="n">Phi</span> <span class="k">with</span> <span class="mi">61</span> <span class="n">cores</span> <span class="p">(</span><span class="mi">240</span> <span class="n">threads</span><span class="o">/</span><span class="n">phi</span> <span class="n">via</span> <span class="mi">4</span><span class="n">x</span> <span class="n">hardware</span> <span class="n">threading</span><span class="p">):</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">1</span> <span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">240</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 1 MPI task on 1 Phi, 1*240 = 240</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">30</span> <span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">8</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 30 MPI tasks on 1 Phi, 30*8 = 240</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">12</span> <span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">20</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># 12 MPI tasks on 1 Phi, 12*20 = 240</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">96</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">12</span> <span class="n">lmp_g</span><span class="o">++</span> <span class="o">-</span><span class="n">k</span> <span class="n">on</span> <span class="n">t</span> <span class="mi">20</span> <span class="o">-</span><span class="n">sf</span> <span class="n">kk</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">lj</span> <span class="c1"># ditto on 8 Phis</span>
</pre></div>
</div>
<pre class="literal-block">
use a C++11 compatible compiler
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = KNC
make yes-kokkos
make machine
Make.py -p kokkos -kokkos phi -o kokkos_phi -a file mpi
</pre>
<pre class="literal-block">
host=MIC, Intel Phi with 61 cores (240 threads/phi via 4x hardware threading):
mpirun -np 1 lmp_g++ -k on t 240 -sf kk -in in.lj # 1 MPI task on 1 Phi, 1*240 = 240
mpirun -np 30 lmp_g++ -k on t 8 -sf kk -in in.lj # 30 MPI tasks on 1 Phi, 30*8 = 240
mpirun -np 12 lmp_g++ -k on t 20 -sf kk -in in.lj # 12 MPI tasks on 1 Phi, 12*20 = 240
mpirun -np 96 -ppn 12 lmp_g++ -k on t 20 -sf kk -in in.lj # ditto on 8 Phis
</pre>
<p><strong>Required hardware/software:</strong></p>
<p>Kokkos support within LAMMPS must be built with a C++11 compatible
compiler. If using gcc, version 4.8.1 or later is required.</p>
@ -257,40 +257,40 @@ respectively. Or the effect of the &#8220;-pk&#8221; or &#8220;-sf&#8221; switc
duplicated by adding the <a class="reference internal" href="package.html"><span class="doc">package kokkos</span></a> or <a class="reference internal" href="suffix.html"><span class="doc">suffix kk</span></a> commands respectively to your input script.</p>
<p>Or you can follow these steps:</p>
<p>CPU-only (run all-MPI or with OpenMP threading):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">lammps</span><span class="o">/</span><span class="n">src</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">g</span><span class="o">++</span> <span class="n">KOKKOS_DEVICES</span><span class="o">=</span><span class="n">OpenMP</span>
</pre></div>
</div>
<pre class="literal-block">
cd lammps/src
make yes-kokkos
make g++ KOKKOS_DEVICES=OpenMP
</pre>
<p>Intel Xeon Phi:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">lammps</span><span class="o">/</span><span class="n">src</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">g</span><span class="o">++</span> <span class="n">KOKKOS_DEVICES</span><span class="o">=</span><span class="n">OpenMP</span> <span class="n">KOKKOS_ARCH</span><span class="o">=</span><span class="n">KNC</span>
</pre></div>
</div>
<pre class="literal-block">
cd lammps/src
make yes-kokkos
make g++ KOKKOS_DEVICES=OpenMP KOKKOS_ARCH=KNC
</pre>
<p>CPUs and GPUs:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">lammps</span><span class="o">/</span><span class="n">src</span>
<span class="n">make</span> <span class="n">yes</span><span class="o">-</span><span class="n">kokkos</span>
<span class="n">make</span> <span class="n">cuda</span> <span class="n">KOKKOS_DEVICES</span><span class="o">=</span><span class="n">Cuda</span>
</pre></div>
</div>
<pre class="literal-block">
cd lammps/src
make yes-kokkos
make cuda KOKKOS_DEVICES=Cuda
</pre>
<p>These examples set the KOKKOS-specific OMP, MIC, CUDA variables on the
make command line which requires a GNU-compatible make command. Try
&#8220;gmake&#8221; if your system&#8217;s standard make complains.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you build using make line variables and re-build LAMMPS twice
with different KOKKOS options and the <em>same</em> target, e.g. g++ in the
first two examples above, then you <em>must</em> perform a &#8220;make clean-all&#8221;
with different KOKKOS options and the *same* target, e.g. g++ in the
first two examples above, then you *must* perform a &#8220;make clean-all&#8221;
or &#8220;make clean-machine&#8221; before each build. This is to force all the
KOKKOS-dependent files to be re-compiled with the new options.</p>
</div>
<p>You can also hardwire these make variables in the specified machine
makefile, e.g. src/MAKE/Makefile.g++ in the first two examples above,
with a line like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">KOKKOS_ARCH</span> <span class="o">=</span> <span class="n">KNC</span>
</pre></div>
</div>
<pre class="literal-block">
KOKKOS_ARCH = KNC
</pre>
<p>Note that if you build LAMMPS multiple times in this manner, using
different KOKKOS options (defined in different machine makefiles), you
do not have to worry about doing a &#8220;clean&#8221; in between. This is
@ -342,7 +342,7 @@ with compute capability 3.x. For the LINK setting, &#8220;nvcc&#8221; should no
be used; instead use g++ or another compiler suitable for linking C++
applications. Often you will want to use your MPI compiler wrapper
for this setting (i.e. mpicxx). Finally, the lo-level Makefile must
also have a &#8220;Compilation rule&#8221; for creating <a href="#id1"><span class="problematic" id="id2">*</span></a>.o files from <a href="#id3"><span class="problematic" id="id4">*</span></a>.cu files.
also have a &#8220;Compilation rule&#8221; for creating *.o files from *.cu files.
See src/Makefile.cuda for an example of a lo-level Makefile with all
of these settings.</p>
<p>KOKKOS_USE_TPLS=hwloc binds threads to hardware cores, so they do not
@ -430,9 +430,9 @@ specify its additional arguments for hardware options appopriate to
your system, as documented above.</p>
<p>Use the <a class="reference internal" href="suffix.html"><span class="doc">suffix kk</span></a> command, or you can explicitly add a
&#8220;kk&#8221; suffix to individual styles in your input script, e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">kk</span> <span class="mf">2.5</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style lj/cut/kk 2.5
</pre>
<p>You only need to use the <a class="reference internal" href="package.html"><span class="doc">package kokkos</span></a> command if you
wish to change any of its option defaults, as set by the &#8220;-k on&#8221;
<a class="reference internal" href="Section_start.html#start-7"><span class="std std-ref">command-line switch</span></a>.</p>
@ -483,10 +483,10 @@ performance to bind both MPI tasks to physical cores, and threads to
physical cores, so they do not migrate during a simulation.</p>
<p>If you are not certain MPI tasks are being bound (check the defaults
for your MPI installation), binding can be forced with these flags:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">OpenMPI</span> <span class="mf">1.8</span><span class="p">:</span> <span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">2</span> <span class="o">-</span><span class="n">bind</span><span class="o">-</span><span class="n">to</span> <span class="n">socket</span> <span class="o">-</span><span class="nb">map</span><span class="o">-</span><span class="n">by</span> <span class="n">socket</span> <span class="o">./</span><span class="n">lmp_openmpi</span> <span class="o">...</span>
<span class="n">Mvapich2</span> <span class="mf">2.0</span><span class="p">:</span> <span class="n">mpiexec</span> <span class="o">-</span><span class="n">np</span> <span class="mi">2</span> <span class="o">-</span><span class="n">bind</span><span class="o">-</span><span class="n">to</span> <span class="n">socket</span> <span class="o">-</span><span class="nb">map</span><span class="o">-</span><span class="n">by</span> <span class="n">socket</span> <span class="o">./</span><span class="n">lmp_mvapich</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
OpenMPI 1.8: mpirun -np 2 -bind-to socket -map-by socket ./lmp_openmpi ...
Mvapich2 2.0: mpiexec -np 2 -bind-to socket -map-by socket ./lmp_mvapich ...
</pre>
<p>For binding threads with the KOKKOS OMP option, use thread affinity
environment variables to force binding. With OpenMP 3.1 (gcc 4.7 or
later, intel 12 or later) setting the environment variable

View File

@ -141,11 +141,11 @@ one or more 16-core nodes. More details follow.</p>
<span class="n">Make</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">v</span> <span class="o">-</span><span class="n">p</span> <span class="n">omp</span> <span class="o">-</span><span class="n">o</span> <span class="n">mpi</span> <span class="o">-</span><span class="n">a</span> <span class="n">file</span> <span class="n">mpi</span> <span class="c1"># or one-line build via Make.py</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">sf</span> <span class="n">omp</span> <span class="o">-</span><span class="n">pk</span> <span class="n">omp</span> <span class="mi">16</span> <span class="o">&lt;</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 1 MPI task, 16 threads</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">4</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">sf</span> <span class="n">omp</span> <span class="o">-</span><span class="n">pk</span> <span class="n">omp</span> <span class="mi">4</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 4 MPI tasks, 4 threads/task</span>
<span class="n">mpirun</span> <span class="o">-</span><span class="n">np</span> <span class="mi">32</span> <span class="o">-</span><span class="n">ppn</span> <span class="mi">4</span> <span class="n">lmp_mpi</span> <span class="o">-</span><span class="n">sf</span> <span class="n">omp</span> <span class="o">-</span><span class="n">pk</span> <span class="n">omp</span> <span class="mi">4</span> <span class="o">-</span><span class="ow">in</span> <span class="ow">in</span><span class="o">.</span><span class="n">script</span> <span class="c1"># 8 nodes, 4 MPI tasks/node, 4 threads/task</span>
</pre></div>
</div>
<pre class="literal-block">
lmp_mpi -sf omp -pk omp 16 &lt; in.script # 1 MPI task, 16 threads
mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script # 4 MPI tasks, 4 threads/task
mpirun -np 32 -ppn 4 lmp_mpi -sf omp -pk omp 4 -in in.script # 8 nodes, 4 MPI tasks/node, 4 threads/task
</pre>
<p><strong>Required hardware/software:</strong></p>
<p>Your compiler must support the OpenMP interface. You should have one
or more multi-core CPUs so that multiple threads can be launched by
@ -184,9 +184,9 @@ threads via the OMP_NUM_THREADS environment variable.</p>
and threads/MPI task is the same.</p>
<p>Use the <a class="reference internal" href="suffix.html"><span class="doc">suffix omp</span></a> command, or you can explicitly add an
&#8220;omp&#8221; suffix to individual styles in your input script, e.g.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">omp</span> <span class="mf">2.5</span>
</pre></div>
</div>
<pre class="literal-block">
pair_style lj/cut/omp 2.5
</pre>
<p>You must also use the <a class="reference internal" href="package.html"><span class="doc">package omp</span></a> command to enable the
USER-OMP package. When you do this you also specify how many threads
per MPI task to use. The command doc page explains other options and

View File

@ -137,16 +137,16 @@
<h1>angle_style charmm/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">charmm</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style charmm
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">charmm</span>
<span class="n">angle_coeff</span> <span class="mi">1</span> <span class="mf">300.0</span> <span class="mf">107.0</span> <span class="mf">50.0</span> <span class="mf">3.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style charmm
angle_coeff 1 300.0 107.0 50.0 3.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,18 +131,18 @@
<h1>angle_style class2/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">class2</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style class2
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">class2</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="mf">75.0</span>
<span class="n">angle_coeff</span> <span class="mi">1</span> <span class="n">bb</span> <span class="mf">10.5872</span> <span class="mf">1.0119</span> <span class="mf">1.5228</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="n">ba</span> <span class="mf">3.6551</span> <span class="mf">24.895</span> <span class="mf">1.0119</span> <span class="mf">1.5228</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style class2
angle_coeff * 75.0
angle_coeff 1 bb 10.5872 1.0119 1.5228
angle_coeff * ba 3.6551 24.895 1.0119 1.5228
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="mf">75.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine
angle_coeff * 75.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/delta/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">delta</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/delta
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">delta</span>
<span class="n">angle_coeff</span> <span class="mi">2</span><span class="o">*</span><span class="mi">4</span> <span class="mf">75.0</span> <span class="mf">100.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/delta
angle_coeff 2*4 75.0 100.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/periodic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">periodic</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/periodic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">periodic</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="mf">75.0</span> <span class="mi">1</span> <span class="mi">6</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/periodic
angle_coeff * 75.0 1 6
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/shift/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/shift
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="mf">10.0</span> <span class="mf">45.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/shift
angle_coeff * 10.0 45.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/shift/exp/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">exp</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/shift/exp
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">exp</span>
<span class="n">angle_coeff</span> <span class="o">*</span> <span class="mf">10.0</span> <span class="mf">45.0</span> <span class="mf">2.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/shift/exp
angle_coeff * 10.0 45.0 2.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style cosine/squared/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">squared</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/squared
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">squared</span>
<span class="n">angle_coeff</span> <span class="mi">2</span><span class="o">*</span><span class="mi">4</span> <span class="mf">75.0</span> <span class="mf">100.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style cosine/squared
angle_coeff 2*4 75.0 100.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style dipole/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">dipole</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style dipole
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">dipole</span>
<span class="n">angle_coeff</span> <span class="mi">6</span> <span class="mf">2.1</span> <span class="mf">180.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style dipole
angle_coeff 6 2.1 180.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,9 +131,9 @@
<h1>angle_style fourier/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">fourier</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style fourier
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>

View File

@ -131,9 +131,9 @@
<h1>angle_style fourier/simple/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">fourier</span><span class="o">/</span><span class="n">simple</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style fourier/simple
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>

View File

@ -137,16 +137,16 @@
<h1>angle_style harmonic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">harmonic</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style harmonic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">harmonic</span>
<span class="n">angle_coeff</span> <span class="mi">1</span> <span class="mf">300.0</span> <span class="mf">107.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style harmonic
angle_coeff 1 300.0 107.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>angle_style quartic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">quartic</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style quartic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">quartic</span>
<span class="n">angle_coeff</span> <span class="mi">1</span> <span class="mf">129.1948</span> <span class="mf">56.8726</span> <span class="o">-</span><span class="mf">25.9442</span> <span class="o">-</span><span class="mf">14.2221</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style quartic
angle_coeff 1 129.1948 56.8726 -25.9442 -14.2221
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -128,19 +128,19 @@
<span id="index-0"></span><h1>angle_style sdk command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">sdk</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">sdk</span><span class="o">/</span><span class="n">omp</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style sdk
</pre>
<pre class="literal-block">
angle_style sdk/omp
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">angle_style</span> <span class="n">sdk</span>
<span class="n">angle_coeff</span> <span class="mi">1</span> <span class="mf">300.0</span> <span class="mf">107.0</span>
</pre></div>
</div>
<pre class="literal-block">
angle_style sdk
angle_coeff 1 300.0 107.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>atom_modify command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_modify</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
atom_modify keyword values ...
</pre>
<ul class="simple">
<li>one or more keyword/value pairs may be appended</li>
<li>keyword = <em>id</em> or <em>map</em> or <em>first</em> or <em>sort</em></li>
@ -146,11 +146,11 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_modify</span> <span class="nb">map</span> <span class="nb">hash</span>
<span class="n">atom_modify</span> <span class="nb">map</span> <span class="n">array</span> <span class="n">sort</span> <span class="mi">10000</span> <span class="mf">2.0</span>
<span class="n">atom_modify</span> <span class="n">first</span> <span class="n">colloid</span>
</pre></div>
</div>
<pre class="literal-block">
atom_modify map hash
atom_modify map array sort 10000 2.0
atom_modify first colloid
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>atom_style command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_style</span> <span class="n">style</span> <span class="n">args</span>
</pre></div>
</div>
<pre class="literal-block">
atom_style style args
</pre>
<ul class="simple">
<li>style = <em>angle</em> or <em>atomic</em> or <em>body</em> or <em>bond</em> or <em>charge</em> or <em>dipole</em> or <em>dpd</em> or <em>electron</em> or <em>ellipsoid</em> or <em>full</em> or <em>line</em> or <em>meso</em> or <em>molecular</em> or <em>peri</em> or <em>smd</em> or <em>sphere</em> or <em>tri</em> or <em>template</em> or <em>hybrid</em></li>
</ul>
@ -150,15 +150,15 @@ args = none for any style except the following
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_style</span> <span class="n">atomic</span>
<span class="n">atom_style</span> <span class="n">bond</span>
<span class="n">atom_style</span> <span class="n">full</span>
<span class="n">atom_style</span> <span class="n">body</span> <span class="n">nparticle</span> <span class="mi">2</span> <span class="mi">10</span>
<span class="n">atom_style</span> <span class="n">hybrid</span> <span class="n">charge</span> <span class="n">bond</span>
<span class="n">atom_style</span> <span class="n">hybrid</span> <span class="n">charge</span> <span class="n">body</span> <span class="n">nparticle</span> <span class="mi">2</span> <span class="mi">5</span>
<span class="n">atom_style</span> <span class="n">template</span> <span class="n">myMols</span>
</pre></div>
</div>
<pre class="literal-block">
atom_style atomic
atom_style bond
atom_style full
atom_style body nparticle 2 10
atom_style hybrid charge bond
atom_style hybrid charge body nparticle 2 5
atom_style template myMols
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -247,11 +247,11 @@ mentioned above, the <a class="reference internal" href="fix_rigid.html"><span c
duplicates its functionality.</p>
<p>The atom_style body command for this body style takes two additional
arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_style</span> <span class="n">body</span> <span class="n">nparticle</span> <span class="n">Nmin</span> <span class="n">Nmax</span>
<span class="n">Nmin</span> <span class="o">=</span> <span class="n">minimum</span> <span class="c1"># of sub-particles in any body in the system</span>
<span class="n">Nmax</span> <span class="o">=</span> <span class="n">maximum</span> <span class="c1"># of sub-particles in any body in the system</span>
</pre></div>
</div>
<pre class="literal-block">
atom_style body nparticle Nmin Nmax
Nmin = minimum # of sub-particles in any body in the system
Nmax = maximum # of sub-particles in any body in the system
</pre>
<p>The Nmin and Nmax arguments are used to bound the size of data
structures used internally by each particle.</p>
<p>When the <a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a> command reads a data file for this
@ -313,11 +313,11 @@ used for 2d models. One example use of this body style is for 2d
discrete element models, as described in <a class="reference internal" href="#fraige"><span class="std std-ref">Fraige</span></a>. Similar to
body style <em>nparticle</em>, the atom_style body command for this body
style takes two additional arguments:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">atom_style</span> <span class="n">body</span> <span class="n">rounded</span><span class="o">/</span><span class="n">polygon</span> <span class="n">Nmin</span> <span class="n">Nmax</span>
<span class="n">Nmin</span> <span class="o">=</span> <span class="n">minimum</span> <span class="c1"># of vertices in any body in the system</span>
<span class="n">Nmax</span> <span class="o">=</span> <span class="n">maximum</span> <span class="c1"># of vertices in any body in the system</span>
</pre></div>
</div>
<pre class="literal-block">
atom_style body rounded/polygon Nmin Nmax
Nmin = minimum # of vertices in any body in the system
Nmax = maximum # of vertices in any body in the system
</pre>
<p>The Nmin and Nmax arguments are used to bound the size of data
structures used internally by each particle.</p>
<p>When the <a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a> command reads a data file for this

View File

@ -131,16 +131,16 @@
<h1>bond_style class2/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">class2</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style class2
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">class2</span>
<span class="n">bond_coeff</span> <span class="mi">1</span> <span class="mf">1.0</span> <span class="mf">100.0</span> <span class="mf">80.0</span> <span class="mf">80.0</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style class2
bond_coeff 1 1.0 100.0 80.0 80.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -137,16 +137,16 @@
<h1>bond_style fene/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">fene</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style fene
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">fene</span>
<span class="n">bond_coeff</span> <span class="mi">1</span> <span class="mf">30.0</span> <span class="mf">1.5</span> <span class="mf">1.0</span> <span class="mf">1.0</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style fene
bond_coeff 1 30.0 1.5 1.0 1.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style fene/expand/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">fene</span><span class="o">/</span><span class="n">expand</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style fene/expand
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">fene</span><span class="o">/</span><span class="n">expand</span>
<span class="n">bond_coeff</span> <span class="mi">1</span> <span class="mf">30.0</span> <span class="mf">1.5</span> <span class="mf">1.0</span> <span class="mf">1.0</span> <span class="mf">0.5</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style fene/expand
bond_coeff 1 30.0 1.5 1.0 1.0 0.5
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -137,16 +137,16 @@
<h1>bond_style harmonic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span>
<span class="n">bond_coeff</span> <span class="mi">5</span> <span class="mf">80.0</span> <span class="mf">1.2</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic
bond_coeff 5 80.0 1.2
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style harmonic/shift/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span><span class="o">/</span><span class="n">shift</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic/shift
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span><span class="o">/</span><span class="n">shift</span>
<span class="n">bond_coeff</span> <span class="mi">5</span> <span class="mf">10.0</span> <span class="mf">0.5</span> <span class="mf">1.0</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic/shift
bond_coeff 5 10.0 0.5 1.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style harmonic/shift/cut/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">cut</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic/shift/cut
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">harmonic</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">cut</span>
<span class="n">bond_coeff</span> <span class="mi">5</span> <span class="mf">10.0</span> <span class="mf">0.5</span> <span class="mf">1.0</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style harmonic/shift/cut
bond_coeff 5 10.0 0.5 1.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style morse/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">morse</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style morse
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">morse</span>
<span class="n">bond_coeff</span> <span class="mi">5</span> <span class="mf">1.0</span> <span class="mf">2.0</span> <span class="mf">1.2</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style morse
bond_coeff 5 1.0 2.0 1.2
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style nonlinear/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">nonlinear</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style nonlinear
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">nonlinear</span>
<span class="n">bond_coeff</span> <span class="mi">2</span> <span class="mf">100.0</span> <span class="mf">1.1</span> <span class="mf">1.4</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style nonlinear
bond_coeff 2 100.0 1.1 1.4
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>bond_style quartic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">quartic</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style quartic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bond_style</span> <span class="n">quartic</span>
<span class="n">bond_coeff</span> <span class="mi">2</span> <span class="mi">1200</span> <span class="o">-</span><span class="mf">0.55</span> <span class="mf">0.25</span> <span class="mf">1.3</span> <span class="mf">34.6878</span>
</pre></div>
</div>
<pre class="literal-block">
bond_style quartic
bond_coeff 2 1200 -0.55 0.25 1.3 34.6878
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -184,10 +184,10 @@ to 1,1,1, as indicated as a restriction below.</p>
<p>Note that when bonds are dumped to a file via the <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a> command, bonds with type 0 are not included. The
<a class="reference internal" href="delete_bonds.html"><span class="doc">delete_bonds</span></a> command can also be used to query the
status of broken bonds or permanently delete them, e.g.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">delete_bonds</span> <span class="nb">all</span> <span class="n">stats</span>
<span class="n">delete_bonds</span> <span class="nb">all</span> <span class="n">bond</span> <span class="mi">0</span> <span class="n">remove</span>
</pre></div>
</div>
<pre class="literal-block">
delete_bonds all stats
delete_bonds all bond 0 remove
</pre>
<hr class="docutils" />
<p>Styles with a <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> suffix are
functionally the same as the corresponding style without the suffix.

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>change_box command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">parameter</span> <span class="n">args</span> <span class="o">...</span> <span class="n">keyword</span> <span class="n">args</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
change_box group-ID parameter args ... keyword args ...
</pre>
<ul class="simple">
<li>group-ID = ID of group of atoms to (optionally) displace</li>
<li>one or more parameter/arg pairs may be appended</li>
@ -175,10 +175,10 @@ parameter = <em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>xz</em>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">xy</span> <span class="n">final</span> <span class="o">-</span><span class="mf">2.0</span> <span class="n">z</span> <span class="n">final</span> <span class="mf">0.0</span> <span class="mf">5.0</span> <span class="n">boundary</span> <span class="n">p</span> <span class="n">p</span> <span class="n">f</span> <span class="n">remap</span> <span class="n">units</span> <span class="n">box</span>
<span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">scale</span> <span class="mf">1.1</span> <span class="n">y</span> <span class="n">volume</span> <span class="n">z</span> <span class="n">volume</span> <span class="n">remap</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all xy final -2.0 z final 0.0 5.0 boundary p p f remap units box
change_box all x scale 1.1 y volume z volume remap
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -223,15 +223,15 @@ will be re-shrink-wrapped before the change_box command completes.
Instead you could do something like this, assuming the simulation box
is non-periodic and atoms extend from 0 to 20 in all dimensions:</p>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">final</span> <span class="o">-</span><span class="mi">10</span> <span class="mi">20</span>
<span class="n">create_atoms</span> <span class="mi">1</span> <span class="n">single</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">5</span> <span class="c1"># this will fail to insert an atom</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">final</span> <span class="o">-</span><span class="mi">10</span> <span class="mi">20</span> <span class="n">boundary</span> <span class="n">f</span> <span class="n">s</span> <span class="n">s</span>
<span class="n">create_atoms</span> <span class="mi">1</span> <span class="n">single</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">5</span>
<span class="n">change_box</span> <span class="n">boundary</span> <span class="n">s</span> <span class="n">s</span> <span class="n">s</span> <span class="c1"># this will work</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all x final -10 20
create_atoms 1 single -5 5 5 # this will fail to insert an atom
</pre>
<pre class="literal-block">
change_box all x final -10 20 boundary f s s
create_atoms 1 single -5 5 5
change_box boundary s s s # this will work
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Unlike the earlier &#8220;displace_box&#8221; version of this command, atom
@ -295,30 +295,30 @@ used following a keyword that changed the volume, which is any of the
<em>x</em>, <em>y</em>, <em>z</em> keywords. If the preceding keyword &#8220;key&#8221; had a <em>volume</em>
style, then both it and the current keyword apply to the keyword
preceding &#8220;key&#8221;. I.e. this sequence of keywords is allowed:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">scale</span> <span class="mf">1.1</span> <span class="n">y</span> <span class="n">volume</span> <span class="n">z</span> <span class="n">volume</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all x scale 1.1 y volume z volume
</pre>
<p>The <em>volume</em> style changes the associated dimension so that the
overall box volume is unchanged relative to its value before the
preceding keyword was invoked.</p>
<p>If the following command is used, then the z box length will shrink by
the same 1.1 factor the x box length was increased by:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">scale</span> <span class="mf">1.1</span> <span class="n">z</span> <span class="n">volume</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all x scale 1.1 z volume
</pre>
<p>If the following command is used, then the y,z box lengths will each
shrink by sqrt(1.1) to keep the volume constant. In this case, the
y,z box lengths shrink so as to keep their relative aspect ratio
constant:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span><span class="s2">&quot;x scale 1.1 y volume z volume</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all&quot;x scale 1.1 y volume z volume
</pre>
<p>If the following command is used, then the final box will be a factor
of 10% larger in x and y, and a factor of 21% smaller in z, so as to
keep the volume constant:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">change_box</span> <span class="nb">all</span> <span class="n">x</span> <span class="n">scale</span> <span class="mf">1.1</span> <span class="n">z</span> <span class="n">volume</span> <span class="n">y</span> <span class="n">scale</span> <span class="mf">1.1</span> <span class="n">z</span> <span class="n">volume</span>
</pre></div>
</div>
<pre class="literal-block">
change_box all x scale 1.1 z volume y scale 1.1 z volume
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For solids or liquids, when one dimension of the box is

View File

@ -186,8 +186,8 @@ discussed below, it can be referenced via the following bracket
notation, where ID is the ID of the compute:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>c_ID</td>
@ -245,11 +245,11 @@ computes for further info.</p>
Three computes are always created, named &#8220;thermo_temp&#8221;,
&#8220;thermo_press&#8221;, and &#8220;thermo_pe&#8221;, as if these commands had been invoked
in the input script:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">thermo_temp</span> <span class="nb">all</span> <span class="n">temp</span>
<span class="n">compute</span> <span class="n">thermo_press</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">thermo_temp</span>
<span class="n">compute</span> <span class="n">thermo_pe</span> <span class="nb">all</span> <span class="n">pe</span>
</pre></div>
</div>
<pre class="literal-block">
compute thermo_temp all temp
compute thermo_press all pressure thermo_temp
compute thermo_pe all pe
</pre>
<p>Additional computes for other quantities are created if the thermo
style requires it. See the documentation for the
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command.</p>

View File

@ -177,11 +177,11 @@ For example, bond output from the <a class="reference internal" href="compute_pr
with data from this command and output by the <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a>
command in a consistent way.</p>
<p>Here is an example of how to do this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">local</span> <span class="n">btype</span> <span class="n">batom1</span> <span class="n">batom2</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">dist</span> <span class="n">eng</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">1000</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="n">index</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all property/local btype batom1 batom2
compute 2 all bond/local dist eng
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_2[1] c_2[2]
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a local vector or local array depending on the
number of keywords. The length of the vector or number of rows in the

View File

@ -234,7 +234,7 @@ simulation into gold (FCC). These were provided by Jon Zimmerman
<span class="n">Free</span> <span class="n">surface</span> <span class="o">~</span> <span class="mf">23.0</span>
</pre></div>
</div>
<p>These values are <em>not</em> normalized by the square of the lattice
<p>These values are *not* normalized by the square of the lattice
parameter. If they were, normalized values would be:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Bulk</span> <span class="n">lattice</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">Dislocation</span> <span class="n">core</span> <span class="o">~</span> <span class="mf">0.06</span> <span class="p">(</span><span class="mf">0.03</span> <span class="n">to</span> <span class="mf">0.075</span><span class="p">)</span>

View File

@ -181,11 +181,11 @@ and how they are set for each atom. You can reset the image flags
<p>The simplest way to output the results of the compute com/chunk
calculation to a file is to use the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>
command, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">compute</span> <span class="n">myChunk</span> <span class="nb">all</span> <span class="n">dipole</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myChunk</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
compute myChunk all dipole/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global array where the number of rows = the
number of chunks <em>Nchunk</em> as calculated by the specified <a class="reference internal" href="compute_chunk_atom.html"><span class="doc">compute chunk/atom</span></a> command. The number of columns =

View File

@ -164,10 +164,10 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">fep</span> <span class="mi">298</span> <span class="n">pair</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="n">epsilon</span> <span class="mi">1</span> <span class="o">*</span> <span class="n">v_delta</span> <span class="n">pair</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="n">sigma</span> <span class="mi">1</span> <span class="o">*</span> <span class="n">v_delta</span> <span class="n">volume</span> <span class="n">yes</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">fep</span> <span class="mi">300</span> <span class="n">atom</span> <span class="n">charge</span> <span class="mi">2</span> <span class="n">v_delta</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all fep 298 pair lj/cut epsilon 1 * v_delta pair lj/cut sigma 1 * v_delta volume yes
compute 1 all fep 300 atom charge 2 v_delta
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -307,7 +307,7 @@ each, as in the 1st example above. I &lt;= J is required. LAMMPS sets
the coefficients for the symmetric J,I interaction to the same
values. A wild-card asterisk can be used in place of or in conjunction
with the I,J arguments to set the coefficients for multiple pairs of
atom types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N =
atom types. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N =
the number of atom types, then an asterisk with no numeric values
means all types from 1 to N. A leading asterisk means all types from
1 to n (inclusive). A trailing asterisk means all types from n to N

View File

@ -193,11 +193,11 @@ using the <a class="reference internal" href="set.html"><span class="doc">set im
<p>The simplest way to output the results of the compute gyration/chunk
calculation to a file is to use the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>
command, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">compute</span> <span class="n">myChunk</span> <span class="nb">all</span> <span class="n">gyration</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myChunk</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
compute myChunk all gyration/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global vector if the <em>tensor</em> keyword is not
specified and a global array if it is. The length of the vector or

View File

@ -237,29 +237,30 @@ energy/area/time <a class="reference internal" href="units.html"><span class="do
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Sample LAMMPS input script for thermal conductivity of solid Ar</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>units real
<pre class="literal-block">
units real
variable T equal 70
variable V equal vol
variable dt equal 4.0
variable p equal 200 # correlation length
variable s equal 10 # sample interval
variable d equal $p*$s # dump interval
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># convert from LAMMPS real units to SI</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable kB equal 1.3806504e-23 # [J/K] Boltzmann
<pre class="literal-block">
variable kB equal 1.3806504e-23 # [J/K] Boltzmann
variable kCal2J equal 4186.0/6.02214e23
variable A2m equal 1.0e-10
variable fs2s equal 1.0e-15
variable convert equal ${kCal2J}*${kCal2J}/${fs2s}/${A2m}
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># setup problem</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>dimension 3
<pre class="literal-block">
dimension 3
boundary p p p
lattice fcc 5.376 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box block 0 4 0 4 0 4
@ -270,8 +271,7 @@ pair_style lj/cut 13.0
pair_coeff * * 0.2381 3.405
timestep ${dt}
thermo $d
</pre></div>
</div>
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># equilibration and thermalization</span>
</pre></div>
</div>
@ -287,7 +287,8 @@ run 8000
<span class="c1">#fix NVE all nve</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span>reset_timestep 0
<pre class="literal-block">
reset_timestep 0
compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
@ -305,9 +306,8 @@ thermo_style custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33
run 100000
variable k equal (v_k11+v_k22+v_k33)/3.0
variable ndens equal count(all)/vol
print &quot;average conductivity: $k[W/mK] @ $T K, ${ndens} /A^3&quot;
</pre></div>
</div>
print &quot;average conductivity: $k[W/mK] &#64; $T K, ${ndens} /A^3&quot;
</pre>
</div>
</div>

View File

@ -177,11 +177,11 @@ how they are set for each atom. You can reset the image flags
<p>The simplest way to output the results of the compute inertia/chunk
calculation to a file is to use the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>
command, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">compute</span> <span class="n">myChunk</span> <span class="nb">all</span> <span class="n">inertia</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myChunk</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
compute myChunk all inertia/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global array where the number of rows = the
number of chunks <em>Nchunk</em> as calculated by the specified <a class="reference internal" href="compute_chunk_atom.html"><span class="doc">compute chunk/atom</span></a> command. The number of columns =

View File

@ -168,11 +168,11 @@ eFF.</p>
thermodynamic output by using the <a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify</span></a>
command, as shown in the following example:</p>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">effTemp</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">eff</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">etotal</span> <span class="n">pe</span> <span class="n">ke</span> <span class="n">temp</span> <span class="n">press</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">effTemp</span>
</pre></div>
</div>
<pre class="literal-block">
compute effTemp all temp/eff
thermo_style custom step etotal pe ke temp press
thermo_modify temp effTemp
</pre>
<p>The value of the kinetic energy will be 0.0 for atoms (nuclei or
electrons) not in the specified compute group.</p>
<p><strong>Output info:</strong></p>

View File

@ -169,11 +169,11 @@ the <a class="reference internal" href="compute_temp_eff.html"><span class="doc"
printed with thermodynamic output by using the
<a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify</span></a> command, as shown in the following
example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">effTemp</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">eff</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">etotal</span> <span class="n">pe</span> <span class="n">ke</span> <span class="n">temp</span> <span class="n">press</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">effTemp</span>
</pre></div>
</div>
<pre class="literal-block">
compute effTemp all temp/eff
thermo_style custom step etotal pe ke temp press
thermo_modify temp effTemp
</pre>
<p>See <a class="reference internal" href="compute_temp_eff.html"><span class="doc">compute temp/eff</span></a>.</p>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global scalar (the KE). This value can be

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>compute_modify command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute_modify</span> <span class="n">compute</span><span class="o">-</span><span class="n">ID</span> <span class="n">keyword</span> <span class="n">value</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
compute_modify compute-ID keyword value ...
</pre>
<ul class="simple">
<li>compute-ID = ID of the compute to modify</li>
<li>one or more keyword/value pairs may be listed</li>
@ -145,10 +145,10 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute_modify</span> <span class="n">myTemp</span> <span class="n">extra</span> <span class="mi">0</span>
<span class="n">compute_modify</span> <span class="n">newtemp</span> <span class="n">dynamic</span> <span class="n">yes</span> <span class="n">extra</span> <span class="mi">600</span>
</pre></div>
</div>
<pre class="literal-block">
compute_modify myTemp extra 0
compute_modify newtemp dynamic yes extra 600
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -185,11 +185,11 @@ command.</p>
<p>As an example of per-atom potential energy compared to total potential
energy, these lines in an input script should yield the same result
in the last 2 columns of thermo output:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">peratom</span> <span class="nb">all</span> <span class="n">pe</span><span class="o">/</span><span class="n">atom</span>
<span class="n">compute</span> <span class="n">pe</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">sum</span> <span class="n">c_peratom</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="n">press</span> <span class="n">pe</span> <span class="n">c_pe</span>
</pre></div>
</div>
<pre class="literal-block">
compute peratom all pe/atom
compute pe all reduce sum c_peratom
thermo_style custom step temp etotal press pe c_pe
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The per-atom energy does not any Lennard-Jones tail corrections

View File

@ -141,10 +141,10 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">thermo_temp</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">NULL</span> <span class="n">pair</span> <span class="n">bond</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all pressure thermo_temp
compute 1 all pressure NULL pair bond
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -196,9 +196,9 @@ degrees-of-freedom divided by d = dimensionality, where the DOF value
is calcluated by the temperature compute. See the various <a class="reference internal" href="compute.html"><span class="doc">compute temperature</span></a> styles for details.</p>
<p>A compute of this style with the ID of &#8220;thermo_press&#8221; is created when
LAMMPS starts up, as if this command were in the input script:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">thermo_press</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">thermo_temp</span>
</pre></div>
</div>
<pre class="literal-block">
compute thermo_press all pressure thermo_temp
</pre>
<p>where &#8220;thermo_temp&#8221; is the ID of a similarly defined compute of style
&#8220;temp&#8221;. See the &#8220;thermo_style&#8221; command for more details.</p>
<hr class="docutils" />

View File

@ -136,25 +136,25 @@
<li>property/atom = style name of this compute command</li>
<li>input = one or more atom attributes</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">possible</span> <span class="n">attributes</span> <span class="o">=</span> <span class="nb">id</span><span class="p">,</span> <span class="n">mol</span><span class="p">,</span> <span class="n">proc</span><span class="p">,</span> <span class="nb">type</span><span class="p">,</span> <span class="n">mass</span><span class="p">,</span>
<span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">xs</span><span class="p">,</span> <span class="n">ys</span><span class="p">,</span> <span class="n">zs</span><span class="p">,</span> <span class="n">xu</span><span class="p">,</span> <span class="n">yu</span><span class="p">,</span> <span class="n">zu</span><span class="p">,</span> <span class="n">ix</span><span class="p">,</span> <span class="n">iy</span><span class="p">,</span> <span class="n">iz</span><span class="p">,</span>
<span class="n">vx</span><span class="p">,</span> <span class="n">vy</span><span class="p">,</span> <span class="n">vz</span><span class="p">,</span> <span class="n">fx</span><span class="p">,</span> <span class="n">fy</span><span class="p">,</span> <span class="n">fz</span><span class="p">,</span>
<span class="n">q</span><span class="p">,</span> <span class="n">mux</span><span class="p">,</span> <span class="n">muy</span><span class="p">,</span> <span class="n">muz</span><span class="p">,</span> <span class="n">mu</span><span class="p">,</span>
<span class="n">radius</span><span class="p">,</span> <span class="n">diameter</span><span class="p">,</span> <span class="n">omegax</span><span class="p">,</span> <span class="n">omegay</span><span class="p">,</span> <span class="n">omegaz</span><span class="p">,</span>
<span class="n">angmomx</span><span class="p">,</span> <span class="n">angmomy</span><span class="p">,</span> <span class="n">angmomz</span><span class="p">,</span>
<span class="n">shapex</span><span class="p">,</span><span class="n">shapey</span><span class="p">,</span> <span class="n">shapez</span><span class="p">,</span>
<span class="n">quatw</span><span class="p">,</span> <span class="n">quati</span><span class="p">,</span> <span class="n">quatj</span><span class="p">,</span> <span class="n">quatk</span><span class="p">,</span> <span class="n">tqx</span><span class="p">,</span> <span class="n">tqy</span><span class="p">,</span> <span class="n">tqz</span><span class="p">,</span>
<span class="n">end1x</span><span class="p">,</span> <span class="n">end1y</span><span class="p">,</span> <span class="n">end1z</span><span class="p">,</span> <span class="n">end2x</span><span class="p">,</span> <span class="n">end2y</span><span class="p">,</span> <span class="n">end2z</span><span class="p">,</span>
<span class="n">corner1x</span><span class="p">,</span> <span class="n">corner1y</span><span class="p">,</span> <span class="n">corner1z</span><span class="p">,</span>
<span class="n">corner2x</span><span class="p">,</span> <span class="n">corner2y</span><span class="p">,</span> <span class="n">corner2z</span><span class="p">,</span>
<span class="n">corner3x</span><span class="p">,</span> <span class="n">corner3y</span><span class="p">,</span> <span class="n">corner3z</span><span class="p">,</span>
<span class="n">nbonds</span><span class="p">,</span>
<span class="n">vfrac</span><span class="p">,</span> <span class="n">s0</span><span class="p">,</span>
<span class="n">spin</span><span class="p">,</span> <span class="n">eradius</span><span class="p">,</span> <span class="n">ervel</span><span class="p">,</span> <span class="n">erforce</span><span class="p">,</span>
<span class="n">rho</span><span class="p">,</span> <span class="n">drho</span><span class="p">,</span> <span class="n">e</span><span class="p">,</span> <span class="n">de</span><span class="p">,</span> <span class="n">cv</span><span class="p">,</span>
<span class="n">i_name</span><span class="p">,</span> <span class="n">d_name</span>
</pre></div>
</div>
<pre class="literal-block">
possible attributes = id, mol, proc, type, mass,
x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
vx, vy, vz, fx, fy, fz,
q, mux, muy, muz, mu,
radius, diameter, omegax, omegay, omegaz,
angmomx, angmomy, angmomz,
shapex,shapey, shapez,
quatw, quati, quatj, quatk, tqx, tqy, tqz,
end1x, end1y, end1z, end2x, end2y, end2z,
corner1x, corner1y, corner1z,
corner2x, corner2y, corner2z,
corner3x, corner3y, corner3z,
nbonds,
vfrac, s0,
spin, eradius, ervel, erforce,
rho, drho, e, de, cv,
i_name, d_name
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">id</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">ID</span>
<span class="n">mol</span> <span class="o">=</span> <span class="n">molecule</span> <span class="n">ID</span>
<span class="n">proc</span> <span class="o">=</span> <span class="n">ID</span> <span class="n">of</span> <span class="n">processor</span> <span class="n">that</span> <span class="n">owns</span> <span class="n">atom</span>

View File

@ -192,12 +192,12 @@ will be in unitless reduced units (0-1).</p>
<p>The simplest way to output the results of the compute property/chunk
calculation to a file is to use the <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>
command, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">cc1</span> <span class="nb">all</span> <span class="n">chunk</span><span class="o">/</span><span class="n">atom</span> <span class="n">molecule</span>
<span class="n">compute</span> <span class="n">myChunk1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span> <span class="n">count</span>
<span class="n">compute</span> <span class="n">myChunk2</span> <span class="nb">all</span> <span class="n">com</span><span class="o">/</span><span class="n">chunk</span> <span class="n">cc1</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myChunk1</span> <span class="n">c_myChunk2</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">out</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute cc1 all chunk/atom molecule
compute myChunk1 all property/chunk cc1 count
compute myChunk2 all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2[*] file tmp.out mode vector
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of

View File

@ -148,14 +148,14 @@
<li>one or more inputs can be listed</li>
<li>input = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="ow">or</span> <span class="n">local</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom or local vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom or local array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom or local vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom or local array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/args pairs may be appended</li>
<li>keyword = <em>replace</em></li>
@ -168,13 +168,13 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">sum</span> <span class="n">c_force</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">reduce</span><span class="o">/</span><span class="n">region</span> <span class="n">subbox</span> <span class="nb">sum</span> <span class="n">c_force</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">c_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">f_ave</span> <span class="n">v_myKE</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">c_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">f_ave</span> <span class="n">v_myKE</span>
<span class="n">compute</span> <span class="mi">3</span> <span class="n">fluid</span> <span class="n">reduce</span> <span class="nb">max</span> <span class="n">c_index</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_index</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_dist</span> <span class="n">replace</span> <span class="mi">1</span> <span class="mi">3</span> <span class="n">replace</span> <span class="mi">2</span> <span class="mi">3</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all reduce sum c_force
compute 1 all reduce/region subbox sum c_force
compute 2 all reduce min c_press[2] f_ave v_myKE
compute 2 all reduce min c_press[*] f_ave v_myKE
compute 3 fluid reduce max c_index[1] c_index[2] c_dist replace 1 3 replace 2 3
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -211,7 +211,7 @@ component) or can be the result of a <a class="reference internal" href="compute
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a>.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -222,18 +222,18 @@ means all indices from m to n (inclusive).</p>
had been listed one by one. E.g. these 2 compute reduce commands are
equivalent, since the <a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">min</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute myPress all stress/atom NULL
compute 2 all reduce min myPress[*]
compute 2 all reduce min myPress[1] myPress[2] myPress[3] &amp;
myPress[4] myPress[5] myPress[6]
</pre>
<hr class="docutils" />
<p>The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are
self-explanatory. Note that other atom attributes can be used as
inputs to this fix by using the <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command and then specifying
an input value from that compute.</p>
<p>If a value begins with &#8220;<a href="#id1"><span class="problematic" id="id2">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. Computes can generate
per-atom or local quantities. See the individual
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> doc page for details. If no bracketed integer
@ -243,7 +243,7 @@ by the compute is used. Users can also write code for their own
compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. Fixes can generate per-atom
or local quantities. See the individual <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> doc page for
details. Note that some fixes only produce their values on certain
@ -254,7 +254,7 @@ integer is appended, the Ith column of the array calculated by the fix
is used. Users can also write code for their own fix style and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how
I can be specified with a wildcard asterisk to effectively specify
multiple values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script. It must be an
<a class="reference internal" href="variable.html"><span class="doc">atom-style variable</span></a>. Atom-style variables can
reference thermodynamic keywords and various per-atom attributes, or
@ -271,12 +271,12 @@ Then, instead of performing a min/max on the <em>vec1</em> input vector, the
stored index is used to select the Nth element of the <em>vec1</em> vector.</p>
<p>Thus, for example, if you wish to use this compute to find the bond
with maximum stretch, you can do it as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">local</span> <span class="n">batom1</span> <span class="n">batom2</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">dist</span>
<span class="n">compute</span> <span class="mi">3</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">max</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_2</span> <span class="n">replace</span> <span class="mi">1</span> <span class="mi">3</span> <span class="n">replace</span> <span class="mi">2</span> <span class="mi">3</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">c_3</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_3</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_3</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all property/local batom1 batom2
compute 2 all bond/local dist
compute 3 all reduce max c_1[1] c_1[2] c_2 replace 1 3 replace 2 3
thermo_style custom step temp c_3[1] c_3[2] c_3[3]
</pre>
<p>The first two input values in the compute reduce command are vectors
with the IDs of the 2 atoms in each bond, using the <a class="reference internal" href="compute_property_local.html"><span class="doc">compute property/local</span></a> command. The last input
value is bond distance, using the <a class="reference internal" href="compute_bond_local.html"><span class="doc">compute bond/local</span></a> command. Instead of taking the

View File

@ -202,10 +202,10 @@ there will be no consistent ordering of the entries within the local
vector or array from one timestep to the next.</p>
<p>Here is an example of how to use this compute to dump rigid body info
to a file:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">rigid</span><span class="o">/</span><span class="n">local</span> <span class="n">myRigid</span> <span class="n">mol</span> <span class="n">x</span> <span class="n">y</span> <span class="n">z</span> <span class="n">fx</span> <span class="n">fy</span> <span class="n">fz</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">1000</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="n">index</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">7</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all rigid/local myRigid mol x y z fx fy fz
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_1[4] c_1[5] c_1[6] c_1[7]
</pre>
<hr class="docutils" />
<p>This section explains the rigid body attributes that can be specified.</p>
<p>The <em>id</em> attribute is the atomID of the atom which owns the rigid body, which is

View File

@ -157,14 +157,14 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">saed</span> <span class="mf">0.0251</span> <span class="n">Al</span> <span class="n">O</span> <span class="n">Kmax</span> <span class="mf">1.70</span> <span class="n">Zone</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">1</span> <span class="n">dR_Ewald</span> <span class="mf">0.01</span> <span class="n">c</span> <span class="mf">0.5</span> <span class="mf">0.5</span> <span class="mf">0.5</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">saed</span> <span class="mf">0.0251</span> <span class="n">Ni</span> <span class="n">Kmax</span> <span class="mf">1.70</span> <span class="n">Zone</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="n">c</span> <span class="mf">0.05</span> <span class="mf">0.05</span> <span class="mf">0.05</span> <span class="n">manual</span> <span class="n">echo</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">saed</span><span class="o">/</span><span class="n">vtk</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">c_1</span> <span class="n">file</span> <span class="n">Al2O3_001</span><span class="o">.</span><span class="n">saed</span>
<span class="n">fix</span> <span class="n">saed</span><span class="o">/</span><span class="n">vtk</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">c_2</span> <span class="n">file</span> <span class="n">Ni_000</span><span class="o">.</span><span class="n">saed</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all saed 0.0251 Al O Kmax 1.70 Zone 0 0 1 dR_Ewald 0.01 c 0.5 0.5 0.5
compute 2 all saed 0.0251 Ni Kmax 1.70 Zone 0 0 0 c 0.05 0.05 0.05 manual echo
</pre>
<pre class="literal-block">
fix saed/vtk 1 1 1 c_1 file Al2O3_001.saed
fix saed/vtk 1 1 1 c_2 file Ni_000.saed
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -193,7 +193,7 @@ shown in the 2D diagram below.</p>
height="auto"
alt=""/>
</a><p>For a mesh defined by the simulation domain, a rectilinear grid is
constructed with spacing <em>c</em><a href="#id1"><span class="problematic" id="id2">*</span></a>inv(A) along each reciprocal lattice
constructed with spacing <em>c</em>*inv(A) along each reciprocal lattice
axis. Where A are the vectors corresponding to the edges of the
simulation cell. If one or two directions has non-periodic boundary
conditions, then the spacing in these directions is defined from the

View File

@ -134,11 +134,11 @@
<h1>compute snav/atom command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">sna</span><span class="o">/</span><span class="n">atom</span> <span class="n">rcutfac</span> <span class="n">rfac0</span> <span class="n">twojmax</span> <span class="n">R_1</span> <span class="n">R_2</span> <span class="o">...</span> <span class="n">w_1</span> <span class="n">w_2</span> <span class="o">...</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
<span class="n">compute</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">snad</span><span class="o">/</span><span class="n">atom</span> <span class="n">rcutfac</span> <span class="n">rfac0</span> <span class="n">twojmax</span> <span class="n">R_1</span> <span class="n">R_2</span> <span class="o">...</span> <span class="n">w_1</span> <span class="n">w_2</span> <span class="o">...</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
<span class="n">compute</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">snav</span><span class="o">/</span><span class="n">atom</span> <span class="n">rcutfac</span> <span class="n">rfac0</span> <span class="n">twojmax</span> <span class="n">R_1</span> <span class="n">R_2</span> <span class="o">...</span> <span class="n">w_1</span> <span class="n">w_2</span> <span class="o">...</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
compute ID group-ID sna/atom rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snad/atom rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
compute ID group-ID snav/atom rcutfac rfac0 twojmax R_1 R_2 ... w_1 w_2 ... keyword values ...
</pre>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command</li>
<li>sna/atom = style name of this compute command</li>
@ -276,22 +276,22 @@ corresponding to a particular bispectrum component. The total number
of columns and the identities of the bispectrum component contained in
each column depend on the values of <em>twojmax</em> and <em>diagonal</em>, as
described by the following piece of python code:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">j1</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">twojmax</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span>
<span class="k">if</span><span class="p">(</span><span class="n">diagonal</span><span class="o">==</span><span class="mi">2</span><span class="p">):</span>
<span class="nb">print</span> <span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j1</span><span class="o">/</span><span class="mf">2.</span>
<span class="k">elif</span><span class="p">(</span><span class="n">diagonal</span><span class="o">==</span><span class="mi">1</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="nb">min</span><span class="p">(</span><span class="n">twojmax</span><span class="p">,</span><span class="mi">2</span><span class="o">*</span><span class="n">j1</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">):</span>
<span class="nb">print</span> <span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j</span><span class="o">/</span><span class="mf">2.</span>
<span class="k">elif</span><span class="p">(</span><span class="n">diagonal</span><span class="o">==</span><span class="mi">0</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j2</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">j1</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">j1</span><span class="o">-</span><span class="n">j2</span><span class="p">,</span><span class="nb">min</span><span class="p">(</span><span class="n">twojmax</span><span class="p">,</span><span class="n">j1</span><span class="o">+</span><span class="n">j2</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">):</span>
<span class="nb">print</span> <span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j2</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j</span><span class="o">/</span><span class="mf">2.</span>
<span class="k">elif</span><span class="p">(</span><span class="n">diagonal</span><span class="o">==</span><span class="mi">3</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j2</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">j1</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">j1</span><span class="o">-</span><span class="n">j2</span><span class="p">,</span><span class="nb">min</span><span class="p">(</span><span class="n">twojmax</span><span class="p">,</span><span class="n">j1</span><span class="o">+</span><span class="n">j2</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">):</span>
<span class="k">if</span> <span class="p">(</span><span class="n">j</span><span class="o">&gt;=</span><span class="n">j1</span><span class="p">):</span> <span class="nb">print</span> <span class="n">j1</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j2</span><span class="o">/</span><span class="mf">2.</span><span class="p">,</span><span class="n">j</span><span class="o">/</span><span class="mf">2.</span>
</pre></div>
</div>
<pre class="literal-block">
for j1 in range(0,twojmax+1):
if(diagonal==2):
print j1/2.,j1/2.,j1/2.
elif(diagonal==1):
for j in range(0,min(twojmax,2*j1)+1,2):
print j1/2.,j1/2.,j/2.
elif(diagonal==0):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
print j1/2.,j2/2.,j/2.
elif(diagonal==3):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
if (j&gt;=j1): print j1/2.,j2/2.,j/2.
</pre>
<p>Compute <em>snad/atom</em> evaluates a per-atom array. The columns are
arranged into <em>ntypes</em> blocks, listed in order of atom type <em>I</em>. Each
block contains three sub-blocks corresponding to the <em>x</em>, <em>y</em>, and <em>z</em>

View File

@ -234,12 +234,12 @@ d = dimension and V is the volume of the system, the result should be
-P, where P is the total pressure of the system.</p>
<p>These lines in an input script for a 3d system should yield that
result. I.e. the last 2 columns of thermo output will be the same:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">peratom</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">compute</span> <span class="n">p</span> <span class="nb">all</span> <span class="n">reduce</span> <span class="nb">sum</span> <span class="n">c_peratom</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_peratom</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_peratom</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
<span class="n">variable</span> <span class="n">press</span> <span class="n">equal</span> <span class="o">-</span><span class="p">(</span><span class="n">c_p</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">+</span><span class="n">c_p</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">+</span><span class="n">c_p</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span><span class="o">/</span><span class="p">(</span><span class="mi">3</span><span class="o">*</span><span class="n">vol</span><span class="p">)</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">etotal</span> <span class="n">press</span> <span class="n">v_press</span>
</pre></div>
</div>
<pre class="literal-block">
compute peratom all stress/atom NULL
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
thermo_style custom step temp etotal press v_press
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a per-atom array with 6 columns, which can be
accessed by indices 1-6 by any command that uses per-atom values from

View File

@ -140,10 +140,10 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">oxygen_c</span><span class="o">-</span><span class="n">s</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">cs</span> <span class="n">O_core</span> <span class="n">O_shell</span>
<span class="n">compute</span> <span class="n">core_shells</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">cs</span> <span class="n">cores</span> <span class="n">shells</span>
</pre></div>
</div>
<pre class="literal-block">
compute oxygen_c-s all temp/cs O_core O_shell
compute core_shells all temp/cs cores shells
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -170,11 +170,11 @@ reported by LAMMPS in the thermodynamic quantities reported via the
<a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify</span></a> command, as shown in the following
example:</p>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">effTemp</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">eff</span>
<span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">etotal</span> <span class="n">pe</span> <span class="n">ke</span> <span class="n">temp</span> <span class="n">press</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">effTemp</span>
</pre></div>
</div>
<pre class="literal-block">
compute effTemp all temp/eff
thermo_style custom step etotal pe ke temp press
thermo_modify temp effTemp
</pre>
<p>A 6-component kinetic energy tensor is also calculated by this compute
for use in the computation of a pressure tensor. The formula for the
components of the tensor is the same as the above formula, except that

View File

@ -154,10 +154,10 @@ pair style args = atype v_name1 v_name2
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ti</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="mi">1</span> <span class="n">v_lj</span> <span class="n">v_dlj</span> <span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mi">2</span> <span class="n">v_c</span> <span class="n">v_dc</span> <span class="n">kspace</span> <span class="mi">1</span> <span class="n">v_ks</span> <span class="n">v_dks</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ti</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="mi">1</span><span class="o">*</span><span class="mi">3</span> <span class="n">v_lj</span> <span class="n">v_dlj</span> <span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="o">*</span> <span class="n">v_c</span> <span class="n">v_dc</span> <span class="n">kspace</span> <span class="o">*</span> <span class="n">v_ks</span> <span class="n">v_dks</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all ti lj/cut 1 v_lj v_dlj coul/long 2 v_c v_dc kspace 1 v_ks v_dks
compute 1 all ti lj/cut 1*3 v_lj v_dlj coul/long * v_c v_dc kspace * v_ks v_dks
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -192,7 +192,7 @@ with respect to <em>lambda</em>.</p>
numeric values can be used, as in the 1st example above. Or a
wildcard asterisk can be used in place of or in conjunction with the
<em>atype</em> argument to select multiple atom types. This takes the form
&#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the number of atom types, then
&#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N = the number of atom types, then
an asterisk with no numeric values means all types from 1 to N. A
leading asterisk means all types from 1 to n (inclusive). A trailing
asterisk means all types from n to N (inclusive). A middle asterisk

View File

@ -158,14 +158,14 @@ or <em>face_threshold</em> or <em>neighbors</em> or <em>peratom</em></li>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="n">precipitate</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">surface</span> <span class="n">matrix</span>
<span class="n">compute</span> <span class="mi">3</span><span class="n">b</span> <span class="n">precipitate</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">radius</span> <span class="n">v_r</span>
<span class="n">compute</span> <span class="mi">4</span> <span class="n">solute</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">only_group</span>
<span class="n">compute</span> <span class="mi">5</span> <span class="n">defects</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">occupation</span>
<span class="n">compute</span> <span class="mi">6</span> <span class="nb">all</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">neighbors</span> <span class="n">yes</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all voronoi/atom
compute 2 precipitate voronoi/atom surface matrix
compute 3b precipitate voronoi/atom radius v_r
compute 4 solute voronoi/atom only_group
compute 5 defects voronoi/atom occupation
compute 6 all voronoi/atom neighbors yes
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -199,11 +199,11 @@ can be obtained by running a &#8220;reduce sum&#8221; compute on c_2[3]</p>
<p>If the <em>radius</em> keyword is specified with an atom style variable as
the argument, a poly-disperse Voronoi tessellation is
performed. Examples for radius variables are</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">r1</span> <span class="n">atom</span> <span class="p">(</span><span class="nb">type</span><span class="o">==</span><span class="mi">1</span><span class="p">)</span><span class="o">*</span><span class="mf">0.1</span><span class="o">+</span><span class="p">(</span><span class="nb">type</span><span class="o">==</span><span class="mi">2</span><span class="p">)</span><span class="o">*</span><span class="mf">0.4</span>
<span class="n">compute</span> <span class="n">radius</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">atom</span> <span class="n">radius</span>
<span class="n">variable</span> <span class="n">r2</span> <span class="n">atom</span> <span class="n">c_radius</span>
</pre></div>
</div>
<pre class="literal-block">
variable r1 atom (type==1)*0.1+(type==2)*0.4
compute radius all property/atom radius
variable r2 atom c_radius
</pre>
<p>Here v_r1 specifies a per-type radius of 0.1 units for type 1 atoms
and 0.4 units for type 2 atoms, and v_r2 accesses the radius property
present in atom_style sphere for granular models.</p>
@ -247,10 +247,10 @@ uses local values from a compute as input. See <a class="reference internal" hr
options. More specifically, the array can be accessed by a
<a class="reference internal" href="dump.html"><span class="doc">dump local</span></a> command to write a file containing
all the Voronoi neighbors in a system:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">6</span> <span class="nb">all</span> <span class="n">voronoi</span><span class="o">/</span><span class="n">atom</span> <span class="n">neighbors</span> <span class="n">yes</span>
<span class="n">dump</span> <span class="n">d2</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">1</span> <span class="n">dump</span><span class="o">.</span><span class="n">neighbors</span> <span class="n">index</span> <span class="n">c_6</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_6</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_6</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute 6 all voronoi/atom neighbors yes
dump d2 all local 1 dump.neighbors index c_6[1] c_6[2] c_6[3]
</pre>
<p>If the <em>face_threshold</em> keyword is used, then only faces
with areas greater than the threshold are stored.</p>
<hr class="docutils" />

View File

@ -159,10 +159,10 @@
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">xrd</span> <span class="mf">1.541838</span> <span class="n">Al</span> <span class="n">O</span> <span class="mi">2</span><span class="n">Theta</span> <span class="mi">10</span> <span class="mi">100</span> <span class="n">c</span> <span class="mf">0.05</span> <span class="mf">0.05</span> <span class="mf">0.05</span> <span class="n">LP</span> <span class="mi">1</span> <span class="n">manual</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span><span class="o">/</span><span class="n">weight</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mf">0.087</span> <span class="mf">0.87</span> <span class="mi">250</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">mode</span> <span class="n">vector</span> <span class="n">file</span> <span class="n">Rad2Theta</span><span class="o">.</span><span class="n">xrd</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span><span class="o">/</span><span class="n">weight</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">10</span> <span class="mi">100</span> <span class="mi">250</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">mode</span> <span class="n">vector</span> <span class="n">file</span> <span class="n">Deg2Theta</span><span class="o">.</span><span class="n">xrd</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/histo/weight 1 1 1 0.087 0.87 250 c_1[1] c_1[2] mode vector file Rad2Theta.xrd
fix 2 all ave/histo/weight 1 1 1 10 100 250 c_2[1] c_2[2] mode vector file Deg2Theta.xrd
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -196,7 +196,7 @@ shown in the 2D diagram below.</p>
height="auto"
alt=""/>
</a><p>For a mesh defined by the simulation domain, a rectilinear grid is
constructed with spacing <em>c</em><a href="#id1"><span class="problematic" id="id2">*</span></a>inv(A) along each reciprocal lattice
constructed with spacing <em>c</em>*inv(A) along each reciprocal lattice
axis. Where A are the vectors corresponding to the edges of the
simulation cell. If one or two directions has non-periodic boundary
conditions, then the spacing in these directions is defined from the

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>create_atoms command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">create_atoms</span> <span class="nb">type</span> <span class="n">style</span> <span class="n">args</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
create_atoms type style args keyword values ...
</pre>
<ul class="simple">
<li>type = atom type (1-Ntypes) of atoms to create (offset for molecule creation)</li>
<li>style = <em>box</em> or <em>region</em> or <em>single</em> or <em>random</em></li>
@ -172,12 +172,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">create_atoms</span> <span class="mi">1</span> <span class="n">box</span>
<span class="n">create_atoms</span> <span class="mi">3</span> <span class="n">region</span> <span class="n">regsphere</span> <span class="n">basis</span> <span class="mi">2</span> <span class="mi">3</span>
<span class="n">create_atoms</span> <span class="mi">3</span> <span class="n">single</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">5</span>
<span class="n">create_atoms</span> <span class="mi">1</span> <span class="n">box</span> <span class="n">var</span> <span class="n">v</span> <span class="nb">set</span> <span class="n">x</span> <span class="n">xpos</span> <span class="nb">set</span> <span class="n">y</span> <span class="n">ypos</span>
</pre></div>
</div>
<pre class="literal-block">
create_atoms 1 box
create_atoms 3 region regsphere basis 2 3
create_atoms 3 single 0 0 5
create_atoms 1 box var v set x xpos set y ypos
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -328,19 +328,19 @@ the sinusoid would appear to be &#8220;smoother&#8221;. Also note the use of th
&#8220;xlat&#8221; and &#8220;ylat&#8221; <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> keywords which
converts lattice spacings to distance. Click on the image for a
larger version.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable x equal 100
<pre class="literal-block">
variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">xx</span> <span class="n">equal</span> <span class="mf">0.0</span>
<span class="n">variable</span> <span class="n">yy</span> <span class="n">equal</span> <span class="mf">0.0</span>
<span class="n">variable</span> <span class="n">v</span> <span class="n">equal</span> <span class="s2">&quot;(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) &gt; 0.0&quot;</span>
<span class="n">create_atoms</span> <span class="mi">1</span> <span class="n">box</span> <span class="n">var</span> <span class="n">v</span> <span class="nb">set</span> <span class="n">x</span> <span class="n">xx</span> <span class="nb">set</span> <span class="n">y</span> <span class="n">yy</span>
</pre></div>
</div>
create_box 1 box
</pre>
<pre class="literal-block">
variable xx equal 0.0
variable yy equal 0.0
variable v equal &quot;(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) &gt; 0.0&quot;
create_atoms 1 box var v set x xx set y yy
</pre>
<a class=""
data-lightbox="group-default"
href="_images/sinusoid.jpg"

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>delete_bonds command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">delete_bonds</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">style</span> <span class="n">arg</span> <span class="n">keyword</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
delete_bonds group-ID style arg keyword ...
</pre>
<ul>
<li><p class="first">group-ID = group ID</p>
</li>
@ -157,12 +157,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">delete_bonds</span> <span class="n">frozen</span> <span class="n">multi</span> <span class="n">remove</span>
<span class="n">delete_bonds</span> <span class="nb">all</span> <span class="n">atom</span> <span class="mi">4</span> <span class="n">special</span>
<span class="n">delete_bonds</span> <span class="nb">all</span> <span class="n">bond</span> <span class="mi">0</span><span class="o">*</span><span class="mi">3</span> <span class="n">special</span>
<span class="n">delete_bonds</span> <span class="nb">all</span> <span class="n">stats</span>
</pre></div>
</div>
<pre class="literal-block">
delete_bonds frozen multi remove
delete_bonds all atom 4 special
delete_bonds all bond 0*3 special
delete_bonds all stats
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -183,7 +183,7 @@ be an integer from 0 to N, where N is the number of relevant types
(atom types, bond types, etc). A value of 0 is only relevant for
style <em>bond</em>; see details below. In all cases, a wildcard asterisk
can be used in place of or in conjunction with the <em>type</em> argument to
specify a range of types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify a range of types. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the number of types, then an asterisk with no numeric
values means all types from 0 to N. A leading asterisk means all
types from 0 to n (inclusive). A trailing asterisk means all types

View File

@ -137,18 +137,18 @@
<h1>dihedral_style charmm/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">charmm</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style charmm
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">charmm</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">0.2</span> <span class="mi">1</span> <span class="mi">180</span> <span class="mf">1.0</span>
<span class="n">dihedral_coeff</span> <span class="mi">2</span> <span class="mf">1.8</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mf">1.0</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">3.1</span> <span class="mi">2</span> <span class="mi">180</span> <span class="mf">0.5</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style charmm
dihedral_coeff 1 0.2 1 180 1.0
dihedral_coeff 2 1.8 1 0 1.0
dihedral_coeff 1 3.1 2 180 0.5
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,21 +131,21 @@
<h1>dihedral_style class2/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">class2</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style class2
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">class2</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">75</span> <span class="mi">100</span> <span class="mi">70</span> <span class="mi">80</span> <span class="mi">60</span>
<span class="n">dihedral_coeff</span> <span class="o">*</span> <span class="n">mbt</span> <span class="mf">3.5945</span> <span class="mf">0.1704</span> <span class="o">-</span><span class="mf">0.5490</span> <span class="mf">1.5228</span>
<span class="n">dihedral_coeff</span> <span class="o">*</span> <span class="n">ebt</span> <span class="mf">0.3417</span> <span class="mf">0.3264</span> <span class="o">-</span><span class="mf">0.9036</span> <span class="mf">0.1368</span> <span class="mf">0.0</span> <span class="o">-</span><span class="mf">0.8080</span> <span class="mf">1.0119</span> <span class="mf">1.1010</span>
<span class="n">dihedral_coeff</span> <span class="mi">2</span> <span class="n">at</span> <span class="mf">0.0</span> <span class="o">-</span><span class="mf">0.1850</span> <span class="o">-</span><span class="mf">0.7963</span> <span class="o">-</span><span class="mf">2.0220</span> <span class="mf">0.0</span> <span class="o">-</span><span class="mf">0.3991</span> <span class="mf">110.2453</span> <span class="mf">105.1270</span>
<span class="n">dihedral_coeff</span> <span class="o">*</span> <span class="n">aat</span> <span class="o">-</span><span class="mf">13.5271</span> <span class="mf">110.2453</span> <span class="mf">105.1270</span>
<span class="n">dihedral_coeff</span> <span class="o">*</span> <span class="n">bb13</span> <span class="mf">0.0</span> <span class="mf">1.0119</span> <span class="mf">1.1010</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style class2
dihedral_coeff 1 100 75 100 70 80 60
dihedral_coeff * mbt 3.5945 0.1704 -0.5490 1.5228
dihedral_coeff * ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010
dihedral_coeff 2 at 0.0 -0.1850 -0.7963 -2.0220 0.0 -0.3991 110.2453 105.1270
dihedral_coeff * aat -13.5271 110.2453 105.1270
dihedral_coeff * bb13 0.0 1.0119 1.1010
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style cosine/shift/exp/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">exp</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style cosine/shift/exp
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">cosine</span><span class="o">/</span><span class="n">shift</span><span class="o">/</span><span class="n">exp</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">10.0</span> <span class="mf">45.0</span> <span class="mf">2.0</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style cosine/shift/exp
dihedral_coeff 1 10.0 45.0 2.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style fourier/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">fourier</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style fourier
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">fourier</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mi">3</span> <span class="o">-</span><span class="mf">0.846200</span> <span class="mi">3</span> <span class="mf">0.0</span> <span class="mf">7.578800</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mf">0.138000</span> <span class="mi">2</span> <span class="o">-</span><span class="mf">180.0</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style fourier
dihedral_coeff 1 3 -0.846200 3 0.0 7.578800 1 0 0.138000 2 -180.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -134,16 +134,16 @@
<h1>dihedral_style harmonic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">harmonic</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style harmonic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">harmonic</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">80.0</span> <span class="mi">1</span> <span class="mi">2</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style harmonic
dihedral_coeff 1 80.0 1 2
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style helix/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">helix</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style helix
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">helix</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">80.0</span> <span class="mf">100.0</span> <span class="mf">40.0</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style helix
dihedral_coeff 1 80.0 100.0 40.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style multi/harmonic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">multi</span><span class="o">/</span><span class="n">harmonic</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style multi/harmonic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">multi</span><span class="o">/</span><span class="n">harmonic</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mi">20</span> <span class="mi">20</span> <span class="mi">20</span> <span class="mi">20</span> <span class="mi">20</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style multi/harmonic
dihedral_coeff 1 20 20 20 20 20
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style nharmonic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">nharmonic</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style nharmonic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">nharmonic</span>
<span class="n">dihedral_coeff</span> <span class="mi">3</span> <span class="mf">10.0</span> <span class="mf">20.0</span> <span class="mf">30.0</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style nharmonic
dihedral_coeff 3 10.0 20.0 30.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -137,18 +137,18 @@
<h1>dihedral_style opls/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">opls</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style opls
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">opls</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mf">1.740</span> <span class="o">-</span><span class="mf">0.157</span> <span class="mf">0.279</span> <span class="mf">0.00</span> <span class="c1"># CT-CT-CT-CT</span>
<span class="n">dihedral_coeff</span> <span class="mi">2</span> <span class="mf">0.000</span> <span class="mf">0.000</span> <span class="mf">0.366</span> <span class="mf">0.000</span> <span class="c1"># CT-CT-CT-HC</span>
<span class="n">dihedral_coeff</span> <span class="mi">3</span> <span class="mf">0.000</span> <span class="mf">0.000</span> <span class="mf">0.318</span> <span class="mf">0.000</span> <span class="c1"># HC-CT-CT-HC</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style opls
dihedral_coeff 1 1.740 -0.157 0.279 0.00 # CT-CT-CT-CT
dihedral_coeff 2 0.000 0.000 0.366 0.000 # CT-CT-CT-HC
dihedral_coeff 3 0.000 0.000 0.318 0.000 # HC-CT-CT-HC
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,16 +131,16 @@
<h1>dihedral_style quadratic/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">quadratic</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style quadratic
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">quadratic</span>
<span class="n">dihedral_coeff</span> <span class="mf">100.0</span> <span class="mf">80.0</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style quadratic
dihedral_coeff 100.0 80.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -128,18 +128,18 @@
<span id="index-0"></span><h1>dihedral_style spherical command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">spherical</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style spherical
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mf">286.1</span> <span class="mi">1</span> <span class="mi">124</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mf">90.0</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mf">90.0</span> <span class="mi">0</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="mi">3</span> <span class="mf">286.1</span> <span class="mi">1</span> <span class="mi">114</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">90</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mf">90.0</span> <span class="mi">0</span> <span class="o">&amp;</span>
<span class="mf">17.3</span> <span class="mi">0</span> <span class="mf">0.0</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">158</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mf">0.0</span> <span class="mi">0</span> <span class="o">&amp;</span>
<span class="mf">15.1</span> <span class="mi">0</span> <span class="mf">0.0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mf">0.0</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mf">167.3</span> <span class="mi">1</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_coeff 1 1 286.1 1 124 1 1 90.0 0 1 90.0 0
dihedral_coeff 1 3 286.1 1 114 1 1 90 0 1 90.0 0 &amp;
17.3 0 0.0 0 1 158 1 0 0.0 0 &amp;
15.1 0 0.0 0 0 0.0 0 1 167.3 1
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -128,20 +128,20 @@
<span id="index-0"></span><h1>dihedral_style command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">style</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style style
</pre>
<ul class="simple">
<li>style = <em>none</em> or <em>hybrid</em> or <em>charmm</em> or <em>class2</em> or <em>harmonic</em> or <em>helix</em> or <em>multi/harmonic</em> or <em>opls</em></li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">harmonic</span>
<span class="n">dihedral_style</span> <span class="n">multi</span><span class="o">/</span><span class="n">harmonic</span>
<span class="n">dihedral_style</span> <span class="n">hybrid</span> <span class="n">harmonic</span> <span class="n">charmm</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style harmonic
dihedral_style multi/harmonic
dihedral_style hybrid harmonic charmm
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>

View File

@ -131,9 +131,9 @@
<h1>dihedral_style table/omp command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">table</span> <span class="n">style</span> <span class="n">Ntable</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style table style Ntable
</pre>
<ul class="simple">
<li>style = <em>linear</em> or <em>spline</em> = method of interpolation</li>
<li>Ntable = size of the internal lookup table</li>
@ -141,12 +141,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dihedral_style</span> <span class="n">table</span> <span class="n">spline</span> <span class="mi">400</span>
<span class="n">dihedral_style</span> <span class="n">table</span> <span class="n">linear</span> <span class="mi">1000</span>
<span class="n">dihedral_coeff</span> <span class="mi">1</span> <span class="n">file</span><span class="o">.</span><span class="n">table</span> <span class="n">DIH_TABLE1</span>
<span class="n">dihedral_coeff</span> <span class="mi">2</span> <span class="n">file</span><span class="o">.</span><span class="n">table</span> <span class="n">DIH_TABLE2</span>
</pre></div>
</div>
<pre class="literal-block">
dihedral_style table spline 400
dihedral_style table linear 1000
dihedral_coeff 1 file.table DIH_TABLE1
dihedral_coeff 2 file.table DIH_TABLE2
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -185,23 +185,23 @@ or blank lines.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Table of the potential and its negative derivative</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">DIH_TABLE1</span> <span class="p">(</span><span class="n">keyword</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">first</span> <span class="n">text</span> <span class="n">on</span> <span class="n">line</span><span class="p">)</span>
<span class="n">N</span> <span class="mi">30</span> <span class="n">DEGREES</span> <span class="p">(</span><span class="n">N</span><span class="p">,</span> <span class="n">NOF</span><span class="p">,</span> <span class="n">DEGREES</span><span class="p">,</span> <span class="n">RADIANS</span><span class="p">,</span> <span class="n">CHECKU</span><span class="o">/</span><span class="n">F</span><span class="p">)</span>
<span class="p">(</span><span class="n">blank</span> <span class="n">line</span><span class="p">)</span>
<span class="mi">1</span> <span class="o">-</span><span class="mf">168.0</span> <span class="o">-</span><span class="mf">1.40351172223</span> <span class="mf">0.0423346818422</span>
<span class="mi">2</span> <span class="o">-</span><span class="mf">156.0</span> <span class="o">-</span><span class="mf">1.70447981034</span> <span class="mf">0.00811786522531</span>
<span class="mi">3</span> <span class="o">-</span><span class="mf">144.0</span> <span class="o">-</span><span class="mf">1.62956100432</span> <span class="o">-</span><span class="mf">0.0184129719987</span>
<span class="o">...</span>
<span class="mi">30</span> <span class="mf">180.0</span> <span class="o">-</span><span class="mf">0.707106781187</span> <span class="mf">0.0719306095245</span>
</pre></div>
</div>
<pre class="literal-block">
DIH_TABLE1 (keyword is the first text on line)
N 30 DEGREES (N, NOF, DEGREES, RADIANS, CHECKU/F)
(blank line)
1 -168.0 -1.40351172223 0.0423346818422
2 -156.0 -1.70447981034 0.00811786522531
3 -144.0 -1.62956100432 -0.0184129719987
...
30 180.0 -0.707106781187 0.0719306095245
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Example 2: table of the potential. Forces omitted</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">DIH_TABLE2</span>
<span class="n">N</span> <span class="mi">30</span> <span class="n">NOF</span> <span class="n">CHECKU</span> <span class="n">testU</span><span class="o">.</span><span class="n">dat</span> <span class="n">CHECKF</span> <span class="n">testF</span><span class="o">.</span><span class="n">dat</span>
</pre></div>
</div>
<pre class="literal-block">
DIH_TABLE2
N 30 NOF CHECKU testU.dat CHECKF testF.dat
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">1</span> <span class="o">-</span><span class="mf">168.0</span> <span class="o">-</span><span class="mf">1.40351172223</span>
<span class="mi">2</span> <span class="o">-</span><span class="mf">156.0</span> <span class="o">-</span><span class="mf">1.70447981034</span>
<span class="mi">3</span> <span class="o">-</span><span class="mf">144.0</span> <span class="o">-</span><span class="mf">1.62956100432</span>

View File

@ -239,19 +239,19 @@ i_name = per-atom integer vector with name, managed by fix property/atom
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump</span> <span class="n">myDump</span> <span class="nb">all</span> <span class="n">atom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">atom</span>
<span class="n">dump</span> <span class="n">myDump</span> <span class="nb">all</span> <span class="n">atom</span><span class="o">/</span><span class="n">mpiio</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">atom</span><span class="o">.</span><span class="n">mpiio</span>
<span class="n">dump</span> <span class="n">myDump</span> <span class="nb">all</span> <span class="n">atom</span><span class="o">/</span><span class="n">gz</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">atom</span><span class="o">.</span><span class="n">gz</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="n">subgroup</span> <span class="n">atom</span> <span class="mi">50</span> <span class="n">dump</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">bin</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="n">subgroup</span> <span class="n">atom</span> <span class="mi">50</span> <span class="n">dump</span><span class="o">.</span><span class="n">run</span><span class="o">.</span><span class="n">mpiio</span><span class="o">.</span><span class="n">bin</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">a</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">myforce</span><span class="o">.*</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">x</span> <span class="n">y</span> <span class="n">vx</span> <span class="n">fx</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">b</span> <span class="n">flow</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.%.</span><span class="n">myforce</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_myF</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">v_ke</span>
<span class="n">dump</span> <span class="mi">4</span><span class="n">b</span> <span class="n">flow</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.%.</span><span class="n">myforce</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_myF</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">v_ke</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="n">inner</span> <span class="n">cfg</span> <span class="mi">10</span> <span class="n">dump</span><span class="o">.</span><span class="n">snap</span><span class="o">.*.</span><span class="n">cfg</span> <span class="n">mass</span> <span class="nb">type</span> <span class="n">xs</span> <span class="n">ys</span> <span class="n">zs</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span>
<span class="n">dump</span> <span class="n">snap</span> <span class="nb">all</span> <span class="n">cfg</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.</span><span class="n">config</span><span class="o">.*.</span><span class="n">cfg</span> <span class="n">mass</span> <span class="nb">type</span> <span class="n">xs</span> <span class="n">ys</span> <span class="n">zs</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_Stress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">xtc</span> <span class="mi">1000</span> <span class="n">file</span><span class="o">.</span><span class="n">xtc</span>
</pre></div>
</div>
<pre class="literal-block">
dump myDump all atom 100 dump.atom
dump myDump all atom/mpiio 100 dump.atom.mpiio
dump myDump all atom/gz 100 dump.atom.gz
dump 2 subgroup atom 50 dump.run.bin
dump 2 subgroup atom 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
dump 4b flow custom 100 dump.%.myforce id type c_myF[*] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
dump snap all cfg 100 dump.config.*.cfg mass type xs ys zs id type c_Stress[2]
dump 1 all xtc 1000 file.xtc
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -347,12 +347,12 @@ or m = shrink wrapped with a minimum value. See the
bounding box which encloses the triclinic simulation box is output,
along with the 3 tilt factors (xy, xz, yz) of the triclinic box,
formatted as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ITEM</span><span class="p">:</span> <span class="n">BOX</span> <span class="n">BOUNDS</span> <span class="n">xy</span> <span class="n">xz</span> <span class="n">yz</span> <span class="n">xx</span> <span class="n">yy</span> <span class="n">zz</span>
<span class="n">xlo_bound</span> <span class="n">xhi_bound</span> <span class="n">xy</span>
<span class="n">ylo_bound</span> <span class="n">yhi_bound</span> <span class="n">xz</span>
<span class="n">zlo_bound</span> <span class="n">zhi_bound</span> <span class="n">yz</span>
</pre></div>
</div>
<pre class="literal-block">
ITEM: BOX BOUNDS xy xz yz xx yy zz
xlo_bound xhi_bound xy
ylo_bound yhi_bound xz
zlo_bound zhi_bound yz
</pre>
<p>The presence of the text &#8220;xy xz yz&#8221; in the ITEM line indicates that
the 3 tilt factors will be included on each of the 3 following lines.
This bounding box is convenient for many visualization programs. The
@ -541,7 +541,7 @@ styles.</p>
reference values from a compute or fix, like the <em>custom</em>, <em>cfg</em>, or
<em>local</em> styles, the bracketed index I can be specified using a
wildcard asterisk with the index to effectively specify multiple
values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N = the
size of the vector (for <em>mode</em> = scalar) or the number of columns in
the array (for <em>mode</em> = vector), then an asterisk with no numeric
values means all indices from 1 to N. A leading asterisk means all
@ -552,12 +552,12 @@ from m to n (inclusive).</p>
had been listed one by one. E.g. these 2 dump commands are
equivalent, since the <a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="nb">id</span> <span class="n">myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">dump</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="nb">id</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute myPress all stress/atom NULL
dump 2 all custom 100 tmp.dump id myPress[*]
dump 2 all custom 100 tmp.dump id myPress[1] myPress[2] myPress[3] &amp;
myPress[4] myPress[5] myPress[6]
</pre>
<hr class="docutils" />
<p>This section explains the local attributes that can be specified as
part of the <em>local</em> style.</p>
@ -598,11 +598,11 @@ be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>Here is an example of how to dump bond info for a system, including
the distance and energy of each bond:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">local</span> <span class="n">batom1</span> <span class="n">batom2</span> <span class="n">btype</span>
<span class="n">compute</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">dist</span> <span class="n">eng</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">1000</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span> <span class="n">index</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all property/local batom1 batom2 btype
compute 2 all bond/local dist eng
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_2[1] c_2[2]
</pre>
<hr class="docutils" />
<p>This section explains the atom attributes that can be specified as
part of the <em>custom</em> and <em>cfg</em> styles.</p>

View File

@ -182,15 +182,15 @@ v_name = per-atom vector calculated by an atom-style variable with name
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump</span> <span class="n">dmpvtk</span> <span class="nb">all</span> <span class="n">custom</span><span class="o">/</span><span class="n">vtk</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">*.</span><span class="n">myforce</span><span class="o">.</span><span class="n">vtk</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">vx</span> <span class="n">fx</span>
<span class="n">dump</span> <span class="n">dmpvtp</span> <span class="n">flow</span> <span class="n">custom</span><span class="o">/</span><span class="n">vtk</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">*.%.</span><span class="n">displace</span><span class="o">.</span><span class="n">vtp</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">c_myD</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myD</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myD</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">v_ke</span>
<span class="n">dump</span> <span class="n">e_data</span> <span class="nb">all</span> <span class="n">custom</span><span class="o">/</span><span class="n">vtk</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">*.</span><span class="n">vtu</span> <span class="nb">id</span> <span class="nb">type</span> <span class="n">spin</span> <span class="n">eradius</span> <span class="n">fx</span> <span class="n">fy</span> <span class="n">fz</span> <span class="n">eforce</span>
</pre></div>
</div>
<pre class="literal-block">
dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx
dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD[1] c_myD[2] c_myD[3] v_ke
dump e_data all custom/vtk 100 dump*.vtu id type spin eradius fx fy fz eforce
</pre>
<p>The style <em>custom/vtk</em> is similar to the <a class="reference internal" href="dump.html"><span class="doc">custom</span></a> style but
uses the VTK library to write data to VTK simple legacy or XML format
depending on the filename extension specified. This can be either
<a href="#id1"><span class="problematic" id="id2">**</span></a>.vtk* for the legacy format or <a href="#id3"><span class="problematic" id="id4">**</span></a>.vtp* and <a href="#id5"><span class="problematic" id="id6">**</span></a>.vtu*, respectively,
<em>*.vtk</em> for the legacy format or <em>*.vtp</em> and <em>*.vtu</em>, respectively,
for the XML format; see the <a class="reference external" href="http://www.vtk.org/VTK/img/file-formats.pdf">VTK homepage</a> for a detailed
description of these formats. Since this naming convention conflicts
with the way binary output is usually specified (see below),

View File

@ -206,14 +206,14 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump</span> <span class="n">d0</span> <span class="nb">all</span> <span class="n">image</span> <span class="mi">100</span> <span class="n">dump</span><span class="o">.*.</span><span class="n">jpg</span> <span class="nb">type</span> <span class="nb">type</span>
<span class="n">dump</span> <span class="n">d1</span> <span class="n">mobile</span> <span class="n">image</span> <span class="mi">500</span> <span class="n">snap</span><span class="o">.*.</span><span class="n">png</span> <span class="n">element</span> <span class="n">element</span> <span class="n">ssao</span> <span class="n">yes</span> <span class="mi">4539</span> <span class="mf">0.6</span>
<span class="n">dump</span> <span class="n">d2</span> <span class="nb">all</span> <span class="n">image</span> <span class="mi">200</span> <span class="n">img</span><span class="o">-*.</span><span class="n">ppm</span> <span class="nb">type</span> <span class="nb">type</span> <span class="n">zoom</span> <span class="mf">2.5</span> <span class="n">adiam</span> <span class="mf">1.5</span> <span class="n">size</span> <span class="mi">1280</span> <span class="mi">720</span>
<span class="n">dump</span> <span class="n">m0</span> <span class="nb">all</span> <span class="n">movie</span> <span class="mi">1000</span> <span class="n">movie</span><span class="o">.</span><span class="n">mpg</span> <span class="nb">type</span> <span class="nb">type</span> <span class="n">size</span> <span class="mi">640</span> <span class="mi">480</span>
<span class="n">dump</span> <span class="n">m1</span> <span class="nb">all</span> <span class="n">movie</span> <span class="mi">1000</span> <span class="n">movie</span><span class="o">.</span><span class="n">avi</span> <span class="nb">type</span> <span class="nb">type</span> <span class="n">size</span> <span class="mi">640</span> <span class="mi">480</span>
<span class="n">dump</span> <span class="n">m2</span> <span class="nb">all</span> <span class="n">movie</span> <span class="mi">100</span> <span class="n">movie</span><span class="o">.</span><span class="n">m4v</span> <span class="nb">type</span> <span class="nb">type</span> <span class="n">zoom</span> <span class="mf">1.8</span> <span class="n">adiam</span> <span class="n">v_value</span> <span class="n">size</span> <span class="mi">1280</span> <span class="mi">720</span>
</pre></div>
</div>
<pre class="literal-block">
dump d0 all image 100 dump.*.jpg type type
dump d1 mobile image 500 snap.*.png element element ssao yes 4539 0.6
dump d2 all image 200 img-*.ppm type type zoom 2.5 adiam 1.5 size 1280 720
dump m0 all movie 1000 movie.mpg type type size 640 480
dump m1 all movie 1000 movie.avi type type size 640 480
dump m2 all movie 100 movie.m4v type type zoom 1.8 adiam v_value size 1280 720
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -310,7 +310,7 @@ atoms rendered in the image. They can be any atom attribute defined
for the <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command, including <em>type</em> and
<em>element</em>. This includes per-atom quantities calculated by a
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>,
which are prefixed by &#8220;<a href="#id9"><span class="problematic" id="id10">c_</span></a>&#8221;, &#8220;<a href="#id11"><span class="problematic" id="id12">f_</span></a>&#8221;, or &#8220;<a href="#id13"><span class="problematic" id="id14">v_</span></a>&#8221; respectively. Note that the
which are prefixed by &#8220;c_&#8221;, &#8220;f_&#8221;, or &#8220;v_&#8221; respectively. Note that the
<em>diameter</em> setting can be overridden with a numeric value applied to
all atoms by the optional <em>adiam</em> keyword.</p>
<p>If <em>type</em> is specified for the <em>color</em> setting, then the color of each
@ -545,9 +545,9 @@ plane perpendicular to the view vector implied by the <em>theta</em> and
<em>pni</em> values, and which is also in the plane defined by the view
vector and user-specified up vector. Thus this internal vector is
computed from the user-specified <em>up</em> vector as</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">up_internal</span> <span class="o">=</span> <span class="n">view</span> <span class="n">cross</span> <span class="p">(</span><span class="n">up</span> <span class="n">cross</span> <span class="n">view</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
up_internal = view cross (up cross view)
</pre>
<p>This means the only restriction on the specified <em>up</em> vector is that
it cannot be parallel to the <em>view</em> vector, implied by the <em>theta</em> and
<em>phi</em> values.</p>
@ -619,10 +619,10 @@ MPEG or other movie file you can use:</p>
</ol>
</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">convert</span> <span class="o">*.</span><span class="n">jpg</span> <span class="n">foo</span><span class="o">.</span><span class="n">gif</span>
<span class="o">%</span> <span class="n">convert</span> <span class="o">-</span><span class="n">loop</span> <span class="mi">1</span> <span class="o">*.</span><span class="n">ppm</span> <span class="n">foo</span><span class="o">.</span><span class="n">mpg</span>
</pre></div>
</div>
<pre class="literal-block">
% convert *.jpg foo.gif
% convert -loop 1 *.ppm foo.mpg
</pre>
<p>Animated GIF files from ImageMagick are unoptimized. You can use a
program like gifsicle to optimize and massively shrink them.
MPEG files created by ImageMagick are in MPEG-1 format with rather
@ -635,7 +635,7 @@ inefficient compression and low quality.</p>
</ul>
<p>Select &#8220;Open Image Sequence&#8221; under the File menu Load the images into
QuickTime to animate them Select &#8220;Export&#8221; under the File menu Save the
movie as a QuickTime movie (<a href="#id7"><span class="problematic" id="id8">*</span></a>.mov) or in another format. QuickTime
movie as a QuickTime movie (*.mov) or in another format. QuickTime
can generate very high quality and efficiently compressed movie
files. Some of the supported formats require to buy a license and some
are not readable on all platforms until specific runtime libraries are
@ -648,10 +648,10 @@ installed.</p>
</ul>
<p>FFmpeg is a command line tool that is available on many platforms and
allows extremely flexible encoding and decoding of movies.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="n">snap</span><span class="o">.*.</span><span class="n">jpg</span> <span class="o">|</span> <span class="n">ffmpeg</span> <span class="o">-</span><span class="n">y</span> <span class="o">-</span><span class="n">f</span> <span class="n">image2pipe</span> <span class="o">-</span><span class="n">c</span><span class="p">:</span><span class="n">v</span> <span class="n">mjpeg</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span> <span class="o">-</span><span class="n">b</span><span class="p">:</span><span class="n">v</span> <span class="mi">2000</span><span class="n">k</span> <span class="n">movie</span><span class="o">.</span><span class="n">m4v</span>
<span class="n">cat</span> <span class="n">snap</span><span class="o">.*.</span><span class="n">ppm</span> <span class="o">|</span> <span class="n">ffmpeg</span> <span class="o">-</span><span class="n">y</span> <span class="o">-</span><span class="n">f</span> <span class="n">image2pipe</span> <span class="o">-</span><span class="n">c</span><span class="p">:</span><span class="n">v</span> <span class="n">ppm</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span> <span class="o">-</span><span class="n">b</span><span class="p">:</span><span class="n">v</span> <span class="mi">2400</span><span class="n">k</span> <span class="n">movie</span><span class="o">.</span><span class="n">avi</span>
</pre></div>
</div>
<pre class="literal-block">
cat snap.*.jpg | ffmpeg -y -f image2pipe -c:v mjpeg -i - -b:v 2000k movie.m4v
cat snap.*.ppm | ffmpeg -y -f image2pipe -c:v ppm -i - -b:v 2400k movie.avi
</pre>
<p>Frontends for FFmpeg exist for multiple platforms. For more
information see the <a class="reference external" href="http://www.ffmpeg.org/">FFmpeg homepage</a></p>
<hr class="docutils" />
@ -678,9 +678,9 @@ variety of file formats and decoders.</li>
<a class="reference external" href="http://www.sandia.gov/~sjplimp/pizza/doc/animate.html">animate tool</a>,
which works directly on a series of image files.</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">a</span> <span class="o">=</span> <span class="n">animate</span><span class="p">(</span><span class="s2">&quot;foo*.jpg&quot;</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
a = animate(&quot;foo*.jpg&quot;)
</pre>
<ul class="simple">
<li>d) QuickTime and other Windows- or MacOS-based media players can
obviously play movie files directly. Similarly for corresponding tools

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>dump_modify command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump_modify</span> <span class="n">dump</span><span class="o">-</span><span class="n">ID</span> <span class="n">keyword</span> <span class="n">values</span> <span class="o">...</span>
</pre></div>
</div>
<pre class="literal-block">
dump_modify dump-ID keyword values ...
</pre>
<ul class="simple">
<li>dump-ID = ID of dump to modify</li>
<li>one or more keyword/value pairs may be appended</li>
@ -228,16 +228,16 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump_modify</span> <span class="mi">1</span> <span class="nb">format</span> <span class="n">line</span> <span class="s2">&quot;</span><span class="si">%d</span><span class="s2"> </span><span class="si">%d</span><span class="s2"> </span><span class="si">%20.15g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2">&quot;</span> <span class="n">scale</span> <span class="n">yes</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="nb">format</span> <span class="nb">float</span> <span class="o">%</span><span class="mf">20.15</span><span class="n">g</span> <span class="n">scale</span> <span class="n">yes</span>
<span class="n">dump_modify</span> <span class="n">myDump</span> <span class="n">image</span> <span class="n">yes</span> <span class="n">scale</span> <span class="n">no</span> <span class="n">flush</span> <span class="n">yes</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">region</span> <span class="n">mySphere</span> <span class="n">thresh</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="mf">0.0</span> <span class="n">thresh</span> <span class="n">epair</span> <span class="o">&gt;=</span> <span class="mf">3.2</span>
<span class="n">dump_modify</span> <span class="n">xtcdump</span> <span class="n">precision</span> <span class="mi">10000</span> <span class="n">sfactor</span> <span class="mf">0.1</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">every</span> <span class="mi">1000</span> <span class="n">nfile</span> <span class="mi">20</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">every</span> <span class="n">v_myVar</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">amap</span> <span class="nb">min</span> <span class="nb">max</span> <span class="n">cf</span> <span class="mf">0.0</span> <span class="mi">3</span> <span class="nb">min</span> <span class="n">green</span> <span class="mf">0.5</span> <span class="n">yellow</span> <span class="nb">max</span> <span class="n">blue</span> <span class="n">boxcolor</span> <span class="n">red</span>
</pre></div>
</div>
<pre class="literal-block">
dump_modify 1 format line &quot;%d %d %20.15g %g %g&quot; scale yes
dump_modify 1 format float %20.15g scale yes
dump_modify myDump image yes scale no flush yes
dump_modify 1 region mySphere thresh x &lt; 0.0 thresh epair &gt;= 3.2
dump_modify xtcdump precision 10000 sfactor 0.1
dump_modify 1 every 1000 nfile 20
dump_modify 1 every v_myVar
dump_modify 1 amap min max cf 0.0 3 min green 0.5 yellow max blue boxcolor red
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -318,19 +318,19 @@ to the dump file. The <em>every</em> keyword cannot be used with the dump
<em>dcd</em> style.</p>
<p>For example, the following commands will
write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">s</span> <span class="n">equal</span> <span class="n">logfreq</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">10</span><span class="p">)</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">atom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">every</span> <span class="n">v_s</span> <span class="n">first</span> <span class="n">yes</span>
</pre></div>
</div>
<pre class="literal-block">
variable s equal logfreq(10,3,10)
dump 1 all atom 100 tmp.dump
dump_modify 1 every v_s first yes
</pre>
<p>The following commands would write snapshots at the timesteps listed
in file tmp.times:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">f</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">times</span>
<span class="n">variable</span> <span class="n">s</span> <span class="n">equal</span> <span class="nb">next</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">atom</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">dump</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="n">every</span> <span class="n">v_s</span>
</pre></div>
</div>
<pre class="literal-block">
variable f file tmp.times
variable s equal next(f)
dump 1 all atom 100 tmp.dump
dump_modify 1 every v_s
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When using a file-style variable with the <em>every</em> keyword, the
@ -406,11 +406,11 @@ an integer and you wish it to appear in the text dump file as a
(large) integer, then you need to use an appropriate format. For
example, these commands:</p>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">local</span> <span class="n">batom1</span> <span class="n">batom2</span>
<span class="n">dump</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">local</span> <span class="mi">100</span> <span class="n">tmp</span><span class="o">.</span><span class="n">bonds</span> <span class="n">index</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
<span class="n">dump_modify</span> <span class="mi">1</span> <span class="nb">format</span> <span class="s2">&quot;</span><span class="si">%d</span><span class="s2"> </span><span class="si">%0.0f</span><span class="s2"> </span><span class="si">%0.0f</span><span class="s2">&quot;</span>
</pre></div>
</div>
<pre class="literal-block">
compute 1 all property/local batom1 batom2
dump 1 all local 100 tmp.bonds index c_1[1] c_1[2]
dump_modify 1 format &quot;%d %0.0f %0.0f&quot;
</pre>
<p>will output the two atom IDs for atoms in each bond as integers. If
the dump_modify command were omitted, they would appear as
floating-point values, assuming they were large integers (more than 6
@ -566,7 +566,7 @@ atoms of each type will be drawn in the image.</p>
<p>The specified <em>type</em> should be an integer from 1 to Ntypes = the
number of atom types. A wildcard asterisk can be used in place of or
in conjunction with the <em>type</em> argument to specify a range of atom
types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
types. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N = the
number of atom types, then an asterisk with no numeric values means
all types from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). A trailing asterisk means all types from n to N
@ -689,15 +689,15 @@ color map without having to specify where all the bin boundaries are.</p>
atoms in individual molecules with a different color. See the
examples/pour/in.pour.2d.molecule input script for an example of how
this is used.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>variable colors string &amp;
<pre class="literal-block">
variable colors string &amp;
&quot;red green blue yellow white &amp;
purple pink orange lime gray&quot;
variable mol atom mol%10
dump 1 all image 250 image.*.jpg v_mol type &amp;
zoom 1.6 adiam 1.5
dump_modify 1 pad 5 amap 0 10 sa 1 10 ${colors}
</pre></div>
</div>
dump_modify 1 pad 5 amap 0 10 sa 1 10 ${colors}
</pre>
<p>In this case, 10 colors are defined, and molecule IDs are
mapped to one of the colors, even if there are 1000s of molecules.</p>
<hr class="docutils" />
@ -711,7 +711,7 @@ set the color that bonds of each type will be drawn in the image.</p>
<p>The specified <em>type</em> should be an integer from 1 to Nbondtypes = the
number of bond types. A wildcard asterisk can be used in place of or
in conjunction with the <em>type</em> argument to specify a range of bond
types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
types. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N = the
number of bond types, then an asterisk with no numeric values means
all types from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). A trailing asterisk means all types from n to N

View File

@ -210,8 +210,8 @@ discussed below, it can be referenced via the following bracket
notation, where ID is the ID of the fix:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>f_ID</td>

View File

@ -170,12 +170,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">adapt</span><span class="o">/</span><span class="n">fep</span> <span class="mi">1</span> <span class="n">pair</span> <span class="n">soft</span> <span class="n">a</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">v_prefactor</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">adapt</span><span class="o">/</span><span class="n">fep</span> <span class="mi">1</span> <span class="n">pair</span> <span class="n">soft</span> <span class="n">a</span> <span class="mi">2</span><span class="o">*</span> <span class="mi">3</span> <span class="n">v_prefactor</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">adapt</span><span class="o">/</span><span class="n">fep</span> <span class="mi">1</span> <span class="n">pair</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span> <span class="n">epsilon</span> <span class="o">*</span> <span class="o">*</span> <span class="n">v_scale1</span> <span class="n">coul</span><span class="o">/</span><span class="n">cut</span> <span class="n">scale</span> <span class="mi">3</span> <span class="mi">3</span> <span class="n">v_scale2</span> <span class="n">scale</span> <span class="n">yes</span> <span class="n">reset</span> <span class="n">yes</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">adapt</span><span class="o">/</span><span class="n">fep</span> <span class="mi">10</span> <span class="n">atom</span> <span class="n">diameter</span> <span class="mi">1</span> <span class="n">v_size</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all adapt/fep 1 pair soft a 1 1 v_prefactor
fix 1 all adapt/fep 1 pair soft a 2* 3 v_prefactor
fix 1 all adapt/fep 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
fix 1 all adapt/fep 10 atom diameter 1 v_size
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -307,7 +307,7 @@ each, as in the 1st example above. I &lt;= J is required. LAMMPS sets
the coefficients for the symmetric J,I interaction to the same values.</p>
<p>A wild-card asterisk can be used in place of or in conjunction with
the I,J arguments to set the coefficients for multiple pairs of atom
types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
types. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or &#8220;m*n&#8221;. If N = the
number of atom types, then an asterisk with no numeric values means
all types from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). A trailing asterisk means all types from n to N
@ -333,10 +333,10 @@ details.</p>
<p>For example, these commands would change the prefactor coefficient of
the <a class="reference internal" href="pair_soft.html"><span class="doc">pair_style soft</span></a> potential from 10.0 to 30.0 in a
linear fashion over the course of a simulation:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">prefactor</span> <span class="n">equal</span> <span class="n">ramp</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">30</span><span class="p">)</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">adapt</span> <span class="mi">1</span> <span class="n">pair</span> <span class="n">soft</span> <span class="n">a</span> <span class="o">*</span> <span class="o">*</span> <span class="n">v_prefactor</span>
</pre></div>
</div>
<pre class="literal-block">
variable prefactor equal ramp(10,30)
fix 1 all adapt 1 pair soft a * * v_prefactor
</pre>
<hr class="docutils" />
<p>The <em>kspace</em> keyword used the specified variable as a scale factor on
the energy, forces, virial calculated by whatever K-Space solver is
@ -369,16 +369,14 @@ constant).</p>
<p>For example, these commands would shrink the diameter of all granular
particles in the &#8220;center&#8221; group from 1.0 to 0.1 in a linear fashion
over the course of a 1000-step simulation:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">variable</span> <span class="n">size</span> <span class="n">equal</span> <span class="n">ramp</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">0.1</span><span class="p">)</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="n">center</span> <span class="n">adapt</span> <span class="mi">10</span> <span class="n">atom</span> <span class="n">diameter</span> <span class="o">*</span> <span class="n">v_size</span>
</pre></div>
</div>
<pre class="literal-block">
variable size equal ramp(1.0,0.1)
fix 1 center adapt 10 atom diameter * v_size
</pre>
<p>For <a class="reference internal" href="run_style.html"><span class="doc">rRESPA time integration</span></a>, this fix changes
parameters on the outermost rRESPA level.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. No parameter of this fix can

View File

@ -140,10 +140,10 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">kick</span> <span class="n">bead</span> <span class="n">addtorque</span> <span class="mf">2.0</span> <span class="mf">3.0</span> <span class="mf">5.0</span>
<span class="n">fix</span> <span class="n">kick</span> <span class="n">bead</span> <span class="n">addtorque</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="n">v_oscillate</span>
</pre></div>
</div>
<pre class="literal-block">
fix kick bead addtorque 2.0 3.0 5.0
fix kick bead addtorque 0.0 0.0 v_oscillate
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -166,10 +166,8 @@ torque component.</p>
functions, and include <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command
keywords for the simulation box parameters and timestep and elapsed
time. Thus it is easy to specify a time-dependent torque.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>.</p>
<p>The <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>energy</em> option is supported by this
fix to add the potential &#8220;energy&#8221; inferred by the added forces to the

View File

@ -128,9 +128,9 @@
<span id="index-0"></span><h1>fix atc command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="o">&lt;</span><span class="n">fixID</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">group</span><span class="o">&gt;</span> <span class="n">atc</span> <span class="o">&lt;</span><span class="nb">type</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">parameter_file</span><span class="o">&gt;</span>
</pre></div>
</div>
<pre class="literal-block">
fix &lt;fixID&gt; &lt;group&gt; atc &lt;type&gt; &lt;parameter_file&gt;
</pre>
<ul class="simple">
<li>fixID = name of fix</li>
<li>group = name of group fix is to be applied</li>
@ -148,12 +148,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">thermal</span> <span class="n">Ar_thermal</span><span class="o">.</span><span class="n">dat</span>
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">two_temperature</span> <span class="n">Ar_ttm</span><span class="o">.</span><span class="n">mat</span>
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">hardy</span>
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">field</span>
</pre></div>
</div>
<pre class="literal-block">
fix AtC internal atc thermal Ar_thermal.dat
fix AtC internal atc two_temperature Ar_ttm.mat
fix AtC internal atc hardy
fix AtC internal atc field
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -163,31 +163,31 @@
<span class="c1"># ... commands to create and initialize the MD system</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># initial fix to designate coupling type and group to apply it to</span>
<span class="c1"># tag group physics material_file</span>
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">thermal</span> <span class="n">Ar_thermal</span><span class="o">.</span><span class="n">mat</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># create a uniform 12 x 2 x 2 mesh that covers region contain the group</span>
<span class="c1"># nx ny nz region periodicity</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">mesh</span> <span class="n">create</span> <span class="mi">12</span> <span class="mi">2</span> <span class="mi">2</span> <span class="n">mdRegion</span> <span class="n">f</span> <span class="n">p</span> <span class="n">p</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># specify the control method for the type of coupling</span>
<span class="c1"># physics control_type</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">thermal</span> <span class="n">control</span> <span class="n">flux</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># specify the initial values for the empirical field &quot;temperature&quot;</span>
<span class="c1"># field node_group value</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">initial</span> <span class="n">temperature</span> <span class="nb">all</span> <span class="mi">30</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># create an output stream for nodal fields</span>
<span class="c1"># filename output_frequency</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">output</span> <span class="n">atc_fe_output</span> <span class="mi">100</span>
</pre></div>
</div>
<pre class="literal-block">
# initial fix to designate coupling type and group to apply it to
# tag group physics material_file
fix AtC internal atc thermal Ar_thermal.mat
</pre>
<pre class="literal-block">
# create a uniform 12 x 2 x 2 mesh that covers region contain the group
# nx ny nz region periodicity
fix_modify AtC mesh create 12 2 2 mdRegion f p p
</pre>
<pre class="literal-block">
# specify the control method for the type of coupling
# physics control_type
fix_modify AtC thermal control flux
</pre>
<pre class="literal-block">
# specify the initial values for the empirical field &quot;temperature&quot;
# field node_group value
fix_modify AtC initial temperature all 30
</pre>
<pre class="literal-block">
# create an output stream for nodal fields
# filename output_frequency
fix_modify AtC output atc_fe_output 100
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">run</span> <span class="mi">1000</span>
</pre></div>
</div>
@ -200,30 +200,30 @@
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">internal</span> <span class="n">atc</span> <span class="n">hardy</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># for hardy fix, specific kernel function (function type and range) to # be used as a localization function</span>
<span class="n">fix</span> <span class="n">AtC</span> <span class="n">kernel</span> <span class="n">quartic_sphere</span> <span class="mf">10.0</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># create a uniform 1 x 1 x 1 mesh that covers region contain the group</span>
<span class="c1"># with periodicity this effectively creats a system average</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">mesh</span> <span class="n">create</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">box</span> <span class="n">p</span> <span class="n">p</span> <span class="n">p</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># change from default lagrangian map to eulerian</span>
<span class="c1"># refreshed every 100 steps</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">atom_element_map</span> <span class="n">eulerian</span> <span class="mi">100</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># start with no field defined</span>
<span class="c1"># add mass density, potential energy density, stress and temperature</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">fields</span> <span class="n">add</span> <span class="n">density</span> <span class="n">energy</span> <span class="n">stress</span> <span class="n">temperature</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># create an output stream for nodal fields</span>
<span class="c1"># filename output_frequency</span>
<span class="n">fix_modify</span> <span class="n">AtC</span> <span class="n">output</span> <span class="n">nvtFE</span> <span class="mi">100</span> <span class="n">text</span>
</pre></div>
</div>
<pre class="literal-block">
# for hardy fix, specific kernel function (function type and range) to # be used as a localization function
fix AtC kernel quartic_sphere 10.0
</pre>
<pre class="literal-block">
# create a uniform 1 x 1 x 1 mesh that covers region contain the group
# with periodicity this effectively creats a system average
fix_modify AtC mesh create 1 1 1 box p p p
</pre>
<pre class="literal-block">
# change from default lagrangian map to eulerian
# refreshed every 100 steps
fix_modify AtC atom_element_map eulerian 100
</pre>
<pre class="literal-block">
# start with no field defined
# add mass density, potential energy density, stress and temperature
fix_modify AtC fields add density energy stress temperature
</pre>
<pre class="literal-block">
# create an output stream for nodal fields
# filename output_frequency
fix_modify AtC output nvtFE 100 text
</pre>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">run</span> <span class="mi">1000</span>
</pre></div>
</div>
@ -235,10 +235,8 @@
<p>fix_modify AtC mesh create 1 1 1 box p p p</p>
<p>...</p>
<p>Note coupling and post-processing can be combined in the same simulations using separate fixes.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. The <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options relevant to this fix are listed below. No global scalar or vector or per-atom quantities are stored by this fix for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>. No parameter of this fix can be used with the <em>start/stop</em> keywords of the <a class="reference internal" href="run.html"><span class="doc">run</span></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><span class="doc">energy minimization</span></a>.</p>
</div>
<div class="section" id="restrictions">

View File

@ -156,11 +156,11 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">atom</span><span class="o">/</span><span class="n">swap</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">29494</span> <span class="mf">300.0</span> <span class="n">ke</span> <span class="n">no</span> <span class="n">types</span> <span class="mi">1</span> <span class="mi">2</span>
<span class="n">fix</span> <span class="n">myFix</span> <span class="nb">all</span> <span class="n">atom</span><span class="o">/</span><span class="n">swap</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">12345</span> <span class="mf">298.0</span> <span class="n">region</span> <span class="n">my_swap_region</span> <span class="n">types</span> <span class="mi">5</span> <span class="mi">6</span>
<span class="n">fix</span> <span class="n">SGMC</span> <span class="nb">all</span> <span class="n">atom</span><span class="o">/</span><span class="n">swap</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">345</span> <span class="mf">1.0</span> <span class="n">semi</span><span class="o">-</span><span class="n">grand</span> <span class="n">yes</span> <span class="n">types</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="n">mu</span> <span class="mf">0.0</span> <span class="mf">4.3</span> <span class="o">-</span><span class="mf">5.0</span>
</pre></div>
</div>
<pre class="literal-block">
fix 2 all atom/swap 1 1 29494 300.0 ke no types 1 2
fix myFix all atom/swap 100 1 12345 298.0 region my_swap_region types 5 6
fix SGMC all atom/swap 1 100 345 1.0 semi-grand yes types 1 2 3 mu 0.0 4.3 -5.0
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -250,9 +250,7 @@ system (the quantity used when performing GCMC moves),
you MUST enable the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>energy</em> option for
that fix. The doc pages for individual <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> commands
specify if this should be done.</p>
</div>
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>This fix writes the state of the fix to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. This includes information about the random
number generator seed, the next timestep for MC exchanges, etc. See
the <a class="reference internal" href="read_restart.html"><span class="doc">read_restart</span></a> command for info on how to

View File

@ -140,22 +140,22 @@
one or more input values can be listed</li>
<li>value = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID[i], f_ID, f_ID[i], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">100</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/atom 1 100 100 vx vy vz
fix 1 all ave/atom 10 20 1000 c_my_stress[1]
fix 1 all ave/atom 10 20 1000 c_my_stress[*]
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -181,7 +181,7 @@ are the only ones that can be used with this fix since they produce
per-atom vectors.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -192,13 +192,13 @@ means all indices from m to n (inclusive).</p>
had been listed one by one. E.g. these 2 fix ave/atom commands are
equivalent, since the <a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a>
command creates a per-atom array with 6 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">my_stress</span> <span class="nb">all</span> <span class="n">stress</span><span class="o">/</span><span class="n">atom</span> <span class="n">NULL</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">atom</span> <span class="mi">10</span> <span class="mi">20</span> <span class="mi">1000</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_my_stress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_my_stress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_my_stress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute my_stress all stress/atom NULL
fix 1 all ave/atom 10 20 1000 c_my_stress[*]
fix 1 all ave/atom 10 20 1000 c_my_stress[1] c_my_stress[1] &amp;
c_my_stress[3] c_my_stress[4] &amp;
c_my_stress[5] c_my_stress[6]
</pre>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used in order to contribute to the
@ -228,7 +228,7 @@ this is not what you want, consider averaging unwrapped coordinates,
which can be provided by the <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command via its xu,yu,zu
attributes.</p>
</div>
<p>If a value begins with &#8220;<a href="#id1"><span class="problematic" id="id2">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the per-atom vector calculated by the compute is used. If a
bracketed term containing an index I is appended, the Ith column of
@ -236,7 +236,7 @@ the per-atom array calculated by the compute is used. Users can also
write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the per-atom vector calculated by the fix is used. If a
bracketed term containing an index I is appended, the Ith column of
@ -246,15 +246,13 @@ compatible with <em>Nevery</em>, else an error will result. Users can also
write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the discussion above for how I can
be specified with a wildcard asterisk to effectively specify multiple
values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script as an <a class="reference internal" href="variable.html"><span class="doc">atom-style variable</span></a> Variables of style <em>atom</em> can reference
thermodynamic keywords, or invoke other computes, fixes, or variables
when they are evaluated, so this is a very general means of generating
per-atom quantities to time average.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix. No global scalar or vector quantities are
stored by this fix for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">output commands</span></a>.</p>

View File

@ -141,16 +141,16 @@
<li>one or more input values can be listed</li>
<li>value = vx, vy, vz, fx, fy, fz, density/mass, density/number, temp, c_ID, c_ID[I], f_ID, f_ID[I], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">density</span><span class="o">/</span><span class="n">number</span><span class="p">,</span> <span class="n">density</span><span class="o">/</span><span class="n">mass</span> <span class="o">=</span> <span class="n">number</span> <span class="ow">or</span> <span class="n">mass</span> <span class="n">density</span>
<span class="n">temp</span> <span class="o">=</span> <span class="n">temperature</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">per</span><span class="o">-</span><span class="n">atom</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component)
density/number, density/mass = number or mass density
temp = temperature
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID, I can include wildcard (see below)
v_name = per-atom vector calculated by an atom-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>norm</em> or <em>ave</em> or <em>bias</em> or <em>adof</em> or <em>cdof</em> or <em>file</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>title3</em></li>
@ -185,12 +185,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">10000</span> <span class="mi">1</span> <span class="mi">10000</span> <span class="n">binchunk</span> <span class="n">c_myCentro</span> <span class="n">title1</span> <span class="s2">&quot;My output values&quot;</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="n">flow</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">10</span> <span class="mi">1000</span> <span class="n">molchunk</span> <span class="n">vx</span> <span class="n">vz</span> <span class="n">norm</span> <span class="n">sample</span> <span class="n">file</span> <span class="n">vel</span><span class="o">.</span><span class="n">profile</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="n">flow</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">binchunk</span> <span class="n">density</span><span class="o">/</span><span class="n">mass</span> <span class="n">ave</span> <span class="n">running</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="n">flow</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">binchunk</span> <span class="n">density</span><span class="o">/</span><span class="n">mass</span> <span class="n">ave</span> <span class="n">running</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro title1 &quot;My output values&quot;
fix 1 flow ave/chunk 100 10 1000 molchunk vx vz norm sample file vel.profile
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
</pre>
<p><strong>NOTE:</strong></p>
<p>If you are trying to replace a deprectated fix ave/spatial command
with the newer, more flexible fix ave/chunk and <a class="reference internal" href="compute_chunk_atom.html"><span class="doc">compute chunk/atom</span></a> commands, you simply need to split
@ -242,7 +242,7 @@ ones that can be used with this fix since all other styles of variable
produce global quantities.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -253,11 +253,11 @@ means all indices from m to n (inclusive).</p>
had been listed one by one. E.g. these 2 fix ave/chunk commands are
equivalent, since the <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command creates, in this
case, a per-atom array with 3 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myAng</span> <span class="nb">all</span> <span class="nb">property</span><span class="o">/</span><span class="n">atom</span> <span class="n">angmomx</span> <span class="n">angmomy</span> <span class="n">angmomz</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">cc1</span> <span class="n">c_myAng</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">angmom</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">chunk</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">cc1</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myAng</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp</span><span class="o">.</span><span class="n">angmom</span>
</pre></div>
</div>
<pre class="literal-block">
compute myAng all property/atom angmomx angmomy angmomz
fix 1 all ave/chunk 100 1 100 cc1 c_myAng[*] file tmp.angmom
fix 2 all ave/chunk 100 1 100 cc1 c_myAng[1] c_myAng[2] c_myAng[3] file tmp.angmom
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This fix works by creating an array of size <em>Nchunk</em> by Nvalues
@ -349,7 +349,7 @@ in the chunk on different timesteps were collected together as one set
of atoms to calculate their temperature. The compute allows the
center-of-mass velocity of each chunk to be subtracted before
calculating the temperature; this fix does not.</p>
<p>If a value begins with &#8220;<a href="#id1"><span class="problematic" id="id2">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
@ -357,7 +357,7 @@ calculated by the compute is used. Users can also write code for
their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.
See the discussion above for how I can be specified with a wildcard
asterisk to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
@ -367,7 +367,7 @@ their values on certain timesteps, which must be compatible with
own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>. See the
discussion above for how I can be specified with a wildcard asterisk
to effectively specify multiple values.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script. Variables of style
<em>atom</em> can reference thermodynamic keywords and various per-atom
attributes, or invoke other computes, fixes, or variables when they
@ -502,10 +502,8 @@ value of the <em>units</em> keyword is <em>reduced</em>, the coordinate values w
be in unitless reduced units (0-1). This is not true for the Coord1 value
of style <em>bin/sphere</em> or <em>bin/cylinder</em> which both represent radial
dimensions. Those values are always in distance <a class="reference internal" href="units.html"><span class="doc">units</span></a>.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes a global array of values which can be accessed by

View File

@ -140,14 +140,14 @@
<li>one or more input values can be listed</li>
<li>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="k">global</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
v_name = global value calculated by an equal-style variable with name
v_name[I] = Ith component of a vector-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>type</em> or <em>ave</em> or <em>start</em> or <em>prefactor</em> or <em>file</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>title3</em></li>
@ -180,12 +180,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">5</span> <span class="mi">100</span> <span class="mi">1000</span> <span class="n">c_myTemp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">correlate</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">1</span> <span class="mi">50</span> <span class="mi">10000</span> <span class="o">&amp;</span>
<span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="nb">type</span> <span class="n">upper</span> <span class="n">ave</span> <span class="n">running</span> <span class="n">title1</span> <span class="s2">&quot;My correlation data&quot;</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/correlate 5 100 1000 c_myTemp file temp.correlate
fix 1 all ave/correlate 1 50 10000 &amp;
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &amp;
type upper ave running title1 &quot;My correlation data&quot;
</pre>
<p>fix 1 all ave/correlate 1 50 10000 c_thermo_press[*]</p>
</div>
<div class="section" id="description">
@ -221,7 +221,7 @@ ones that can be used with this fix. Variables of style <em>atom</em> cannot
be used, since they produce per-atom values.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -232,13 +232,13 @@ means all indices from m to n (inclusive).</p>
vector had been listed one by one. E.g. these 2 fix ave/correlate
commands are equivalent, since the <a class="reference internal" href="compute_pressure.html"><span class="doc">compute pressure</span></a> command creates a global vector with 6
values.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myPress</span> <span class="nb">all</span> <span class="n">pressure</span> <span class="n">NULL</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">1</span> <span class="mi">50</span> <span class="mi">10000</span> <span class="n">c_myPress</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span> <span class="mi">1</span> <span class="mi">50</span> <span class="mi">10000</span> <span class="o">&amp;</span>
<span class="n">c_myPress</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="n">c_myPress</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="n">c_myPress</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
compute myPress all pressure NULL
fix 1 all ave/correlate 1 50 10000 c_myPress[*]
fix 1 all ave/correlate 1 50 10000 &amp;
c_myPress[1] c_myPress[2] c_myPress[3] &amp;
c_myPress[4] c_myPress[5] c_myPress[6]
</pre>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used to calculate correlation data.
@ -249,9 +249,9 @@ initial time up to an output timestep. The initial time could be the
beginning of the simulation or the last output time; see the <em>ave</em>
keyword for options. For the set of samples, the correlation value
Cij is calculated as:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Cij</span><span class="p">(</span><span class="n">delta</span><span class="p">)</span> <span class="o">=</span> <span class="n">ave</span><span class="p">(</span><span class="n">Vi</span><span class="p">(</span><span class="n">t</span><span class="p">)</span><span class="o">*</span><span class="n">Vj</span><span class="p">(</span><span class="n">t</span><span class="o">+</span><span class="n">delta</span><span class="p">))</span>
</pre></div>
</div>
<pre class="literal-block">
Cij(delta) = ave(Vi(t)*Vj(t+delta))
</pre>
<p>which is the correlation value between input values Vi and Vj,
separated by time delta. Note that the second value Vj in the pair is
always the one sampled at the later time. The ave() represents an
@ -259,9 +259,9 @@ average over every pair of samples in the set that are separated by
time delta. The maximum delta used is of size (<em>Nrepeat</em>-1)*<em>Nevery</em>.
Thus the correlation between a pair of input values yields <em>Nrepeat</em>
correlation datums:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Cij</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="n">Cij</span><span class="p">(</span><span class="n">Nevery</span><span class="p">),</span> <span class="n">Cij</span><span class="p">(</span><span class="mi">2</span><span class="o">*</span><span class="n">Nevery</span><span class="p">),</span> <span class="o">...</span><span class="p">,</span> <span class="n">Cij</span><span class="p">((</span><span class="n">Nrepeat</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">*</span><span class="n">Nevery</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
Cij(0), Cij(Nevery), Cij(2*Nevery), ..., Cij((Nrepeat-1)*Nevery)
</pre>
<p>For example, if Nevery=5, Nrepeat=6, and Nfreq=100, then values on
timesteps 0,5,10,15,...,100 will be used to compute the final averages
on timestep 100. Six averages will be computed: Cij(0), Cij(5),
@ -272,7 +272,7 @@ Vi(10)*V j20), Vi(15)*Vj(25), ..., Vi(85)*Vj(95), Vi(90)*Vj(100).</p>
non-zero. Also, if the <em>ave</em> keyword is set to <em>one</em> which is the
default, then <em>Nfreq</em> &gt;= (<em>Nrepeat</em>-1)*<em>Nevery</em> is required.</p>
<hr class="docutils" />
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the compute is used. If a
bracketed term is appended, the Ith element of the global vector
@ -286,7 +286,7 @@ defined not in your input script, but by <a class="reference internal" href="the
or <a class="reference internal" href="fix_temp_rescale.html"><span class="doc">fix temp/rescale</span></a>. See the doc pages for
these commands which give the IDs of these computes. Users can also
write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. If no bracketed term is
appended, the global scalar calculated by the fix is used. If a
bracketed term is appended, the Ith element of the global vector
@ -296,7 +296,7 @@ values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id7"><span class="problematic" id="id8">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script. Only equal-style or
vector-style variables can be referenced; the latter requires a
bracketed term to specify the Ith element of the vector calculated by
@ -366,11 +366,11 @@ the strings that will be printed as the first 3 lines of the output
file, assuming the <em>file</em> keyword was used. LAMMPS uses default
values for each of these, so they do not need to be specified.</p>
<p>By default, these header lines are as follows:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Time-correlated data for fix ID</span>
<span class="c1"># TimeStep Number-of-time-windows</span>
<span class="c1"># Index TimeDelta Ncount valueI*valueJ valueI*valueJ ...</span>
</pre></div>
</div>
<pre class="literal-block">
# Time-correlated data for fix ID
# TimeStep Number-of-time-windows
# Index TimeDelta Ncount valueI*valueJ valueI*valueJ ...
</pre>
<p>In the first line, ID is replaced with the fix-ID. The second line
describes the two values that are printed at the first of each section
of output. In the third line the value pairs are replaced with the
@ -378,9 +378,9 @@ appropriate fields from the fix ave/correlate command.</p>
<hr class="docutils" />
<p>Let Sij = a set of time correlation data for input values I and J,
namely the <em>Nrepeat</em> values:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Sij</span> <span class="o">=</span> <span class="n">Cij</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="n">Cij</span><span class="p">(</span><span class="n">Nevery</span><span class="p">),</span> <span class="n">Cij</span><span class="p">(</span><span class="mi">2</span><span class="o">*</span><span class="n">Nevery</span><span class="p">),</span> <span class="o">...</span><span class="p">,</span> <span class="n">Cij</span><span class="p">(</span><span class="o">*</span><span class="n">Nrepeat</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">*</span><span class="n">Nevery</span><span class="p">)</span>
</pre></div>
</div>
<pre class="literal-block">
Sij = Cij(0), Cij(Nevery), Cij(2*Nevery), ..., Cij(*Nrepeat-1)*Nevery)
</pre>
<p>As explained below, these datums are output as one column of a global
array, which is effectively the correlation matrix.</p>
<p>The <em>trap</em> function defined for <a class="reference internal" href="variable.html"><span class="doc">equal-style variables</span></a>
@ -389,10 +389,8 @@ using a trapezoidal rule. This is useful for calculating various
quantities which can be derived from time correlation data. If a
normalization factor is needed for the time integration, it can be
included in the variable formula or via the <em>prefactor</em> keyword.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes a global array of values which can be accessed by

View File

@ -139,13 +139,13 @@
<li>one or more input values can be listed</li>
<li>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="k">global</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
v_name = global value calculated by an equal-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>type</em> or <em>start</em> or <em>file</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>ncorr</em> or <em>p</em> or <em>m</em></li>
@ -177,12 +177,12 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span><span class="o">/</span><span class="n">long</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_myTemp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">correlate</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">correlate</span><span class="o">/</span><span class="n">long</span> <span class="mi">1</span> <span class="mi">10000</span> <span class="o">&amp;</span>
<span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">&amp;</span>
<span class="nb">type</span> <span class="n">upper</span> <span class="n">title1</span> <span class="s2">&quot;My correlation data&quot;</span> <span class="n">nlen</span> <span class="mi">15</span> <span class="n">ncount</span> <span class="mi">3</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/correlate/long 5 1000 c_myTemp file temp.correlate
fix 1 all ave/correlate/long 1 10000 &amp;
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &amp;
type upper title1 &quot;My correlation data&quot; nlen 15 ncount 3
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -221,9 +221,7 @@ steps can be calculated.</p>
4*ncorr*nlen*8 bytes. With the default values of the parameters, this
corresponds to about 10 KB.</p>
<p>For the meaning of the additional optional keywords, see the <a class="reference internal" href="fix_ave_correlate.html"><span class="doc">fix ave/correlate</span></a> doc page.</p>
</div>
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>Since this fix in intended for the calculation of time correlation
functions over very long MD simulations, the information about this
fix is written automatically to binary restart files, so that the time

View File

@ -145,15 +145,15 @@
<li>one or more input values can be listed</li>
<li>value = x, y, z, vx, vy, vz, fx, fy, fz, c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">vx</span><span class="p">,</span><span class="n">vy</span><span class="p">,</span><span class="n">vz</span><span class="p">,</span><span class="n">fx</span><span class="p">,</span><span class="n">fy</span><span class="p">,</span><span class="n">fz</span> <span class="o">=</span> <span class="n">atom</span> <span class="n">attribute</span> <span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="n">velocity</span><span class="p">,</span> <span class="n">force</span> <span class="n">component</span><span class="p">)</span>
<span class="n">c_ID</span> <span class="o">=</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">value</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">atom</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (position, velocity, force component)
c_ID = scalar or vector calculated by a compute with ID
c_ID[I] = Ith component of vector or Ith column of array calculated by a compute with ID, I can include wildcard (see below)
f_ID = scalar or vector calculated by a fix with ID
f_ID[I] = Ith component of vector or Ith column of array calculated by a fix with ID, I can include wildcard (see below)
v_name = value(s) calculated by an equal-style or vector-style or atom-style variable with name
v_name[I] = value calculated by a vector-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>mode</em> or <em>file</em> or <em>ave</em> or <em>start</em> or <em>beyond</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>title3</em></li>
@ -185,13 +185,13 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="mf">0.5</span> <span class="mf">1.5</span> <span class="mi">50</span> <span class="n">c_myTemp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">histo</span> <span class="n">ave</span> <span class="n">running</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">100</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">title1</span> <span class="s2">&quot;My output values&quot;</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="o">-</span><span class="mi">5</span> <span class="mi">5</span> <span class="mi">100</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">1000</span> <span class="o">-</span><span class="mf">2.0</span> <span class="mf">2.0</span> <span class="mi">18</span> <span class="n">vx</span> <span class="n">vy</span> <span class="n">vz</span> <span class="n">mode</span> <span class="n">vector</span> <span class="n">ave</span> <span class="n">running</span> <span class="n">beyond</span> <span class="n">extra</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span><span class="o">/</span><span class="n">weight</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">10</span> <span class="mi">100</span> <span class="mi">2000</span> <span class="n">c_XRD</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_XRD</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/histo 100 5 1000 0.5 1.5 50 c_myTemp file temp.histo ave running
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press[2] c_thermo_press[3] title1 &quot;My output values&quot;
fix 1 all ave/histo 100 5 1000 -5 5 100 c_thermo_press[*]
fix 1 all ave/histo 1 100 1000 -2.0 2.0 18 vx vy vz mode vector ave running beyond extra
fix 1 all ave/histo/weight 1 1 1 10 100 2000 c_XRD[1] c_XRD[2]
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -232,7 +232,7 @@ with a bracketed term appended, indicating the Ith column of the array
is used.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -243,11 +243,11 @@ means all indices from m to n (inclusive).</p>
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/histo commands are equivalent, since the <a class="reference internal" href="compute_com_chunk.html"><span class="doc">compute com/chunk</span></a> command creates a global array with
3 columns:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myCOM</span> <span class="nb">all</span> <span class="n">com</span><span class="o">/</span><span class="n">chunk</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">com</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">histo</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myCOM</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp2</span><span class="o">.</span><span class="n">com</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute myCOM all com/chunk
fix 1 all ave/histo 100 1 100 c_myCOM[*] file tmp1.com mode vector
fix 2 all ave/histo 100 1 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector
</pre>
<p>If the fix ave/histo/weight command is used, exactly two values must
be specified. If the values are vectors, they must be the same
length. The first value (a scalar or vector) is what is histogrammed
@ -278,7 +278,7 @@ simply generated on timesteps 100,200,etc.</p>
self-explanatory. Note that other atom attributes can be used as
inputs to this fix by using the <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command and then specifying
an input value from that compute.</p>
<p>If a value begins with &#8220;<a href="#id1"><span class="problematic" id="id2">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. If <em>mode</em> = scalar, then if
no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
@ -295,7 +295,7 @@ can thus be accessed by fix ave/histo. Or it can be a compute defined
not in your input script, but by <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic output</span></a> or other fixes such as <a class="reference internal" href="fix_nh.html"><span class="doc">fix nvt</span></a> or <a class="reference internal" href="fix_temp_rescale.html"><span class="doc">fix temp/rescale</span></a>. See
the doc pages for these commands which give the IDs of these computes.
Users can also write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. If <em>mode</em> = scalar, then if
no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
@ -309,7 +309,7 @@ values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script. If <em>mode</em> = scalar, then
only equal-style or vector-style variables can be used, which both
produce global values. In this mode, a vector-style variable requires
@ -399,10 +399,8 @@ values for each of these, so they do not need to be specified.</p>
describes the six values that are printed at the first of each section
of output. The third describes the 4 values printed for each bin in
the histogram.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix produces a global vector and global array which can be

View File

@ -140,14 +140,14 @@
<li>one or more input values can be listed</li>
<li>value = c_ID, c_ID[N], f_ID, f_ID[N], v_name</li>
</ul>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">c_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">c_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">compute</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">f_ID</span> <span class="o">=</span> <span class="k">global</span> <span class="n">scalar</span> <span class="ow">or</span> <span class="n">vector</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span>
<span class="n">f_ID</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">Ith</span> <span class="n">component</span> <span class="n">of</span> <span class="k">global</span> <span class="n">vector</span> <span class="ow">or</span> <span class="n">Ith</span> <span class="n">column</span> <span class="n">of</span> <span class="k">global</span> <span class="n">array</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">fix</span> <span class="k">with</span> <span class="n">ID</span><span class="p">,</span> <span class="n">I</span> <span class="n">can</span> <span class="n">include</span> <span class="n">wildcard</span> <span class="p">(</span><span class="n">see</span> <span class="n">below</span><span class="p">)</span>
<span class="n">v_name</span> <span class="o">=</span> <span class="n">value</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">an</span> <span class="n">equal</span><span class="o">-</span><span class="n">style</span> <span class="ow">or</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
<span class="n">v_name</span><span class="p">[</span><span class="n">I</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span> <span class="n">calculated</span> <span class="n">by</span> <span class="n">a</span> <span class="n">vector</span><span class="o">-</span><span class="n">style</span> <span class="n">variable</span> <span class="k">with</span> <span class="n">name</span>
</pre></div>
</div>
<pre class="literal-block">
c_ID = global scalar or vector calculated by a compute with ID
c_ID[I] = Ith component of global vector or Ith column of global array calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar or vector calculated by a fix with ID
f_ID[I] = Ith component of global vector or Ith column of global array calculated by a fix with ID, I can include wildcard (see below)
v_name = value(s) calculated by an equal-style or vector-style variable with name
v_name[I] = value calculated by a vector-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>mode</em> or <em>file</em> or <em>ave</em> or <em>start</em> or <em>off</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>title3</em></li>
@ -179,13 +179,13 @@
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_myTemp</span> <span class="n">c_thermo_temp</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">profile</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">ave</span> <span class="n">window</span> <span class="mi">20</span> <span class="o">&amp;</span>
<span class="n">title1</span> <span class="s2">&quot;My output values&quot;</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">5</span> <span class="mi">1000</span> <span class="n">c_thermo_press</span><span class="p">[</span><span class="o">*</span><span class="p">]</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">1</span> <span class="mi">100</span> <span class="mi">1000</span> <span class="n">f_indent</span> <span class="n">f_indent</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">file</span> <span class="n">temp</span><span class="o">.</span><span class="n">indent</span> <span class="n">off</span> <span class="mi">1</span>
</pre></div>
</div>
<pre class="literal-block">
fix 1 all ave/time 100 5 1000 c_myTemp c_thermo_temp file temp.profile
fix 1 all ave/time 100 5 1000 c_thermo_press[2] ave window 20 &amp;
title1 &quot;My output values&quot;
fix 1 all ave/time 100 5 1000 c_thermo_press[*]
fix 1 all ave/time 1 100 1000 f_indent f_indent[1] file temp.indent off 1
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
@ -228,7 +228,7 @@ is used. All vectors must be the same length, which is the length of
the vector or number of rows in the array.</p>
<p>Note that for values from a compute or fix, the bracketed index I can
be specified using a wildcard asterisk with the index to effectively
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or
specify multiple values. This takes the form &#8220;*&#8221; or &#8220;*n&#8221; or &#8220;n*&#8221; or
&#8220;m*n&#8221;. If N = the size of the vector (for <em>mode</em> = scalar) or the
number of columns in the array (for <em>mode</em> = vector), then an asterisk
with no numeric values means all indices from 1 to N. A leading
@ -239,11 +239,11 @@ means all indices from m to n (inclusive).</p>
vector or columns of the array had been listed one by one. E.g. these
2 fix ave/time commands are equivalent, since the <a class="reference internal" href="compute_rdf.html"><span class="doc">compute rdf</span></a> command creates, in this case, a global array
with 3 columns, each of length 50:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">myRDF</span> <span class="nb">all</span> <span class="n">rdf</span> <span class="mi">50</span> <span class="mi">1</span> <span class="mi">2</span>
<span class="n">fix</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="o">*</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp1</span><span class="o">.</span><span class="n">rdf</span> <span class="n">mode</span> <span class="n">vector</span>
<span class="n">fix</span> <span class="mi">2</span> <span class="nb">all</span> <span class="n">ave</span><span class="o">/</span><span class="n">time</span> <span class="mi">100</span> <span class="mi">1</span> <span class="mi">100</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="n">c_myRDF</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="n">file</span> <span class="n">tmp2</span><span class="o">.</span><span class="n">rdf</span> <span class="n">mode</span> <span class="n">vector</span>
</pre></div>
</div>
<pre class="literal-block">
compute myRDF all rdf 50 1 2
fix 1 all ave/time 100 1 100 c_myRDF[*] file tmp1.rdf mode vector
fix 2 all ave/time 100 1 100 c_myRDF[1] c_myRDF[2] c_myRDF[3] file tmp2.rdf mode vector
</pre>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used in order to contribute to the
@ -261,7 +261,7 @@ timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time
averaging is done; values are simply generated on timesteps
100,200,etc.</p>
<hr class="docutils" />
<p>If a value begins with &#8220;<a href="#id1"><span class="problematic" id="id2">c_</span></a>&#8221;, a compute ID must follow which has been
<p>If a value begins with &#8220;c_&#8221;, a compute ID must follow which has been
previously defined in the input script. If <em>mode</em> = scalar, then if
no bracketed term is appended, the global scalar calculated by the
compute is used. If a bracketed term is appended, the Ith element of
@ -277,7 +277,7 @@ can thus be accessed by fix ave/time. Or it can be a compute defined
not in your input script, but by <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic output</span></a> or other fixes such as <a class="reference internal" href="fix_nh.html"><span class="doc">fix nvt</span></a> or <a class="reference internal" href="fix_temp_rescale.html"><span class="doc">fix temp/rescale</span></a>. See
the doc pages for these commands which give the IDs of these computes.
Users can also write code for their own compute styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id3"><span class="problematic" id="id4">f_</span></a>&#8221;, a fix ID must follow which has been
<p>If a value begins with &#8220;f_&#8221;, a fix ID must follow which has been
previously defined in the input script. If <em>mode</em> = scalar, then if
no bracketed term is appended, the global scalar calculated by the fix
is used. If a bracketed term is appended, the Ith element of the
@ -290,7 +290,7 @@ specify multiple values.</p>
<p>Note that some fixes only produce their values on certain timesteps,
which must be compatible with <em>Nevery</em>, else an error will result.
Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><span class="doc">add them to LAMMPS</span></a>.</p>
<p>If a value begins with &#8220;<a href="#id5"><span class="problematic" id="id6">v_</span></a>&#8221;, a variable name must follow which has
<p>If a value begins with &#8220;v_&#8221;, a variable name must follow which has
been previously defined in the input script. If <em>mode</em> = scalar, then
only equal-style or vector-style variables can be used, which both
produce global values. In this mode, a vector-style variable requires
@ -383,10 +383,8 @@ so the <em>title3</em> setting is ignored when <em>mode</em> = scalar.</p>
describes the two values that are printed at the first of each section
of output. In the third line the values are replaced with the
appropriate fields from the fix ave/time command.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix produces a global scalar or global vector or global array

View File

@ -432,10 +432,8 @@ will be duplicate nodes in the list.</p>
rectangle for each processor (1 to 4).</p>
<p>For a 3d problem, the syntax is similar with 8 vertices listed for
each processor, instead of 4, and &#8220;SQUARES&#8221; replaced by &#8220;CUBES&#8221;.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes a global scalar which is the imbalance factor

View File

@ -224,10 +224,8 @@ dramatically released when the bond is broken. More generally, you
may need to thermostat your system to compensate for energy changes
resulting from broken bonds (and angles, dihedrals, impropers).</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes two statistics which it stores in a global vector of

View File

@ -265,7 +265,7 @@ percolation simulation.</p>
1st, 2nd, and 3rd neighbors of each atom (within the bond topology of
the system) for use in weighting pairwise interactions for bonded
atoms. Note that adding a single bond always adds a new 1st neighbor
but may also induce <em>many</em> new 2nd and 3rd neighbors, depending on the
but may also induce *many* new 2nd and 3rd neighbors, depending on the
molecular topology of your system. The &#8220;extra special per atom&#8221;
parameter must typically be set to allow for the new maximum total
size (1st + 2nd + 3rd neighbors) of this per-atom list. There are 3
@ -320,10 +320,8 @@ dramatically when the bond is formed. More generally, you may need to
thermostat your system to compensate for energy changes resulting from
created bonds (and angles, dihedrals, impropers).</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info</h2>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<p>This fix computes two statistics which it stores in a global vector of

Some files were not shown because too many files have changed in this diff Show More