2008-02-15 07:24:11 +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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>compute group/group command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2012-05-19 05:07:14 +08:00
|
|
|
<PRE>compute ID group-ID group/group group2-ID keyword value ...
|
2008-02-15 07:24:11 +08:00
|
|
|
</PRE>
|
2012-05-19 05:07:14 +08:00
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
|
|
|
|
|
|
|
|
<LI>group/group = style name of this compute command
|
|
|
|
|
2008-02-15 07:24:11 +08:00
|
|
|
<LI>group2-ID = group ID of second (or same) group
|
2012-05-19 05:07:14 +08:00
|
|
|
|
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
2012-05-23 22:45:27 +08:00
|
|
|
<LI>keyword = <I>pair</I> or <I>kspace</I> or <I>boundary</I>
|
2012-05-19 05:07:14 +08:00
|
|
|
|
|
|
|
<PRE> <I>pair</I> value = <I>yes</I> or <I>no</I>
|
2012-05-23 22:45:27 +08:00
|
|
|
<I>kspace</I> value = <I>yes</I> or <I>no</I>
|
|
|
|
<I>boundary</I> value = <I>yes</I> or <I>no</I>
|
2012-05-19 05:07:14 +08:00
|
|
|
</PRE>
|
|
|
|
|
2008-02-15 07:24:11 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>compute 1 lower group/group upper
|
2012-05-19 05:07:14 +08:00
|
|
|
compute 1 lower group/group upper kspace yes
|
2008-02-15 07:24:11 +08:00
|
|
|
compute mine fluid group/group wall
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Define a computation that calculates the total energy and force
|
|
|
|
interaction between two groups of atoms: the compute group and the
|
2012-05-19 05:07:14 +08:00
|
|
|
specified group2. The two groups can be the same.
|
|
|
|
</P>
|
|
|
|
<P>If the <I>pair</I> keyword is set to <I>yes</I>, which is the default, then the
|
|
|
|
the interaction energy will include a pair component which is defined
|
|
|
|
as the pairwise energy between all pairs of atoms where one atom in
|
|
|
|
the pair is in the first group and the other is in the second group.
|
|
|
|
Likewise, the interaction force calculated by this compute will
|
|
|
|
include the force on the compute group atoms due to pairwise
|
2008-02-15 07:24:11 +08:00
|
|
|
interactions with atoms in the specified group2.
|
|
|
|
</P>
|
2012-05-19 05:07:14 +08:00
|
|
|
<P>If the <I>kspace</I> keyword is set to <I>yes</I>, which is not the default, and
|
2012-05-23 22:45:27 +08:00
|
|
|
if a <A HREF = "kspace_style.html">kspace_style</A> is defined, then the interaction
|
|
|
|
energy will include a Kspace component which is the long-range
|
|
|
|
Coulombic energy between all the atoms in the first group and all the
|
2012-05-24 21:14:18 +08:00
|
|
|
atoms in the 2nd group. Likewise, the interaction force calculated by
|
|
|
|
this compute will include the force on the compute group atoms due to
|
|
|
|
long-range Coulombic interactions with atoms in the specified group2.
|
|
|
|
</P>
|
|
|
|
<P>Normally the long-range Coulombic energy converges only when the net
|
|
|
|
charge of the unit cell is zero. However, one can assume the net
|
|
|
|
charge of the system is neutralized by a uniform background plasma,
|
|
|
|
and a correction to the system energy can be applied to reduce
|
|
|
|
artifacts. For more information see <A HREF = "#Bogusz">(Bogusz)</A>. If the
|
|
|
|
<I>boundary</I> keyword is set to <I>yes</I>, which is the default, and <I>kspace</I>
|
|
|
|
contributions are included, then this energy correction term will be
|
|
|
|
added to the total group-group energy. This correction term does not
|
|
|
|
affect the force calculation and will be zero if one or both of the
|
|
|
|
groups are charge neutral. This energy correction term is the same as
|
|
|
|
that included in the regular Ewald and PPPM routines.
|
2012-05-23 22:45:27 +08:00
|
|
|
</P>
|
2012-05-19 05:07:14 +08:00
|
|
|
<P>This compute does not calculate any bond or angle or dihedral or
|
|
|
|
improper interactions between atoms in the two groups.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>The pairwise contributions to the group-group interactions are
|
|
|
|
calculated by looping over a neighbor list. The Kspace contribution
|
|
|
|
to the group-group interactions require essentially the same amount of
|
|
|
|
work (FFTs, Ewald summation) as computing long-range forces for the
|
|
|
|
entire system. Thus it can be costly to invoke this compute too
|
|
|
|
frequently.
|
|
|
|
</P>
|
|
|
|
<P>If you desire a breakdown of the interactions into a pairwise and
|
|
|
|
Kspace component, simply invoke the compute twice with the appropriate
|
|
|
|
yes/no settings for the <I>pair</I> and <I>kspace</I> keywords. This is no more
|
|
|
|
costly than using a single compute with both keywords set to <I>yes</I>.
|
|
|
|
The individual contributions can be summed in a
|
|
|
|
<A HREF = "variable.html">variable</A> if desired.
|
|
|
|
</P>
|
2012-05-24 21:14:18 +08:00
|
|
|
<P>This <A HREF = "PDF/kspace.pdf">document</A> describes how the long-range
|
2012-05-19 05:07:14 +08:00
|
|
|
group-group calculations are performed.
|
2008-02-15 07:24:11 +08:00
|
|
|
</P>
|
2012-05-19 06:16:27 +08:00
|
|
|
<HR>
|
|
|
|
|
2008-02-15 07:24:11 +08:00
|
|
|
<P><B>Output info:</B>
|
|
|
|
</P>
|
2009-12-04 07:58:11 +08:00
|
|
|
<P>This compute calculates a global scalar (the energy) and a global
|
|
|
|
vector of length 3 (force), which can be accessed by indices 1-3.
|
|
|
|
These values can be used by any command that uses global scalar or
|
2011-08-26 01:01:01 +08:00
|
|
|
vector values from a compute as input. See <A HREF = "Section_howto.html#howto_15">this
|
2009-12-04 07:58:11 +08:00
|
|
|
section</A> for an overview of LAMMPS output
|
|
|
|
options.
|
|
|
|
</P>
|
|
|
|
<P>Both the scalar and vector values calculated by this compute are
|
2011-05-23 22:35:19 +08:00
|
|
|
"extensive". The scalar value will be in energy <A HREF = "units.html">units</A>.
|
2010-03-03 05:51:16 +08:00
|
|
|
The vector values will be in force <A HREF = "units.html">units</A>.
|
2010-01-24 07:20:05 +08:00
|
|
|
</P>
|
2008-02-15 07:24:11 +08:00
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
2012-05-19 05:07:14 +08:00
|
|
|
<P>Not all pair styles can be evaluated in a pairwise mode as required by
|
|
|
|
this compute. For example, 3-body and other many-body potentials,
|
|
|
|
such as <A HREF = "pair_tersoff.html">Tersoff</A> and
|
|
|
|
<A HREF = "pair_sw.html">Stillinger-Weber</A> cannot be used. <A HREF = "pair_eam.html">EAM</A>
|
|
|
|
potentials only include the pair potential portion of the EAM
|
|
|
|
interaction when used by this compute, not the embedding term.
|
|
|
|
</P>
|
|
|
|
<P>Not all Kspace styles support calculation of group/group interactions.
|
|
|
|
The <I>ewald</I> and <I>pppm</I> styles do.
|
2008-02-15 07:24:11 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B> none
|
|
|
|
</P>
|
2012-05-19 05:07:14 +08:00
|
|
|
<P><B>Default:</B>
|
|
|
|
</P>
|
2012-05-23 22:45:27 +08:00
|
|
|
<P>The option defaults are pair = yes, kspace = no, and boundary = yes.
|
2008-02-15 07:24:11 +08:00
|
|
|
</P>
|
2012-05-24 21:14:18 +08:00
|
|
|
<HR>
|
|
|
|
|
|
|
|
<A NAME = "Bogusz"></A>
|
|
|
|
|
|
|
|
<P>Bogusz et al, J Chem Phys, 108, 7070 (1998)
|
|
|
|
</P>
|
2008-02-15 07:24:11 +08:00
|
|
|
</HTML>
|