2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2015-12-21 23:20:41 +08:00
< title > compute group/group command — LAMMPS documentation< / title >
2015-07-30 22:53:28 +08:00
2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
2008-02-15 07:24:11 +08:00
2015-07-30 22:53:28 +08:00
< link rel = "stylesheet" href = "_static/css/theme.css" type = "text/css" / >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
< link rel = "stylesheet" href = "_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type = "text/css" / >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
2015-12-21 23:20:41 +08:00
< link rel = "top" title = "LAMMPS documentation" href = "index.html" / >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
< script src = "_static/js/modernizr.min.js" > < / script >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
< / head >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
< body class = "wy-body-for-nav" role = "document" >
2012-05-19 05:07:14 +08:00
2015-07-30 22:53:28 +08:00
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-nav-search" >
< a href = "Manual.html" class = "icon icon-home" > LAMMPS
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_intro.html" > 1. Introduction< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_start.html" > 2. Getting Started< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_commands.html" > 3. Commands< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_packages.html" > 4. Packages< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_accelerate.html" > 5. Accelerating LAMMPS performance< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_howto.html" > 6. How-to discussions< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_example.html" > 7. Example problems< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_perf.html" > 8. Performance & scalability< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_tools.html" > 9. Additional tools< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_modify.html" > 10. Modifying & extending LAMMPS< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_python.html" > 11. Python interface to LAMMPS< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_errors.html" > 12. Errors< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "Section_history.html" > 13. Future and history< / a > < / li >
< / ul >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "Manual.html" > LAMMPS< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "Manual.html" > Docs< / a > » < / li >
< li > compute group/group command< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "http://lammps.sandia.gov" > Website< / a >
< a href = "Section_commands.html#comm" > Commands< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "compute-group-group-command" >
< span id = "index-0" > < / span > < h1 > compute group/group command< a class = "headerlink" href = "#compute-group-group-command" title = "Permalink to this headline" > ¶< / a > < / h1 >
< div class = "section" id = "syntax" >
< h2 > Syntax< a class = "headerlink" href = "#syntax" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-python" > < div class = "highlight" > < pre > compute ID group-ID group/group group2-ID keyword value ...
< / pre > < / div >
< / div >
< ul class = "simple" >
< li > ID, group-ID are documented in < a class = "reference internal" href = "compute.html" > < em > compute< / em > < / a > command< / li >
< li > group/group = style name of this compute command< / li >
< li > group2-ID = group ID of second (or same) group< / li >
< li > zero or more keyword/value pairs may be appended< / li >
< li > keyword = < em > pair< / em > or < em > kspace< / em > or < em > boundary< / em > < / li >
< / ul >
< pre class = "literal-block" >
< em > pair< / em > value = < em > yes< / em > or < em > no< / em >
2015-07-31 00:49:30 +08:00
< em > kspace< / em > value = < em > yes< / em > or < em > no< / em >
< em > boundary< / em > value = < em > yes< / em > or < em > no< / em >
2015-07-30 22:53:28 +08:00
< / pre >
< / div >
< div class = "section" id = "examples" >
< h2 > Examples< a class = "headerlink" href = "#examples" title = "Permalink to this headline" > ¶< / a > < / h2 >
< div class = "highlight-python" > < div class = "highlight" > < pre > compute 1 lower group/group upper
2012-05-19 05:07:14 +08:00
compute 1 lower group/group upper kspace yes
2015-07-30 22:53:28 +08:00
compute mine fluid group/group wall
< / pre > < / div >
< / div >
< / div >
< div class = "section" id = "description" >
< h2 > Description< a class = "headerlink" href = "#description" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Define a computation that calculates the total energy and force
2008-02-15 07:24:11 +08:00
interaction between two groups of atoms: the compute group and the
2015-07-30 22:53:28 +08:00
specified group2. The two groups can be the same.< / p >
< p > If the < em > pair< / em > keyword is set to < em > yes< / em > , which is the default, then the
2012-05-19 05:07:14 +08:00
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
2015-07-30 22:53:28 +08:00
interactions with atoms in the specified group2.< / p >
< p > If the < em > kspace< / em > keyword is set to < em > yes< / em > , which is not the default, and
if a < a class = "reference internal" href = "kspace_style.html" > < em > kspace_style< / em > < / a > is defined, then the interaction
2012-05-23 22:45:27 +08:00
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
2015-07-30 22:53:28 +08:00
long-range Coulombic interactions with atoms in the specified group2.< / p >
< p > Normally the long-range Coulombic energy converges only when the net
2012-05-24 21:14:18 +08:00
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
2015-07-30 22:53:28 +08:00
artifacts. For more information see < a class = "reference internal" href = "#bogusz" > < span > (Bogusz)< / span > < / a > . If the
< em > boundary< / em > keyword is set to < em > yes< / em > , which is the default, and < em > kspace< / em >
2012-05-24 21:14:18 +08:00
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
2015-07-30 22:53:28 +08:00
that included in the regular Ewald and PPPM routines.< / p >
< p > This compute does not calculate any bond or angle or dihedral or
improper interactions between atoms in the two groups.< / p >
< hr class = "docutils" / >
< p > The pairwise contributions to the group-group interactions are
2012-05-19 05:07:14 +08:00
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
2015-07-30 22:53:28 +08:00
frequently.< / p >
< p > If you desire a breakdown of the interactions into a pairwise and
2012-05-19 05:07:14 +08:00
Kspace component, simply invoke the compute twice with the appropriate
2015-07-30 22:53:28 +08:00
yes/no settings for the < em > pair< / em > and < em > kspace< / em > keywords. This is no more
costly than using a single compute with both keywords set to < em > yes< / em > .
2012-05-19 05:07:14 +08:00
The individual contributions can be summed in a
2015-07-30 22:53:28 +08:00
< a class = "reference internal" href = "variable.html" > < em > variable< / em > < / a > if desired.< / p >
< p > This < a class = "reference external" href = "PDF/kspace.pdf" > document< / a > describes how the long-range
group-group calculations are performed.< / p >
< hr class = "docutils" / >
< p > < strong > Output info:< / strong > < / p >
< p > This compute calculates a global scalar (the energy) and a global
2009-12-04 07:58:11 +08:00
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
2015-07-30 22:53:28 +08:00
vector values from a compute as input. See < a class = "reference internal" href = "Section_howto.html#howto-15" > < span > this section< / span > < / a > for an overview of LAMMPS output
options.< / p >
< p > Both the scalar and vector values calculated by this compute are
“ extensive” . The scalar value will be in energy < a class = "reference internal" href = "units.html" > < em > units< / em > < / a > .
The vector values will be in force < a class = "reference internal" href = "units.html" > < em > units< / em > < / a > .< / p >
< / div >
< div class = "section" id = "restrictions" >
< h2 > Restrictions< a class = "headerlink" href = "#restrictions" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Not all pair styles can be evaluated in a pairwise mode as required by
2012-05-19 05:07:14 +08:00
this compute. For example, 3-body and other many-body potentials,
2015-07-30 22:53:28 +08:00
such as < a class = "reference internal" href = "pair_tersoff.html" > < em > Tersoff< / em > < / a > and
< a class = "reference internal" href = "pair_sw.html" > < em > Stillinger-Weber< / em > < / a > cannot be used. < a class = "reference internal" href = "pair_eam.html" > < em > EAM< / em > < / a >
2012-05-19 05:07:14 +08:00
potentials only include the pair potential portion of the EAM
2015-07-30 22:53:28 +08:00
interaction when used by this compute, not the embedding term.< / p >
< p > Not all Kspace styles support calculation of group/group interactions.
The < em > ewald< / em > and < em > pppm< / em > styles do.< / p >
< p > < strong > Related commands:< / strong > none< / p >
< / div >
< div class = "section" id = "default" >
< h2 > Default< a class = "headerlink" href = "#default" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > The option defaults are pair = yes, kspace = no, and boundary = yes.< / p >
< hr class = "docutils" / >
< p id = "bogusz" > Bogusz et al, J Chem Phys, 108, 7070 (1998)< / p >
< / div >
< / div >
< / div >
< / div >
< footer >
< hr / >
< div role = "contentinfo" >
< p >
2015-12-11 01:23:56 +08:00
© Copyright 2013 Sandia Corporation.
2015-07-30 22:53:28 +08:00
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
2015-12-21 23:20:41 +08:00
VERSION:'',
2015-07-30 22:53:28 +08:00
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "_static/jquery.js" > < / script >
< script type = "text/javascript" src = "_static/underscore.js" > < / script >
< script type = "text/javascript" src = "_static/doctools.js" > < / script >
< script type = "text/javascript" src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js" > < / script >
< script type = "text/javascript" src = "_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js" > < / script >
< script type = "text/javascript" src = "_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >