forked from lijiext/lammps
convert more LAMMPS script examples to use code-block instead of parsed-literal
This commit is contained in:
parent
2775ebeb9d
commit
7e656b6cea
|
@ -59,7 +59,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
balance 0.9 x uniform y 0.4 0.5 0.6
|
||||
balance 1.2 shift xz 5 1.1
|
||||
|
|
|
@ -22,7 +22,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
boundary p p f
|
||||
boundary p fs p
|
||||
|
@ -110,6 +110,6 @@ of lost atoms.
|
|||
Default
|
||||
"""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
boundary p p p
|
||||
|
|
|
@ -20,7 +20,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
box tilt large
|
||||
box tilt small
|
||||
|
|
|
@ -22,7 +22,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all ackland/atom
|
||||
compute 1 all ackland/atom legacy yes
|
||||
|
|
|
@ -31,7 +31,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 fluid adf 32 1 1 1 0.0 1.2 0.0 1.2 &
|
||||
1 1 2 0.0 1.2 0.0 1.5 &
|
||||
|
@ -39,7 +39,7 @@ Examples
|
|||
2 1 1 0.0 1.2 0.0 1.2 &
|
||||
2 1 2 0.0 1.5 2.0 3.5 &
|
||||
2 2 2 2.0 3.5 2.0 3.5
|
||||
compute 1 fluid adf 32 1\*2 1\*2 1\*2 0.5 3.5
|
||||
compute 1 fluid adf 32 1*2 1*2 1*2 0.5 3.5
|
||||
compute 1 fluid adf 32
|
||||
|
||||
Description
|
||||
|
@ -168,10 +168,10 @@ The simplest way to output the results of the compute adf calculation
|
|||
to a file is to use the :doc:`fix ave/time <fix_ave_time>` command, for
|
||||
example:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute myADF all adf 32 2 2 2 0.5 3.5 0.5 3.5
|
||||
fix 1 all ave/time 100 1 100 c_myADF[\*] file tmp.adf mode vector
|
||||
fix 1 all ave/time 100 1 100 c_myADF[*] file tmp.adf mode vector
|
||||
|
||||
**Output info:**
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all angle
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all angle/local theta
|
||||
compute 1 all angle/local eng theta
|
||||
|
@ -68,11 +68,11 @@ As an example, these commands can be added to the bench/in.rhodo
|
|||
script to compute the cosine and cosine\^2 of every angle in the system
|
||||
and output the statistics in various ways:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable t internal 0.0
|
||||
variable cos equal cos(v_t)
|
||||
variable cossq equal cos(v_t)\*cos(v_t)
|
||||
variable cossq equal cos(v_t)*cos(v_t)
|
||||
|
||||
compute 1 all property/local aatom1 aatom2 aatom3 atype
|
||||
compute 2 all angle/local eng theta v_cos v_cossq set theta t
|
||||
|
@ -113,7 +113,7 @@ command in a consistent way.
|
|||
|
||||
Here is an example of how to do this:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all property/local atype aatom1 aatom2 aatom3
|
||||
compute 2 all angle/local theta eng
|
||||
|
|
|
@ -17,7 +17,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 fluid angmom/chunk molchunk
|
||||
|
||||
|
@ -62,11 +62,11 @@ The simplest way to output the results of the compute angmom/chunk
|
|||
calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>`
|
||||
command, for example:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute cc1 all chunk/atom molecule
|
||||
compute myChunk all angmom/chunk cc1
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[\*] file tmp.out mode vector
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
|
||||
|
||||
**Output info:**
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all basal/atom
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all body/local type 1 2 3
|
||||
compute 1 all body/local 3 6
|
||||
|
@ -69,7 +69,7 @@ body sub-particles are x,y,z coordinates, then the dump file will be
|
|||
formatted similar to the output of a :doc:`dump atom or custom <dump>`
|
||||
command.
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all body/local type 1 2 3
|
||||
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_1[4]
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all bond
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all bond/local engpot
|
||||
compute 1 all bond/local dist engpot force
|
||||
|
@ -120,10 +120,10 @@ As an example, these commands can be added to the bench/in.rhodo
|
|||
script to compute the distance\^2 of every bond in the system and
|
||||
output the statistics in various ways:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable d internal 0.0
|
||||
variable dsq equal v_d\*v_d
|
||||
variable dsq equal v_d*v_d
|
||||
|
||||
compute 1 all property/local batom1 batom2 btype
|
||||
compute 2 all bond/local engpot dist v_dsq set dist d
|
||||
|
@ -163,11 +163,11 @@ command in a consistent way.
|
|||
|
||||
Here is an example of how to do this:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all property/local btype batom1 batom2
|
||||
compute 2 all bond/local dist engpot
|
||||
dump 1 all local 1000 tmp.dump index c_1[\*] c_2[\*]
|
||||
dump 1 all local 1000 tmp.dump index c_1[*] c_2[*]
|
||||
|
||||
**Output info:**
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all centro/atom fcc
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all chunk/atom type
|
||||
compute 1 all chunk/atom bin/1d z lower 0.02 units reduced
|
||||
|
|
|
@ -26,7 +26,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all chunk/spread/atom mychunk c_com[*] c_gyration
|
||||
|
||||
|
@ -99,7 +99,7 @@ had been listed one by one. E.g. these 2 compute chunk/spread/atom
|
|||
commands are equivalent, since the :doc:`compute com/chunk <compute_com_chunk>` command creates a per-atom array
|
||||
with 3 columns:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute com all com/chunk mychunk
|
||||
compute 10 all chunk/spread/atom mychunk c_com[*]
|
||||
|
@ -111,7 +111,7 @@ Here is an example of writing a dump file the with the center-of-mass
|
|||
(COM) for the chunk each atom is in. The commands below can be added
|
||||
to the bench/in.chain script.
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute cmol all chunk/atom molecule
|
||||
compute com all com/chunk cmol
|
||||
|
@ -124,13 +124,13 @@ forces for the :doc:`fix addforce <fix_addforce>` command. In this
|
|||
example the forces act to pull atoms of an extended polymer chain
|
||||
towards its COM in an attractive manner.
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute prop all property/atom xu yu zu
|
||||
variable k equal 0.1
|
||||
variable fx atom v_k\*(c_comchunk[1]-c_prop[1])
|
||||
variable fy atom v_k\*(c_comchunk[2]-c_prop[2])
|
||||
variable fz atom v_k\*(c_comchunk[3]-c_prop[3])
|
||||
variable fx atom v_k*(c_comchunk[1]-c_prop[1])
|
||||
variable fy atom v_k*(c_comchunk[2]-c_prop[2])
|
||||
variable fz atom v_k*(c_comchunk[3]-c_prop[3])
|
||||
fix 3 all addforce v_fx v_fy v_fz
|
||||
|
||||
Note that :doc:`compute property/atom <compute_property_atom>` is used
|
||||
|
@ -171,13 +171,13 @@ Then defining a second set of chunks based on spatial bins. And
|
|||
finally, using the :doc:`fix ave/chunk <fix_ave_chunk>` command to
|
||||
calculate an average dipole moment vector per spatial bin.
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute cmol all chunk/atom molecule
|
||||
compute dipole all dipole/chunk cmol
|
||||
compute spread all chunk/spread/atom cmol c_dipole[1] c_dipole[2] c_dipole[3]
|
||||
compute cspatial all chunk/atom bin/1d z lower 0.1 units reduced
|
||||
fix ave all ave/chunk 100 10 1000 cspatial c_spread[\*]
|
||||
fix ave all ave/chunk 100 10 1000 cspatial c_spread[*]
|
||||
|
||||
Note that the :doc:`fix ave/chunk <fix_ave_chunk>` command requires
|
||||
per-atom values as input. That is why the compute chunk/spread/atom
|
||||
|
|
|
@ -25,7 +25,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all cluster/atom 3.5
|
||||
compute 1 all fragment/atom
|
||||
|
|
|
@ -17,7 +17,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all cna/atom 3.08
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all cnp/atom 3.08
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all com
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 fluid com/chunk molchunk
|
||||
|
||||
|
@ -60,11 +60,11 @@ The simplest way to output the results of the compute com/chunk
|
|||
calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>`
|
||||
command, for example:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
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
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
|
||||
|
||||
**Output info:**
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all contact/atom
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all coord/atom cutoff 2.0
|
||||
compute 1 all coord/atom cutoff 6.0 1 2
|
||||
compute 1 all coord/atom cutoff 6.0 2\*4 5\*8 \*
|
||||
compute 1 all coord/atom cutoff 6.0 2*4 5*8 *
|
||||
compute 1 solute coord/atom cutoff 2.0 group solvent
|
||||
compute 1 all coord/atom orientorder 2 0.5
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all damage/atom
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all dihedral
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all dihedral/local phi
|
||||
|
||||
|
@ -66,11 +66,11 @@ As an example, these commands can be added to the bench/in.rhodo
|
|||
script to compute the cosine and cosine\^2 of every dihedral angle in
|
||||
the system and output the statistics in various ways:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable p internal 0.0
|
||||
variable cos equal cos(v_p)
|
||||
variable cossq equal cos(v_p)\*cos(v_p)
|
||||
variable cossq equal cos(v_p)*cos(v_p)
|
||||
|
||||
compute 1 all property/local datom1 datom2 datom3 datom4 dtype
|
||||
compute 2 all dihedral/local phi v_cos v_cossq set phi p
|
||||
|
@ -107,7 +107,7 @@ command in a consistent way.
|
|||
|
||||
Here is an example of how to do this:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all property/local dtype datom1 datom2 datom3 datom4
|
||||
compute 2 all dihedral/local phi
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all dilatation/atom
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 fluid dipole/chunk molchunk
|
||||
compute dw water dipole/chunk 1 geometry
|
||||
|
@ -65,11 +65,11 @@ The simplest way to output the results of the compute com/chunk
|
|||
calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>`
|
||||
command, for example:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
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
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
|
||||
|
||||
**Output info:**
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all displace/atom
|
||||
compute 1 all displace/atom refresh myVar
|
||||
|
@ -82,7 +82,7 @@ a distance *Dhop*\ . For any snapshot we only want to output atoms that
|
|||
have hopped since the last snapshot. This can be accomplished with
|
||||
something like the following commands:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
write_dump all custom tmp.dump id type x y z # see comment below
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all dpd
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all edpd/temp/atom
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all entropy/atom 0.25 5.
|
||||
compute 1 all entropy/atom 0.25 5. avg yes 5.
|
||||
|
@ -86,7 +86,7 @@ to increase the skin of the neighbor list with:
|
|||
|
||||
.. parsed-literal::
|
||||
|
||||
neighbor skin bin
|
||||
neighbor <skin distance> bin
|
||||
|
||||
See :doc:`neighbor <neighbor>` for details.
|
||||
|
||||
|
|
|
@ -76,16 +76,16 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable x index run1 run2 run3 run4 run5 run6 run7 run8
|
||||
variable LoopVar loop $n
|
||||
variable beta equal temp/3.0
|
||||
variable b1 equal x[234]+0.5\*vol
|
||||
variable b1 equal "x[234] + 0.5\*vol"
|
||||
variable b1 equal x[234]+0.5*vol
|
||||
variable b1 equal "x[234] + 0.5*vol"
|
||||
variable b equal xcm(mol1,x)/2.0
|
||||
variable b equal c_myTemp
|
||||
variable b atom x\*y/vol
|
||||
variable b atom x*y/vol
|
||||
variable foo string myfile
|
||||
variable foo internal 3.5
|
||||
variable myPy python increase
|
||||
|
@ -225,7 +225,7 @@ script or when the input script is looped over. This can be useful
|
|||
when breaking out of a loop via the :doc:`if <if>` and :doc:`jump <jump>`
|
||||
commands before the variable would become exhausted. For example,
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
label loop
|
||||
variable a loop 5
|
||||
|
@ -388,7 +388,7 @@ to match a function name specified in a :doc:`python <python>` command
|
|||
which returns a value to this variable as defined by its *return*
|
||||
keyword. For example these two commands would be self-consistent:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable foo python myMultiply
|
||||
python myMultiply return v_foo format f file funcs.py
|
||||
|
@ -455,9 +455,9 @@ simple, but multiple quantities can be nested and combined in various
|
|||
ways to build up formulas of arbitrary complexity. For example, this
|
||||
is a valid (though strange) variable formula:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable x equal "pe + c_MyTemp / vol\^(1/3)"
|
||||
variable x equal "pe + c_MyTemp / vol^(1/3)"
|
||||
|
||||
Specifically, a formula can contain numbers, constants, thermo
|
||||
keywords, math operators, math functions, group functions, region
|
||||
|
@ -535,7 +535,7 @@ adapt automatically to LAMMPS versions, when non-backwards compatible
|
|||
syntax changes are introduced. Here is an illustrative example (which
|
||||
will not work, since the *version* has been introduced more recently):
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
if $(version<20140513) then "communicate vel yes" else "comm_modify vel yes"
|
||||
|
||||
|
@ -939,7 +939,7 @@ the checking is also done using suffix flags, if available and enabled.
|
|||
|
||||
Example 1: disable use of suffix for pppm when using GPU package (i.e. run it on the CPU concurrently to running the pair style on the GPU), but do use the suffix otherwise (e.g. with USER-OMP).
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style lj/cut/coul/long 14.0
|
||||
if $(is_active(package,gpu)) then "suffix off"
|
||||
|
@ -947,9 +947,9 @@ Example 1: disable use of suffix for pppm when using GPU package (i.e. run it on
|
|||
|
||||
Example 2: use r-RESPA with inner/outer cutoff, if supported by pair style, otherwise fall back to using pair and reducing the outer time step
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
timestep $(2.0\*(1.0+2.0\*is_active(pair,respa))
|
||||
timestep $(2.0*(1.0+2.0*is_active(pair,respa))
|
||||
if $(is_active(pair,respa)) then "run_style respa 4 3 2 2 improper 1 inner 2 5.5 7.0 outer 3 kspace 4" else "run_style respa 3 3 2 improper 1 pair 2 kspace 3"
|
||||
|
||||
The *is\_defined()* function allows to query categories like *compute*\ ,
|
||||
|
@ -971,7 +971,7 @@ and C++ exceptions for error handling. Corresponding values for name are
|
|||
This enables writing input scripts which only dump using a given format if
|
||||
the compiled binary supports it.
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
if "$(is_available(feature,png))" then "print 'PNG supported'" else "print 'PNG not supported'"
|
||||
|
||||
|
@ -1056,9 +1056,9 @@ global vector. Consider a compute with ID "foo" that does this,
|
|||
referenced as follows by variable "a", where "myVec" is another
|
||||
vector-style variable:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable a vector c_foo\*v_myVec
|
||||
variable a vector c_foo*v_myVec
|
||||
|
||||
The reference "c\_foo" could refer to either the global scalar or
|
||||
global vector produced by compute "foo". In this case, "c\_foo" will
|
||||
|
@ -1219,7 +1219,7 @@ evaluated.
|
|||
As an example, suppose you use this command in your input script to
|
||||
define the variable "v" as
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable v equal vol
|
||||
|
||||
|
@ -1233,7 +1233,7 @@ evaluated continuously during the run.
|
|||
If you want to store the initial volume of the system, you can do it
|
||||
this way:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable v equal vol
|
||||
variable v0 equal $v
|
||||
|
@ -1242,7 +1242,7 @@ The second command will force "v" to be evaluated (yielding the
|
|||
initial volume) and assign that value to the variable "v0". Thus the
|
||||
command
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
thermo_style custom step v_v v_v0
|
||||
|
||||
|
@ -1252,7 +1252,7 @@ during the run.
|
|||
Note that it is a mistake to enclose a variable formula in double
|
||||
quotes if it contains variables preceded by $ signs. For example,
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable vratio equal "${vfinal}/${v0}"
|
||||
|
||||
|
@ -1309,7 +1309,7 @@ timestep of the preceding run, e.g. by thermodynamic output.
|
|||
One way to get around this problem is to perform a 0-timestep run
|
||||
before using the variable. For example, these commands
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable t equal temp
|
||||
print "Initial temperature = $t"
|
||||
|
@ -1321,7 +1321,7 @@ a compute for calculating the temperature to be invoked.
|
|||
|
||||
However, this sequence of commands would be fine:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
run 0
|
||||
variable t equal temp
|
||||
|
@ -1355,7 +1355,7 @@ a 0-timestep run before printing the variable has the desired effect.
|
|||
way to detect this has occurred. Consider the following sequence of
|
||||
commands:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
|
@ -1381,7 +1381,7 @@ the system is up-to-date. For example, this sequence of commands
|
|||
would print a potential energy that reflected the changed pairwise
|
||||
coefficient:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
run 1000
|
||||
|
|
|
@ -51,7 +51,7 @@ Syntax
|
|||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
velocity all create 300.0 4928459 rot yes dist gaussian
|
||||
velocity border set NULL 4.0 v_vz sum yes units box
|
||||
|
@ -148,7 +148,7 @@ discussed on the :doc:`Howto thermostat <Howto_thermostat>` doc page.
|
|||
If this keyword is not specified, *create* and *scale* calculate
|
||||
temperature using a compute that is defined internally as follows:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute velocity_temp group-ID temp
|
||||
|
||||
|
@ -246,7 +246,7 @@ temperature than desired. A workaround for this is to perform a :doc:`run 0 <ru
|
|||
properly, and then rescale the temperature to the desired value before
|
||||
performing a simulation. For example:
|
||||
|
||||
.. parsed-literal::
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
velocity all create 300.0 12345
|
||||
run 0 # temperature may not be 300K
|
||||
|
|
Loading…
Reference in New Issue