git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15122 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-06-07 15:32:00 +00:00
parent 59497c1076
commit 946de18d47
5 changed files with 966 additions and 0 deletions

View File

@ -0,0 +1,166 @@
.. index:: fix eos/table/rx
fix eos/table/rx command
========================
Syntax
""""""
.. parsed-literal::
fix ID group-ID eos/table/rx style file1 N keyword file2
* ID, group-ID are documented in :doc:`fix <fix>` command
* eos/table/rx = style name of this fix command
* style = *linear* = method of interpolation
* file1 = filename containing the tabulated equation of state
* N = use N values in *linear* tables
* keyword = name of table keyword correponding to table file
* file2 = filename containing the heats of formation of each species
Examples
""""""""
.. parsed-literal::
fix 1 all eos/table/rx linear eos.table 10000 KEYWORD thermo.table
Description
"""""""""""
Fix *eos/table/rx* applies a tabulated mesoparticle equation
of state to relate the concentration-dependent particle internal
energy (u_i) to the particle internal temperature (dpdTheta_i).
The concentration-dependent particle internal energy (u_i) is
computed according to the following relation:
.. image:: Eqs/fix_eos_table_rx.jpg
:align: center
where *m* is the number of species, *c_i,j* is the concentration of
species *j* in particle *i*\ , *u_j* is the internal energy of species j,
*DeltaH_f,j* is the heat of formation of species *j*\ , N is the number of
molecules represented by the coarse-grained particle, kb is the
Boltzmann constant, and T is the temperature of the system.
Fix *eos/table/rx* creates interpolation tables of length *N* from *m*
internal energy values of each species *u_j* listed in a file as a
function of internal temperature. During a simulation, these tables
are used to interpolate internal energy or temperature values as needed.
The interpolation is done with the *linear* style. For the *linear* style,
the internal temperature is used to find 2 surrounding table values from
which an internal energy is computed by linear interpolation. A secant
solver is used to determine the internal temperature from the internal energy.
The first filename specifies a file containing tabulated internal
temperature and *m* internal energy values for each species *u_j*\ .
The keyword specifies a section of the file. The format of this
file is described below.
The second filename specifies a file containing heat of formation
*DeltaH_f,j* for each species.
----------
The format of a tabulated file is as follows (without the
parenthesized comments):
.. parsed-literal::
# EOS TABLE (one or more comment or blank lines)
.. parsed-literal::
KEYWORD (keyword is first text on line)
N 500 h2 no2 n2 ... no (N parameter species1 species2 ... speciesN)
(blank)
1 1.00 0.000 ... 0.0000 (index, internal temperature, internal energy of species 1, ..., internal energy of species m)
2 1.02 0.001 ... 0.0002
...
500 10.0 0.500 ... 1.0000
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which
identifies the section. The line can contain additional text, but the
initial text must match the argument specified in the fix command.
The next line lists the number of table entries and the species names
that correspond with all the species listed in the reaction equations
through the *fix rx* command.
The parameter "N" is required and its value is the number of table
entries that follow. Let Nfile = "N" in the tabulated file.
What LAMMPS does is a preliminary interpolation by creating splines
using the Nfile tabulated values as nodal points.
Following a blank line, the next N lines list the tabulated values.
On each line, the 1st value is the index from 1 to N, the 2nd value is
the internal temperature (in temperature units), the 3rd value until
the *m+3* value are the internal energies of the m species (in energy units).
Note that all internal temperature and internal energy values must
increase from one line to the next.
Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds
one that matches the specified keyword.
----------
The format of a heat of formation file is as follows (without the
parenthesized comments):
.. parsed-literal::
# HEAT OF FORMATION TABLE (one or more comment or blank lines)
.. parsed-literal::
(blank)
h2 0.00 (species name, heat of formation)
no2 0.34
n2 0.00
...
no 0.93
Note that the species can be listed in any order. The tag that is
used as the species name must correspond with the tags used to define
the reactions with the :doc:`fix rx <fix_rx>` command.
----------
Restrictions
""""""""""""
The fix *eos/table/rx* is only available if LAMMPS is built with the
USER-DPD package.
The equation of state must be a monotonically increasing function.
An exit error will occur if the internal temperature or internal
energies are not within the table cutoffs.
Related commands
""""""""""""""""
:doc:`fix rx <fix_rx>`,
:doc:`pair dpd/fdt <dpd_fdt>`
**Default:** none
----------
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm

