2006-09-22 00:22:34 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
pair_style hybrid command :h3
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_style hybrid/overlay command :h3
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_style hybrid style1 args style2 args ...
|
|
|
|
pair_style hybrid/overlay style1 args style2 args ... :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
style1,style2 = list of one or more pair styles and their arguments :ul
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_style hybrid lj/cut/coul/cut 10.0 eam lj/cut 5.0
|
2006-09-22 00:22:34 +08:00
|
|
|
pair_coeff 1*2 1*2 eam niu3
|
|
|
|
pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0
|
|
|
|
pair_coeff 1*2 3 lj/cut 0.5 1.2 :pre
|
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_style hybrid/overlay lj/cut 2.5 coul/long 2.0
|
|
|
|
pair_coeff * * lj/cut 1.0 1.0
|
|
|
|
pair_coeff * * coul/long :pre
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
[Description:]
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
The {hybrid} and {hybrid/overlay} styles enable the use of multiple
|
|
|
|
pair styles in one simulation. With the {hybrid} style, exactly one
|
|
|
|
pair style is assigned to each pair of atom types. With the
|
|
|
|
{hybrid/overlay} style, one or more pair styles can be assigned to
|
|
|
|
each pair of atom types. The assignment of pair styles to type pairs
|
|
|
|
is made via the "pair_coeff"_pair_coeff.html command.
|
|
|
|
|
|
|
|
Here are two examples of hybrid simulations. The {hybrid} style could
|
|
|
|
be used for a simulation of a metal droplet on a LJ surface. The
|
|
|
|
metal atoms interact with each other via an {eam} potential, the
|
|
|
|
surface atoms interact with each other via a {lj/cut} potential, and
|
|
|
|
the metal/surface interaction is also computed via a {lj/cut}
|
|
|
|
potential. The {hybrid/overlay} style could be used as in the 2nd
|
|
|
|
example above, where multiple potentials are superposed in an additive
|
|
|
|
fashion to compute the interaction between atoms. In this example,
|
|
|
|
using {lj/cut} and {coul/long} together gives the same result as if
|
|
|
|
the {lj/cut/coul/long} potential were used by itself. In this case,
|
|
|
|
it would be more efficient to use the single combined potential, but
|
|
|
|
in general any combination of pair potentials can be used together in
|
|
|
|
to produce an interaction that is not encoded in any single pair_style
|
|
|
|
file, e.g. adding Coulombic forces between granular particles.
|
|
|
|
|
|
|
|
All pair styles that will be used are listed as "sub-styles" following
|
|
|
|
the {hybrid} or {hybrid/overlay} keyword, in any order. Each
|
|
|
|
sub-style's name is followed by its usual arguments, as illustrated in
|
|
|
|
the example above. See the doc pages of individual pair styles for a
|
|
|
|
listing and explanation of the appropriate arguments.
|
|
|
|
|
|
|
|
The pair_coeff commands are also specified exactly as they would be
|
|
|
|
for a simulation using only one pair style, with one additional
|
|
|
|
argument. Following the I,J type specification, the first argument
|
|
|
|
sets the pair sub-style. The remaining arguments are the coefficients
|
|
|
|
appropriate to that style. For example, consider a simulation with 3
|
|
|
|
atom types: types 1 and 2 are Ni atoms, type 3 are LJ atoms with
|
|
|
|
charges. The following commands would set up a hybrid simulation:
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2006-09-28 03:12:31 +08:00
|
|
|
pair_style hybrid eam/alloy lj/cut/coul/cut 10.0 lj/cut 8.0
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_coeff * * eam/alloy nialhjea Ni Ni NULL
|
2006-09-22 00:22:34 +08:00
|
|
|
pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0
|
2007-10-03 05:55:02 +08:00
|
|
|
pair_coeff 1*2 3 lj/cut 0.8 1.3 :pre
|
|
|
|
|
2011-06-01 23:21:07 +08:00
|
|
|
If pair coefficients are specified in the data file read via the
|
|
|
|
"read_data"_read_data.html command, then the same string,
|
|
|
|
e.g. "eam/alloy" or "lj/cut", must be listed as the 1st argument of
|
|
|
|
each line in the "Pair Coeffs" section, e.g.
|
|
|
|
|
|
|
|
3 lj/cut/coul/cut 1.0 1.0 :pre
|
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
Note that the pair_coeff command for {eam/alloy} includes a mapping
|
|
|
|
specification of elements to all atom types, even those not assigned
|
2010-06-17 23:13:22 +08:00
|
|
|
to the {eam/alloy} potential. The NULL keyword is used by many such
|
2007-10-03 05:55:02 +08:00
|
|
|
potentials (eam/alloy, Tersoff, AIREBO, etc), to denote an atom type
|
|
|
|
that will be assigned to a different sub-style.
|
|
|
|
|
|
|
|
For the {hybrid} style, each atom type pair I,J is assigned to exactly
|
|
|
|
one sub-style. Just as with a simulation using a single pair style,
|
|
|
|
if you specify the same atom type pair in a second pair_coeff command,
|
|
|
|
the previous assignment will be overwritten.
|
|
|
|
|
|
|
|
For the {hybrid/overlay} style, each atom type pair I,J can be
|
2010-06-17 23:13:22 +08:00
|
|
|
assigned to one or more sub-styles. If you specify the same atom type
|
|
|
|
pair in a second pair_coeff command with a new sub-style, then the
|
|
|
|
second sub-style is added to the list of potentials that will be
|
|
|
|
calculated for two interacting atoms of those types. If you specify
|
|
|
|
the same atom type pair in a second pair_coeff command with a
|
|
|
|
sub-style that has already been defined for that pair of atoms, then
|
|
|
|
the new pair coefficients simply override the previous ones, as in the
|
|
|
|
normal usage of the pair_coeff command. E.g. these two sets of
|
|
|
|
commands are the same:
|
|
|
|
|
|
|
|
pair_style lj/cut 2.5
|
|
|
|
pair_coeff * * 1.0 1.0
|
|
|
|
pair_coeff 2 2 1.5 0.8 :pre
|
|
|
|
|
|
|
|
pair_style hybrid/overlay lj/cut 2.5
|
|
|
|
pair_coeff * * lj/cut 1.0 1.0
|
|
|
|
pair_coeff 2 2 lj/cut 1.5 0.8 :pre
|
2007-10-03 05:55:02 +08:00
|
|
|
|
2009-10-31 06:56:44 +08:00
|
|
|
Coefficients must be defined for each pair of atoms types via the
|
|
|
|
"pair_coeff"_pair_coeff.html command as described above, or in the
|
|
|
|
data file or restart files read by the "read_data"_read_data.html or
|
|
|
|
"read_restart"_read_restart.html commands, or by mixing as described
|
|
|
|
below.
|
2007-10-03 05:55:02 +08:00
|
|
|
|
|
|
|
For both the {hybrid} and {hybrid/overlay} styles, every atom type
|
|
|
|
pair I,J (where I <= J) must be assigned to at least one sub-style via
|
|
|
|
the "pair_coeff"_pair_coeff.html command as in the examples above, or
|
|
|
|
in the data file read by the "read_data"_read_data.html, or by mixing
|
|
|
|
as described below.
|
|
|
|
|
|
|
|
If you want there to be no interactions between a particular pair of
|
|
|
|
atom types, you have 3 choices. You can assign the type pair to some
|
2010-05-07 23:11:21 +08:00
|
|
|
sub-style and use the "neigh_modify exclude type"_neigh_modify.html
|
2007-10-03 05:55:02 +08:00
|
|
|
command. You can assign it to some sub-style and set the coefficients
|
|
|
|
so that there is effectively no interaction (e.g. epsilon = 0.0 in a
|
2008-02-20 05:47:37 +08:00
|
|
|
LJ potential). Or, for {hybrid} and {hybrid/overlay} simulations, you
|
2011-06-01 23:21:07 +08:00
|
|
|
can use this form of the pair_coeff command in your input script:
|
2007-10-03 05:55:02 +08:00
|
|
|
|
|
|
|
pair_coeff 2 3 none :pre
|
|
|
|
|
2011-06-01 23:21:07 +08:00
|
|
|
or this form in the "Pair Coeffs" section of the data file:
|
|
|
|
|
|
|
|
3 none :pre
|
|
|
|
|
2008-02-20 05:47:37 +08:00
|
|
|
If an assignment to {none} is made in a simulation with the
|
2007-10-03 05:55:02 +08:00
|
|
|
{hybrid/overlay} pair style, it wipes out all previous assignments of
|
|
|
|
that atom type pair to sub-styles.
|
|
|
|
|
|
|
|
Note that you may need to use an "atom_style"_atom_style.html hybrid
|
|
|
|
command in your input script, if atoms in the simulation will need
|
|
|
|
attributes from several atom styles, due to using multiple pair
|
2006-09-28 03:12:31 +08:00
|
|
|
potentials.
|
2010-06-17 23:13:22 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2010-10-26 04:29:55 +08:00
|
|
|
The potential energy contribution to the overall system due to an
|
|
|
|
individual sub-style can be accessed and output via the "compute
|
|
|
|
pair"_compute_pair.html command.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2010-06-17 23:13:22 +08:00
|
|
|
IMPORTANT: Several of the potentials defined via the pair_style
|
|
|
|
command in LAMMPS are really many-body potentials, such as Tersoff,
|
|
|
|
AIREBO, MEAM, ReaxFF, etc. The way to think about using these
|
|
|
|
potentials in a hybrid setting is as follows.
|
|
|
|
|
|
|
|
A subset of atom types is assigned to the many-body potential with a
|
|
|
|
single "pair_coeff"_pair_coeff.html command, using "* *" to include
|
|
|
|
all types and the NULL keywords described above to exclude specific
|
|
|
|
types not assigned to that potential. If types 1,3,4 were assigned in
|
|
|
|
that way (but not type 2), this means that all many-body interactions
|
|
|
|
between all atoms of types 1,3,4 will be computed by that potential.
|
|
|
|
Pair_style hybrid allows interactions between type pairs 2-2, 1-2,
|
|
|
|
2-3, 2-4 to be specified for computation by other pair styles. You
|
|
|
|
could even add a second interaction for 1-1 to be computed by another
|
|
|
|
pair style, assuming pair_style hybrid/overlay is used.
|
|
|
|
|
2010-06-29 07:43:03 +08:00
|
|
|
But you should not, as a general rule, attempt to exclude the
|
|
|
|
many-body interactions for some subset of the type pairs within the
|
|
|
|
set of 1,3,4 interactions, e.g. exclude 1-1 or 1-3 interactions. That
|
|
|
|
is not conceptually well-defined for many-body interactions, since the
|
|
|
|
potential will typically calculate energies and foces for small groups
|
|
|
|
of atoms, e.g. 3 or 4 atoms, using the neighbor lists of the atoms to
|
|
|
|
find the additional atoms in the group. It is typically non-physical
|
|
|
|
to think of excluding an interaction between a particular pair of
|
|
|
|
atoms when the potential computes 3-body or 4-body interactions.
|
|
|
|
|
|
|
|
However, you can still use the pair_coeff none setting or the
|
|
|
|
"neigh_modify exclude"_neigh_modify.html command to exclude certain
|
|
|
|
type pairs from the neighbor list that will be passed to a manybody
|
|
|
|
sub-style. This will alter the calculations made by a many-body
|
|
|
|
potential, since it builds its list of 3-body, 4-body, etc
|
|
|
|
interactions from the pair list. You will need to think carefully as
|
|
|
|
to whether it produces a physically meaningful result for your model.
|
|
|
|
|
|
|
|
For example, imagine you have two atom types in your model, type 1 for
|
|
|
|
atoms in one surface, and type 2 for atoms in the other, and you wish
|
|
|
|
to use a Tersoff potential to compute interactions within each
|
|
|
|
surface, but not between surfaces. Then either of these two command
|
|
|
|
sequences would implement that model:
|
|
|
|
|
|
|
|
pair_style hybrid tersoff
|
|
|
|
pair_coeff * * tersoff SiC.tersoff C C
|
|
|
|
pair_coeff 1 2 none :pre
|
|
|
|
|
|
|
|
pair_style tersoff
|
|
|
|
pair_coeff * * SiC.tersoff C C
|
|
|
|
neigh_modify exclude type 1 2 :pre
|
|
|
|
|
|
|
|
Either way, only neighbor lists with 1-1 or 2-2 interactions would be
|
|
|
|
passed to the Tersoff potential, which means it would compute no
|
|
|
|
3-body interactions containing both type 1 and 2 atoms.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2007-06-26 08:03:39 +08:00
|
|
|
:line
|
|
|
|
|
2008-01-22 02:12:34 +08:00
|
|
|
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
2007-06-26 08:03:39 +08:00
|
|
|
|
|
|
|
Any pair potential settings made via the
|
|
|
|
"pair_modify"_pair_modify.html command are passed along to all
|
|
|
|
sub-styles of the hybrid potential.
|
|
|
|
|
|
|
|
For atom type pairs I,J and I != J, if the sub-style assigned to I,I
|
|
|
|
and J,J is the same, and if the sub-style allows for mixing, then the
|
2007-10-03 05:55:02 +08:00
|
|
|
coefficients for I,J can be mixed. This means you do not have to
|
|
|
|
specify a pair_coeff command for I,J since the I,J type pair will be
|
|
|
|
assigned automatically to the I,I sub-style and its coefficients
|
|
|
|
generated by the mixing rule used by that sub-style. For the
|
|
|
|
{hybrid/overlay} style, there is an additional requirement that both
|
|
|
|
the I,I and J,J pairs are assigned to a single sub-style. See the
|
|
|
|
"pair_modify" command for details of mixing rules. See the See the
|
|
|
|
doc page for the sub-style to see if allows for mixing.
|
|
|
|
|
|
|
|
The hybrid pair styles supports the "pair_modify"_pair_modify.html
|
2007-06-26 08:03:39 +08:00
|
|
|
shift, table, and tail options for an I,J pair interaction, if the
|
|
|
|
associated sub-style supports it.
|
|
|
|
|
2007-10-03 05:55:02 +08:00
|
|
|
For the hybrid pair styles, the list of sub-styles and their
|
|
|
|
respective settings are written to "binary restart
|
2010-05-07 23:11:21 +08:00
|
|
|
files"_restart.html, so a "pair_style"_pair_style.html 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. Thus, pair_coeff commands need to be re-specified in the
|
|
|
|
restart input script.
|
2007-06-26 08:03:39 +08:00
|
|
|
|
2007-10-12 07:09:49 +08:00
|
|
|
These pair styles support the use of the {inner}, {middle}, and
|
|
|
|
{outer} keywords of the "run_style respa"_run_style.html command, if
|
|
|
|
their sub-styles do.
|
2007-10-04 08:21:14 +08:00
|
|
|
|
2007-04-28 00:44:07 +08:00
|
|
|
[Restrictions:]
|
2006-09-22 00:22:34 +08:00
|
|
|
|
2008-02-20 05:47:37 +08:00
|
|
|
When using a long-range Coulombic solver (via the
|
2010-05-07 23:11:21 +08:00
|
|
|
"kspace_style"_kspace_style.html command) with a hybrid pair_style,
|
|
|
|
one or more sub-styles will be of the "long" variety,
|
|
|
|
e.g. {lj/cut/coul/long} or {buck/coul/long}. You must insure that the
|
|
|
|
short-range Coulombic cutoff used by each of these long pair styles is
|
|
|
|
the same or else LAMMPS will generate an error.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
|
|
|
"pair_coeff"_pair_coeff.html
|
|
|
|
|
|
|
|
[Default:] none
|