2015-07-30 22:38:28 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<HR>
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2015-07-30 22:38:28 +08:00
|
|
|
<H3>pair_coeff command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>pair_coeff I J args
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>I,J = atom types (see asterisk form below)
|
|
|
|
<LI>args = coefficients for one or more pairs of atom types
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>pair_coeff 1 2 1.0 1.0 2.5
|
2006-09-22 00:22:34 +08:00
|
|
|
pair_coeff 2 * 1.0 1.0
|
|
|
|
pair_coeff 3* 1*2 1.0 1.0 2.5
|
|
|
|
pair_coeff * * 1.0 1.0
|
|
|
|
pair_coeff * * nialhjea 1 1 2
|
|
|
|
pair_coeff * 3 morse.table ENTRY1
|
2015-07-30 22:38:28 +08:00
|
|
|
pair_coeff 1 2 lj/cut 1.0 1.0 2.5 (for pair_style hybrid)
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Specify the pairwise force field coefficients for one or more pairs of
|
2006-09-22 00:22:34 +08:00
|
|
|
atom types. The number and meaning of the coefficients depends on the
|
|
|
|
pair style. Pair coefficients can also be set in the data file read
|
2015-07-30 22:38:28 +08:00
|
|
|
by the <A HREF = "read_data.html">read_data</A> command or in a restart file.
|
|
|
|
</P>
|
|
|
|
<P>I and J can be specified in one of two ways. Explicit numeric values
|
|
|
|
can be used for each, as in the 1st example above. I <= J is
|
2006-09-22 00:22:34 +08:00
|
|
|
required. LAMMPS sets the coefficients for the symmetric J,I
|
2015-07-30 22:38:28 +08:00
|
|
|
interaction to the same values.
|
|
|
|
</P>
|
|
|
|
<P>A wildcard asterisk can be used in place of or in conjunction with the
|
2006-09-22 00:22:34 +08:00
|
|
|
I,J arguments to set the coefficients for multiple pairs of atom
|
2015-07-30 22:38:28 +08:00
|
|
|
types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
|
2008-02-20 05:47:37 +08:00
|
|
|
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 means all types from m to n
|
2015-07-30 22:38:28 +08:00
|
|
|
(inclusive). Note that only type pairs with I <= J are considered; if
|
|
|
|
asterisks imply type pairs where J < I, they are ignored.
|
|
|
|
</P>
|
|
|
|
<P>Note that a pair_coeff command can override a previous setting for the
|
2006-09-22 00:22:34 +08:00
|
|
|
same I,J pair. For example, these commands set the coeffs for all I,J
|
2015-07-30 22:38:28 +08:00
|
|
|
pairs, then overwrite the coeffs for just the I,J = 2,3 pair:
|
|
|
|
</P>
|
|
|
|
<PRE>pair_coeff * * 1.0 1.0 2.5
|
|
|
|
pair_coeff 2 3 2.0 1.0 1.12
|
|
|
|
</PRE>
|
|
|
|
<P>A line in a data file that specifies pair coefficients uses the exact
|
2006-09-22 00:22:34 +08:00
|
|
|
same format as the arguments of the pair_coeff command in an input
|
|
|
|
script, with the exception of the I,J type arguments. In each line of
|
2015-07-30 22:38:28 +08:00
|
|
|
the "Pair Coeffs" section of a data file, only a single type I is
|
2006-09-22 00:22:34 +08:00
|
|
|
specified, which sets the coefficients for type I interacting with
|
|
|
|
type I. This is because the section has exactly N lines, where N =
|
2008-02-20 05:47:37 +08:00
|
|
|
the number of atom types. For this reason, the wild-card asterisk
|
2006-09-22 00:22:34 +08:00
|
|
|
should also not be used as part of the I argument. Thus in a data
|
|
|
|
file, the line corresponding to the 1st example above would be listed
|
2015-07-30 22:38:28 +08:00
|
|
|
as
|
|
|
|
</P>
|
|
|
|
<PRE>2 1.0 1.0 2.5
|
|
|
|
</PRE>
|
|
|
|
<P>For many potentials, if coefficients for type pairs with I != J are
|
2008-02-20 05:47:37 +08:00
|
|
|
not set explicitly by a pair_coeff command, the values are inferred
|
2007-06-20 20:56:17 +08:00
|
|
|
from the I,I and J,J settings by mixing rules; see the
|
2015-07-30 22:38:28 +08:00
|
|
|
<A HREF = "pair_modify.html">pair_modify</A> command for a discussion. Details on
|
2007-06-25 22:36:36 +08:00
|
|
|
this option as it pertains to individual potentials are described on
|
2015-07-30 22:38:28 +08:00
|
|
|
the doc page for the potential.
|
|
|
|
</P>
|
|
|
|
<P>Many pair styles, typically for many-body potentials, use tabulated
|
2013-06-29 01:09:43 +08:00
|
|
|
potential files as input, when specifying the pair_coeff command.
|
|
|
|
Potential files provided with LAMMPS are in the potentials directory
|
|
|
|
of the distribution. For some potentials, such as EAM, other archives
|
|
|
|
of suitable files can be found on the Web. They can be used with
|
|
|
|
LAMMPS so long as they are in the format LAMMPS expects, as discussed
|
2015-07-30 22:38:28 +08:00
|
|
|
on the individual doc pages.
|
|
|
|
</P>
|
|
|
|
<P>When a pair_coeff command using a potential file is specified, LAMMPS
|
2013-06-29 01:09:43 +08:00
|
|
|
looks for the potential file in 2 places. First it looks in the
|
2015-07-30 22:38:28 +08:00
|
|
|
location specified. E.g. if the file is specified as "niu3.eam", it
|
2013-06-29 01:09:43 +08:00
|
|
|
is looked for in the current working directory. If it is specified as
|
2015-07-30 22:38:28 +08:00
|
|
|
"../potentials/niu3.eam", then it is looked for in the potentials
|
2013-06-29 01:09:43 +08:00
|
|
|
directory, assuming it is a sister directory of the current working
|
|
|
|
directory. If the file is not found, it is then looked for in the
|
|
|
|
directory specified by the LAMMPS_POTENTIALS environment variable.
|
|
|
|
Thus if this is set to the potentials directory in the LAMMPS distro,
|
|
|
|
then you can use those files from anywhere on your system, without
|
|
|
|
copying them into your working directory. Environment variables are
|
2013-07-01 21:50:50 +08:00
|
|
|
set in different ways for different shells. Here are example settings
|
2015-07-30 22:38:28 +08:00
|
|
|
for
|
|
|
|
</P>
|
|
|
|
<PRE>csh, tcsh:
|
|
|
|
% setenv LAMMPS_POTENTIALS /path/to/lammps/potentials
|
|
|
|
</PRE>
|
|
|
|
<PRE>bash:
|
|
|
|
% export LAMMPS_POTENTIALS=/path/to/lammps/potentials
|
|
|
|
</PRE>
|
|
|
|
<PRE>Windows:
|
|
|
|
% set LAMMPS_POTENTIALS="C:\Path to LAMMPS\Potentials
|
|
|
|
</PRE>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The alphabetic list of pair styles defined in LAMMPS is given on the
|
|
|
|
<A HREF = "pair_style.html">pair_style</A> doc page. They are also given in more
|
|
|
|
compact form in the pair section of <A HREF = "Section_commands.html#cmd_5">this
|
|
|
|
page</A>.
|
|
|
|
</P>
|
|
|
|
<P>Click on the style to display the formula it computes, arguments
|
2014-02-11 04:45:07 +08:00
|
|
|
specified in the pair_style command, and coefficients specified by the
|
2015-07-30 22:38:28 +08:00
|
|
|
associated <A HREF = "pair_coeff.html">pair_coeff</A> command.
|
|
|
|
</P>
|
|
|
|
<P>Note that there are also additional pair styles (not listed on the
|
|
|
|
<A HREF = "pair_style.html">pair_style</A> doc page) submitted by users which are
|
2014-02-11 04:45:07 +08:00
|
|
|
included in the LAMMPS distribution. The list of these with links to
|
2015-07-30 22:38:28 +08:00
|
|
|
the individual styles are given in the pair section of <A HREF = "Section_commands.html#cmd_5">this
|
|
|
|
page</A>.
|
|
|
|
</P>
|
|
|
|
<P>There are also additional accelerated pair styles (not listed on the
|
|
|
|
<A HREF = "pair_style.html">pair_style</A> doc page) included in the LAMMPS
|
2014-02-11 04:45:07 +08:00
|
|
|
distribution for faster performance on CPUs and GPUs. The list of
|
|
|
|
these with links to the individual styles are given in the pair
|
2015-07-30 22:38:28 +08:00
|
|
|
section of <A HREF = "Section_commands.html#cmd_5">this page</A>.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This command must come after the simulation box is defined by a
|
|
|
|
<A HREF = "read_data.html">read_data</A>, <A HREF = "read_restart.html">read_restart</A>, or
|
|
|
|
<A HREF = "create_box.html">create_box</A> command.
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "pair_style.html">pair_style</A>, <A HREF = "pair_modify.html">pair_modify</A>,
|
|
|
|
<A HREF = "read_data.html">read_data</A>, <A HREF = "read_restart.html">read_restart</A>,
|
|
|
|
<A HREF = "pair_write.html">pair_write</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|