View File

@ -0,0 +1,170 @@
.. index:: fix rx
fix rx command
==============
Syntax
""""""
.. parsed-literal::
fix ID group-ID rx file localTemp solver ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* rx = style name of this fix command
* file = filename containing the reaction kinetic equations and Arrhenius parameters
* localTemp = *none,lucy* = no local temperature averaging or local temperature defined through Lucy weighting function
* solver = *lammps_rk4* = Explicit 4th order Runge-Kutta method
* minSteps = # of steps for rk4 solver
Examples
""""""""
.. parsed-literal::
fix 1 all rx kinetics.rx none lammps_rk4
fix 1 all rx kinetics.rx none lammps_rk4 1
fix 1 all rx kinetics.rx lucy lammps_rk4 10
Description
"""""""""""
Fix *rx* solves the reaction kinetic ODEs for a given reaction set that is
defined within the file associated with this command.
For a general reaction such that
.. image:: Eqs/fix_rx_reaction.jpg
:align: center
the reaction rate equation is defined to be of the form
.. image:: Eqs/fix_rx_reactionRate.jpg
:align: center
In the current implementation, the exponents are defined to be equal to the
stoichiometric coefficients. A given reaction set consisting of *n* reaction
equations will contain a total of *m* species. A set of *m* ordinary
differential equations (ODEs) that describe the change in concentration of a
given species as a function of time are then constructed based on the *n*
reaction rate equations.
The ODE systems are solved over the full DPD timestep *dt* using a 4th order
Runge-Kutta *rk4* method with a fixed step-size *h*\ , specified by the
*lammps_rk4* keyword. The number of ODE steps per DPD timestep for the rk4 method
is optionally specified immediately after the rk4 keyword. The ODE step-size is set as
*dt/num_steps*\ . Smaller step-sizes tend to yield more accurate results but there
is not control on the error.
----------
The filename specifies a file that contains the entire set of reaction
kinetic equations and corresponding Arrhenius parameters. The format of
this file is described below.
There is no restriction on the total number or reaction equations that are
specified. The species names are arbitrary string names that are associated
with the species concentrations.
Each species in a given reaction must be preceded by it's stoichiometric
coefficient. The only delimiters that are recognized between the species are
either a *+* or *=* character. The *=* character corresponds to an
irreversible reaction. After specifying the reaction, the reaction rate
constant is determined through the temperature dependent Arrhenius equation:
.. image:: Eqs/fix_rx.jpg
:align: center
where *A* is the Arrhenius factor in time units or concentration/time units,
*n* is the unitless exponent of the temperature dependence, and *E_a* is the
activation energy in energy units. The temperature dependence can be removed
by specifying the exponent as zero.
The internal temperature of the coarse-grained particles can be used in constructing the
reaction rate constants at every DPD timestep by specifying the keyword *none*\ .
Alternatively, the keyword *lucy* can be specified to compute a local-average particle
internal temperature for use in the reaction rate constant expressions.
The local-average particle internal temperature is defined as:
.. image:: Eqs/fix_rx_localTemp.jpg
:align: center
where the Lucy function is expressed as:
.. image:: Eqs/fix_rx_localTemp2.jpg
:align: center
The self-particle interaction is included in the above equation.
----------
The format of a tabulated file is as follows (without the parenthesized comments):
.. parsed-literal::
# Rxn equations and parameters (one or more comment or blank lines)
.. parsed-literal::
1.0 hcn + 1.0 no2 = 1.0 no + 0.5 n2 + 0.5 h2 + 1.0 co 2.49E+01 0.0 1.34 (rxn equation, A, n, Ea)
1.0 hcn + 1.0 no = 1.0 co + 1.0 n2 + 0.5 h2 2.16E+00 0.0 1.52
...
1.0 no + 1.0 co = 0.5 n2 + 1.0 co2 1.66E+06 0.0 0.69
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections.
Following a blank line, the next N lines list the N reaction equations.
Each species within the reaction equation is specified through its
stoichiometric coefficient and a species tag. Reactant species are specified
on the left-hand side of the equation and product species are specified on the
right-hand side of the equation. After specifying the reactant and product
species, the final three arguments of each line represent the Arrhenius
parameter *A*\ , the temperature exponent *n*\ , and the activation energy *Ea*\ .
Note that the species tags that are defined in the reaction equations are
used by the :doc:`fix eos/table/rx <fix_eos_table_rx>` command to define the
thermodynamic properties of each species. Furthermore, the number of species
molecules (i.e., concentration) can be specified either with the :doc:`set <set>`
command using the "d_" prefix or by reading directly the concentrations from a
data file. For the latter case, the :doc:`read_data <read_data>` command with the
fix keyword should be specified, where the fix-ID will be the "fix rx`ID with a <SPECIES">`_ suffix, e.g.
fix foo all rx reaction.file ...
read_data data.dpd fix foo_SPECIES NULL Species
----------
Restrictions
""""""""""""
The fix *rx* is only available if LAMMPS is built with the USER-DPD package.
The fix *rx* must be used with the :doc:`atom_style dpd <atom_style>` command.
The fix *rx* can only be used with a constant energy or constant enthalpy DPD simulation.
Related commands
""""""""""""""""
:doc:`fix eos/table/rx <fix_eos_table_rx>`,
:doc:`fix shardlow <fix_shardlow>`,
:doc:`pair dpd/fdt/energy <dpd_fdt_energy>`
**Default:** none
----------
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm

