lammps/doc/pair_hybrid.html

175 lines
7.9 KiB
HTML

<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>
<HR>
<H3>pair_style hybrid command
</H3>
<H3>pair_style hybrid/overlay command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_style hybrid style1 args style2 args ...
pair_style hybrid/overlay style1 args style2 args ...
</PRE>
<UL><LI>style1,style2 = list of one or more pair styles and their arguments
</UL>
<P><B>Examples:</B>
</P>
<PRE>pair_style hybrid lj/cut/coul/cut 10.0 eam lj/cut 5.0
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>
<PRE>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>
<P><B>Description:</B>
</P>
<P>The <I>hybrid</I> and <I>hybrid/overlay</I> styles enable the use of multiple
pair styles in one simulation. With the <I>hybrid</I> style, exactly one
pair style is assigned to each pair of atom types. With the
<I>hybrid/overlay</I> 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 <A HREF = "pair_coeff.html">pair_coeff</A> command.
</P>
<P>Here are two examples of hybrid simulations. The <I>hybrid</I> style could
be used for a simulation of a metal droplet on a LJ surface. The
metal atoms interact with each other via an <I>eam</I> potential, the
surface atoms interact with each other via a <I>lj/cut</I> potential, and
the metal/surface interaction is also computed via a <I>lj/cut</I>
potential. The <I>hybrid/overlay</I> 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 <I>lj/cut</I> and <I>coul/long</I> together gives the same result as if
the <I>lj/cut/coul/long</I> 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.
</P>
<P>All pair styles that will be used are listed as "sub-styles" following
the <I>hybrid</I> or <I>hybrid/overlay</I> 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.
</P>
<P>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:
</P>
<PRE>pair_style hybrid eam/alloy lj/cut/coul/cut 10.0 lj/cut 8.0
pair_coeff * * eam/alloy nialhjea Ni Ni NULL
pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0
pair_coeff 1*2 3 lj/cut 0.8 1.3
</PRE>
<P>Note that the pair_coeff command for <I>eam/alloy</I> includes a mapping
specification of elements to all atom types, even those not assigned
to the <I>eam/alloy</I> potential. The NULL keyword is used by such
potentials (eam/alloy, Tersoff, AIREBO, etc), to denote an atom type
that will be assigned to a different sub-style.
</P>
<P>For the <I>hybrid</I> 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.
</P>
<P>For the <I>hybrid/overlay</I> style, each atom type pair I,J can be
assigned to one or more sub-styles. Thus if you specify the same atom
type pair in a second pair_coeff command, a second sub-style is added
to the list of potentials that will be calculated for two interactings
atoms of those types.
</P>
<P>The following coefficients must be defined for each pair of atoms
types via the <A HREF = "pair_coeff.html">pair_coeff</A> command as in the examples
above, or in the data file or restart files read by the
<A HREF = "read_data.html">read_data</A> or <A HREF = "read_restart.html">read_restart</A>
commands, or by mixing as described below:
</P>
<P>For both the <I>hybrid</I> and <I>hybrid/overlay</I> styles, every atom type
pair I,J (where I <= J) must be assigned to at least one sub-style via
the <A HREF = "pair_coeff.html">pair_coeff</A> command as in the examples above, or
in the data file read by the <A HREF = "read_data.html">read_data</A>, or by mixing
as described below.
</P>
<P>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
sub-style and use the <A HREF = "neigh_modify">neigh_modify exclude type</A>
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
LJ potential). Or, for <I>hybrid</I> and <I>hybrid/overlay</I> simulations, you
can use this form of the pair_coeff command:
</P>
<PRE>pair_coeff 2 3 none
</PRE>
<P>If an assignment to <I>none</I> is made in a simulation with the
<I>hybrid/overlay</I> pair style, it wipes out all previous assignments of
that atom type pair to sub-styles.
</P>
<P>Note that you may need to use an <A HREF = "atom_style.html">atom_style</A> hybrid
command in your input script, if atoms in the simulation will need
attributes from several atom styles, due to using multiple pair
potentials.
</P>
<HR>
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
</P>
<P>Any pair potential settings made via the
<A HREF = "pair_modify.html">pair_modify</A> command are passed along to all
sub-styles of the hybrid potential.
</P>
<P>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
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
<I>hybrid/overlay</I> 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.
</P>
<P>The hybrid pair styles supports the <A HREF = "pair_modify.html">pair_modify</A>
shift, table, and tail options for an I,J pair interaction, if the
associated sub-style supports it.
</P>
<P>For the hybrid pair styles, the list of sub-styles and their
respective settings are written to <A HREF = "restart.html">binary restart
files</A>, 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. Thus,
pair_coeff commands need to be specified in the restart input script.
</P>
<P>These pair styles support the use of the <I>inner</I>, <I>middle</I>, and
<I>outer</I> keywords of the <A HREF = "run_style.html">run_style respa</A> command, if
their sub-styles do.
</P>
<P><B>Restrictions:</B>
</P>
<P>When using a long-range Coulombic solver (via the
<A HREF = "kspace_style">kspace_style</A> command) with a hybrid pair_style, one or
more sub-styles will be of the "long" variety, e.g. <I>lj/cut/coul/long</I>
or <I>buck/coul/long</I>. 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.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_coeff.html">pair_coeff</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>