View File

@ -0,0 +1,136 @@
.. index:: pair_style exp6/rx
pair_style exp6/rx command
==========================
Syntax
""""""
.. parsed-literal::
pair_style exp6/rx cutoff
* cutoff = global cutoff for DPD interactions (distance units)
Examples
""""""""
.. parsed-literal::
pair_style exp6/rx 10.0
pair_coeff * * exp6.params h2o h2o 1.0 1.0 10.0
pair_coeff * * exp6.params h2o 1fluid 1.0 1.0 10.0
pair_coeff * * exp6.params 1fluid 1fluid 1.0 1.0 10.0
Description
"""""""""""
Style *exp6/rx* is used in reaction DPD simulations, where the coarse-grained (CG)
particles are composed of *m* species whose reaction rate kinetics are determined
from a set of *n* reaction rate equations through the :doc:`fix rx <fix_rx>` command.
The species of one CG particle can interact with a species in a neighboring CG
particle through a site-site interaction potential model. The *exp6/rx* style
computes an exponential-6 potential given by
.. image:: Eqs/pair_exp6_rx.jpg
:align: center
where the *epsilon* parameter determines the depth of the potential
minimum located at *Rm*\ , and *alpha* determines the softness of the repulsion.
The coefficients must be defined for each species in a given particle type
via the :doc:`pair_coeff <pair_coeff>` command as in the examples above, where
the first argument is the filename that includes the exponential-6 parameters
for each species. The file includes the species tag followed by the *alpha*\ ,
*epsilon* and *Rm* parameters. The format of the file is described below.
The second and third arguments specify the site-site interaction
potential between two species contained within two different particles.
The species tags must either correspond to the species defined in the reaction
kinetics files specified with the :doc:`fix rx <fix_rx>` command
or they must correspond to the tag "1fluid", signifying interaction
with a product species mixture determined through a one-fluid approximation.
The interaction potential is weighted by the geometric average of the
concentrations of the two species. The coarse-grained potential is
stored before and after the reaction kinetics solver is applied, where the
difference is defined to be the internal chemical energy (uChem).
The fourth and fifth arguments specify the *Rm* and *epsilon* scaling exponents.
The final argument specifies the interaction cutoff.
----------
The format of a tabulated file is as follows (without the parenthesized comments):
.. parsed-literal::
# exponential-6 parameters for various species (one or more comment or blank lines)
.. parsed-literal::
h2o exp6 11.00 0.02 3.50 (species, exp6, alpha, Rm, epsilon)
no2 exp6 13.60 0.01 3.70
...
co2 exp6 13.00 0.03 3.20
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections.
Following a blank line, the next N lines list the species and their
corresponding parameters. The first argument is the species tag,
the second argument is the exp6 tag, the 3rd argument is the *alpha*
parameter (energy units), the 4th argument is the *epsilon* parameter
(energy-distance^6 units), and the 5th argument is the *Rm*
parameter (distance units). If a species tag of "1fluid" is listed as a
pair coefficient, a one-fluid approximation is specified where a
concentration-dependent combination of the parameters is computed
through the following equations:
.. image:: Eqs/pair_exp6_rx_oneFluid.jpg
:align: center
where
.. image:: Eqs/pair_exp6_rx_oneFluid2.jpg
:align: center
and xa and xb are the mole fractions of a and b, respectively, which
comprise the gas mixture.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
This pair style does not support mixing. Thus, coefficients for all
I,J pairs must be specified explicitly.
This style does not support the :doc:`pair_modify <pair_modify>` shift option
for the energy of the exp() and 1/r^6 portion of the pair interaction.
This style does not support the pair_modify tail option for adding long-range
tail corrections to energy and pressure for the A,C terms in the
pair interaction.
Restrictions
""""""""""""
None
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
**Default:** none
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm

View File

@ -0,0 +1,242 @@
.. index:: pair_style multi/lucy/rx
pair_style multi/lucy/rx command
================================
Syntax
""""""
.. parsed-literal::
pair_style multi/lucy/rx style N keyword ...
* style = *lookup* or *linear* = method of interpolation
* N = use N values in *lookup*\ , *linear* tables
Examples
""""""""
.. parsed-literal::
pair_style multi/lucy/rx linear 1000
pair_coeff * * multibody.table ENTRY1 h2o h2o 7.0
pair_coeff * * multibody.table ENTRY1 h2o 1fluid 7.0
Description
"""""""""""
Style *multi/lucy/rx* is used in reaction DPD simulations, where the coarse-grained
(CG) particles are composed of *m* species whose reaction rate kinetics are determined
from a set of *n* reaction rate equations through the :doc:`fix rx <fix_rx>` command.
The species of one CG particle can interact with a species in a neighboring CG particle
through a site-site interaction potential model. Style *multi/lucy/rx* computes the
site-site density-dependent force following from the many-body form described in
:ref:`(Moore) <Moore>` and :ref:`(Warren) <Warren>` as
.. image:: Eqs/pair_multi_lucy.jpg
:align: center
which consists of a density-dependent function, A(rho), and a radial-dependent weight
function, omegaDD(rij). The radial-dependent weight function, omegaDD(rij), is taken
as the Lucy function:
.. image:: Eqs/pair_multi_lucy2.jpg
:align: center
The density-dependent energy for a given particle is given by:
.. image:: Eqs/pair_multi_lucy_energy.jpg
:align: center
See the supporting information of :ref:`(Brennan) <Brennan>` or the publication by :ref:`(Moore) <Moore>`
for more details on the functional form.
An interpolation table is used to evaluate the density-dependent energy (Integral(A(rho)drho) and force (A(rho)).
Note that the pre-factor to the energy is computed after the interpolation, thus the Integral(A(rho)drho will
have units of energy / length^4.
The interpolation table is created as a pre-computation by fitting cubic splines to
the file values and interpolating the density-dependent energy and force at each of *N* densities.
During a simulation, the tables are used to interpolate the density-dependent energy and force as
needed for each pair of particles separated by a distance *R*\ . The interpolation is done in
one of 2 styles: *lookup* and *linear*\ .
For the *lookup* style, the density is used to find the nearest table entry, which is the
density-dependent energy and force.
For the *linear* style, the density is used to find the 2 surrounding table values from
which the density-dependent energy and force are computed by linear interpolation.
The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
above.
* filename
* keyword
* species1
* species2
* cutoff (distance units)
The filename specifies a file containing the tabulated density-dependent
energy and force. The keyword specifies a section of the file.
The cutoff is an optional coefficient. If not specified, the outer cutoff in the
table itself (see below) will be used to build an interpolation table
that extend to the largest tabulated distance. If specified, only
file values up to the cutoff are used to create the interpolation
table. The format of this file is described below.
The species tags define the site-site interaction potential between two
species contained within two different particles.
The species tags must either correspond to the species defined in the reaction
kinetics files specified with the :doc:`fix rx <fix_rx>` command
or they must correspond to the tag "1fluid", signifying interaction
with a product species mixture determined through a one-fluid approximation.
The interaction potential is weighted by the geometric average of the
concentrations of the two species. The coarse-grained potential
is stored before and after the reaction kinetics solver is applied, where
the difference is defined to be the internal chemical energy (uChem).
----------
The format of a tabulated file is a series of one or more sections,
defined as follows (without the parenthesized comments):
.. parsed-literal::
# Density-dependent function (one or more comment or blank lines)
.. parsed-literal::
DD-FUNCTION (keyword is first text on line)
N 500 R 1.0 10.0 (N, R, RSQ parameters)
(blank)
1 1.0 25.5 102.34 (index, density, energy/r^4, force)
2 1.02 23.4 98.5
...
500 10.0 0.001 0.003
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which
identifies the section. The line can contain additional text, but the
initial text must match the argument specified in the pair_coeff
command. The next line lists (in any order) one or more parameters
for the table. Each parameter is a keyword followed by one or more
numeric values.
The parameter "N" is required and its value is the number of table
entries that follow. Note that this may be different than the *N*
specified in the :doc:`pair_style multi/lucy/rx <pair_multi_lucy_rx>` command. Let
Ntable = *N* in the pair_style command, and Nfile = "N" in the
tabulated file. What LAMMPS does is a preliminary interpolation by
creating splines using the Nfile tabulated values as nodal points. It
uses these to interpolate the density-dependent energy and force at Ntable different
points. The resulting tables of length Ntable are then used as
described above, when computing the density-dependent energy and force.
This means that if you want the interpolation tables of
length Ntable to match exactly what is in the tabulated file (with
effectively no preliminary interpolation), you should set Ntable =
Nfile, and use the "RSQ" parameter. This is because the
internal table abscissa is always RSQ (separation distance squared),
for efficient lookup.
All other parameters are optional. If "R" or "RSQ" does
not appear, then the distances in each line of the table are used
as-is to perform spline interpolation. In this case, the table values
can be spaced in *density* uniformly or however you wish to position table
values in regions of large gradients.
If used, the parameters "R" or "RSQ" are followed by 2 values *rlo*
and *rhi*\ . If specified, the density associated with each density-dependent
energy and force value is computed from these 2 values (at high accuracy), rather
than using the (low-accuracy) value listed in each line of the table.
The density values in the table file are ignored in this case.
For "R", distances uniformly spaced between *rlo* and *rhi* are
computed; for "RSQ", squared distances uniformly spaced between
*rlo*rlo* and *rhi*rhi* are computed.
.. note::
If you use "R" or "RSQ", the tabulated distance values in the
file are effectively ignored, and replaced by new values as described
in the previous paragraph. If the density value in the table is not
very close to the new value (i.e. round-off difference), then you will
be assigning density-dependent energy and force values to a different density,
which is probably not what you want. LAMMPS will warn if this is occurring.
Following a blank line, the next N lines list the tabulated values.
On each line, the 1st value is the index from 1 to N, the 2nd value is
r (in density units), the 3rd value is the density-dependent function value
(in energy units / length^4), and the 4th is the force (in force units). The
density values must increase from one line to the next.
Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds
one that matches the specified keyword.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
This pair style does not support mixing. Thus, coefficients for all
I,J pairs must be specified explicitly.
The :doc:`pair_modify <pair_modify>` shift, table, and tail options are
not relevant for this pair style.
This pair style writes the settings for the "pair_style multi/lucy/rx" command
to :doc:`binary restart files <restart>`, so a pair_style command does
not need to specified in an input script that reads a restart file.
However, the coefficient information is not stored in the restart
file, since it is tabulated in the potential files. Thus, pair_coeff
commands do need to be specified in the restart input script.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*\ , *middle*\ , *outer* keywords.
----------
Restrictions
""""""""""""
none
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
**Default:** none
----------
.. _Warren:
**(Warren)** Warren, Phys Rev E, 68, 066702 (2003).
.. _Brennan:
**(Brennan)** Brennan, J Chem Phys Lett, 5, 2144-2149 (2014).
.. _Moore:
**(Moore)** Moore, J Chem Phys, 144, 104501 (2016).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm

View File

@ -0,0 +1,252 @@
.. index:: pair_style table/rx
pair_style table/rx command
===========================
Syntax
""""""
.. parsed-literal::
pair_style table style N
style = *lookup* or *linear* or *spline* or *bitmap* = method of interpolation
N = use N values in *lookup*\ , *linear*\ , *spline* tables
N = use 2^N values in *bitmap* tables
Examples
""""""""
.. parsed-literal::
pair_style table/rx linear 1000
pair_style table/rx bitmap 12
pair_coeff * * rxn.table ENTRY1 h2o h2o 10.0
pair_coeff * * rxn.table ENTRY1 1fluid 1fluid 10.0
pair_coeff * 3 rxn.table ENTRY1 h2o no2 10.0
Description
"""""""""""
Style *table/rx* is used in reaction DPD simulations,where the coarse-grained (CG)
particles are composed of *m* species whose reaction rate kinetics are determined
from a set of *n* reaction rate equations through the :doc:`fix rx <fix_rx>` command.
The species of one CG particle can interact with a species in a neighboring CG
particle through a site-site interaction potential model. Style *table/rx* creates
interpolation tables of length *N* from pair potential and force values listed in a
file(s) as a function of distance. The files are read by the
:doc:`pair_coeff <pair_coeff>` command.
The interpolation tables are created by fitting cubic splines to the
file values and interpolating energy and force values at each of *N*
distances. During a simulation, these tables are used to interpolate
energy and force values as needed. The interpolation is done in one
of 4 styles: *lookup*\ , *linear*\ , *spline*\ , or *bitmap*\ .
For the *lookup* style, the distance between 2 atoms is used to find
the nearest table entry, which is the energy or force.
For the *linear* style, the pair distance is used to find 2
surrounding table values from which an energy or force is computed by
linear interpolation.
For the *spline* style, a cubic spline coefficients are computed and
stored at each of the *N* values in the table. The pair distance is
used to find the appropriate set of coefficients which are used to
evaluate a cubic polynomial which computes the energy or force.
For the *bitmap* style, the N means to create interpolation tables
that are 2^N in length. <The pair distance is used to index into the
table via a fast bit-mapping technique :ref:`(Wolff) <Wolff>` and a linear
interpolation is performed between adjacent table values.
The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
above.
* filename
* keyword
* species1
* species2
* cutoff (distance units)
The filename specifies a file containing tabulated energy and force
values. The keyword specifies a section of the file. The cutoff is
an optional coefficient. If not specified, the outer cutoff in the
table itself (see below) will be used to build an interpolation table
that extend to the largest tabulated distance. If specified, only
file values up to the cutoff are used to create the interpolation
table. The format of this file is described below.
The species tags define the site-site interaction potential between two
species contained within two different particles.
The species tags must either correspond to the species defined in the reaction
kinetics files specified with the :doc:`fix rx <fix_rx>` command
or they must correspond to the tag "1fluid", signifying interaction
with a product species mixture determined through a one-fluid approximation.
The interaction potential is weighted by the geometric average of the
concentrations of the two species. The coarse-grained potential
is stored before and after the reaction kinetics solver is applied, where
the difference is defined to be the internal chemical energy (uChem).
----------
Here are some guidelines for using the pair_style table/rx command to
best effect:
* Vary the number of table points; you may need to use more than you think
to get good resolution.
* Always use the :doc:`pair_write <pair_write>` command to produce a plot
of what the final interpolated potential looks like. This can show up
interpolation "features" you may not like.
* Start with the linear style; it's the style least likely to have problems.
* Use *N* in the pair_style command equal to the "N" in the tabulation
file, and use the "RSQ" or "BITMAP" parameter, so additional interpolation
is not needed. See discussion below.
* Make sure that your tabulated forces and tabulated energies are consistent
(dE/dr = -F) along the entire range of r values.
* Use as large an inner cutoff as possible. This avoids fitting splines
to very steep parts of the potential.
----------
The format of a tabulated file is a series of one or more sections,
defined as follows (without the parenthesized comments):
.. parsed-literal::
# Morse potential for Fe (one or more comment or blank lines)
.. parsed-literal::
MORSE_FE (keyword is first text on line)
N 500 R 1.0 10.0 (N, R, RSQ, BITMAP, FPRIME parameters)
(blank)
1 1.0 25.5 102.34 (index, r, energy, force)
2 1.02 23.4 98.5
...
500 10.0 0.001 0.003
A section begins with a non-blank line whose 1st character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which
identifies the section. The line can contain additional text, but the
initial text must match the argument specified in the pair_coeff
command. The next line lists (in any order) one or more parameters
for the table. Each parameter is a keyword followed by one or more
numeric values.
The parameter "N" is required and its value is the number of table
entries that follow. Note that this may be different than the *N*
specified in the :doc:`pair_style table/rx <pair_style>` command. Let
Ntable = *N* in the pair_style command, and Nfile = "N" in the
tabulated file. What LAMMPS does is a preliminary interpolation by
creating splines using the Nfile tabulated values as nodal points. It
uses these to interpolate as needed to generate energy and force
values at Ntable different points. The resulting tables of length
Ntable are then used as described above, when computing energy and
force for individual pair distances. This means that if you want the
interpolation tables of length Ntable to match exactly what is in the
tabulated file (with effectively no preliminary interpolation), you
should set Ntable = Nfile, and use the "RSQ" or "BITMAP" parameter.
The internal table abscissa is RSQ (separation distance squared).
All other parameters are optional. If "R" or "RSQ" or "BITMAP" does
not appear, then the distances in each line of the table are used
as-is to perform spline interpolation. In this case, the table values
can be spaced in *r* uniformly or however you wish to position table
values in regions of large gradients.
If used, the parameters "R" or "RSQ" are followed by 2 values *rlo*
and *rhi*\ . If specified, the distance associated with each energy and
force value is computed from these 2 values (at high accuracy), rather
than using the (low-accuracy) value listed in each line of the table.
The distance values in the table file are ignored in this case.
For "R", distances uniformly spaced between *rlo* and *rhi* are
computed; for "RSQ", squared distances uniformly spaced between
*rlo*rlo* and *rhi*rhi* are computed.
If used, the parameter "BITMAP" is also followed by 2 values *rlo* and
*rhi*\ . These values, along with the "N" value determine the ordering
of the N lines that follow and what distance is associated with each.
This ordering is complex, so it is not documented here, since this
file is typically produced by the :doc:`pair_write <pair_write>` command
with its *bitmap* option. When the table is in BITMAP format, the "N"
parameter in the file must be equal to 2^M where M is the value
specified in the pair_style command. Also, a cutoff parameter cannot
be used as an optional 3rd argument in the pair_coeff command; the
entire table extent as specified in the file must be used.
If used, the parameter "FPRIME" is followed by 2 values *fplo* and
*fphi* which are the derivative of the force at the innermost and
outermost distances listed in the table. These values are needed by
the spline construction routines. If not specified by the "FPRIME"
parameter, they are estimated (less accurately) by the first 2 and
last 2 force values in the table. This parameter is not used by
BITMAP tables.
Following a blank line, the next N lines list the tabulated values.
On each line, the 1st value is the index from 1 to N, the 2nd value is
r (in distance units), the 3rd value is the energy (in energy units),
and the 4th is the force (in force units). The r values must increase
from one line to the next (unless the BITMAP parameter is specified).
Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds
one that matches the specified keyword.
----------
**Mixing, shift, table, tail correction, restart, rRESPA info**\ :
This pair style does not support mixing. Thus, coefficients for all
I,J pairs must be specified explicitly.
The :doc:`pair_modify <pair_modify>` shift, table, and tail options are
not relevant for this pair style.
This pair style writes the settings for the "pair_style table/rx" command
to :doc:`binary restart files <restart>`, so a pair_style command does
not need to specified in an input script that reads a restart file.
However, the coefficient information is not stored in the restart
file, since it is tabulated in the potential files. Thus, pair_coeff
commands do need to be specified in the restart input script.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*\ , *middle*\ , *outer* keywords.
----------
Restrictions
""""""""""""
none
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
**Default:** none
----------
.. _Wolff:
**(Wolff)** Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
.. _lws: http://lammps.sandia.gov
.. _ld: Manual.html
.. _lc: Section_commands.html#comm