Page MenuHomec4science

compute_bond_local.html
No OneTemporary

File Metadata

Created
Sun, Dec 29, 09:43

compute_bond_local.html

<!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">
<title>compute bond/local command &mdash; LAMMPS documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<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 &amp; 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 &amp; 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>
&nbsp;
</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> &raquo;</li>
<li>compute bond/local 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-bond-local-command">
<span id="index-0"></span><h1>compute bond/local command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">ID</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">value1</span> <span class="n">value2</span> <span class="o">...</span>
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command</li>
<li>bond/local = style name of this compute command</li>
<li>one or more values may be appended</li>
<li>value = <em>dist</em> or <em>engpot</em> or <em>force</em> or <em>engvib</em> or <em>engrot</em> or <em>engtrans</em> or <em>omega</em> or <em>velvib</em></li>
</ul>
<pre class="literal-block">
<em>dist</em> = bond distance
<em>engpot</em> = bond potential energy
<em>force</em> = bond force
</pre>
<pre class="literal-block">
<em>engvib</em> = bond kinetic energy of vibration
<em>engrot</em> = bond kinetic energy of rotation
<em>engtrans</em> = bond kinetic energy of translation
<em>omega</em> = magnitude of bond angular velocity
<em>velvib</em> = vibrational velocity along the bond length
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">engpot</span>
<span class="n">compute</span> <span class="mi">1</span> <span class="nb">all</span> <span class="n">bond</span><span class="o">/</span><span class="n">local</span> <span class="n">dist</span> <span class="n">engpot</span> <span class="n">force</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Define a computation that calculates properties of individual bond
interactions. The number of datums generated, aggregated across all
processors, equals the number of bonds in the system, modified by the
group parameter as explained below.</p>
<p>The value <em>dist</em> is the current length of the bond.</p>
<p>The value <em>engpot</em> is the potential energy for the bond,
based on the current separation of the pair of atoms in the bond.</p>
<p>The value <em>force</em> is the magnitude of the force acting between the
pair of atoms in the bond.</p>
<p>The remaining properties are all computed for motion of the two atoms
relative to the center of mass (COM) velocity of the 2 atoms in the
bond.</p>
<p>The value <em>engvib</em> is the vibrational kinetic energy of the two atoms
in the bond, which is simply 1/2 m1 v1^2 + 1/2 m1 v2^2, where v1 and
v2 are the magnitude of the velocity of the 2 atoms along the bond
direction, after the COM velocity has been subtracted from each.</p>
<p>The value <em>engrot</em> is the rotationsl kinetic energy of the two atoms
in the bond, which is simply 1/2 m1 v1^2 + 1/2 m1 v2^2, where v1 and
v2 are the magnitude of the velocity of the 2 atoms perpendicular to
the bond direction, after the COM velocity has been subtracted from
each.</p>
<p>The value <em>engtrans</em> is the translational kinetic energy associated
with the motion of the COM of the system itself, namely 1/2 (m1+m2)
Vcm^2 where Vcm = magnitude of the velocity of the COM.</p>
<p>Note that these 3 kinetic energy terms are simply a partitioning of
the summed kinetic energy of the 2 atoms themselves. I.e. total KE =
1/2 m1 v1^2 + 1/2 m2 v3^2 = engvib + engrot + engtrans, where v1,v2
are the magnitude of the velocities of the 2 atoms, without any
adjustment for the COM velocity.</p>
<p>The value <em>omega</em> is the magnitude of the angular velocity of the
two atoms around their COM position.</p>
<p>The value <em>velvib</em> is the magnitude of the relative velocity of the
two atoms in the bond towards each other. A negative value means the
2 atoms are moving toward each other; a positive value means they are
moving apart.</p>
<p>Note that all these properties are computed for the pair of atoms in a
bond, whether the 2 atoms represent a simple diatomic molecule, or are
part of some larger molecule.</p>
<p>The local data stored by this command is generated by looping over all
the atoms owned on a processor and their bonds. A bond will only be
included if both atoms in the bond are in the specified compute group.
Any bonds that have been broken (see the <a class="reference internal" href="bond_style.html"><span class="doc">bond_style</span></a>
command) by setting their bond type to 0 are not included. Bonds that
have been turned off (see the <a class="reference internal" href="fix_shake.html"><span class="doc">fix shake</span></a> or
<a class="reference internal" href="delete_bonds.html"><span class="doc">delete_bonds</span></a> commands) by setting their bond type
negative are written into the file, but their energy will be 0.0.</p>
<p>Note that as atoms migrate from processor to processor, there will be
no consistent ordering of the entries within the local vector or array
from one timestep to the next. The only consistency that is
guaranteed is that the ordering on a particular timestep will be the
same for local vectors or arrays generated by other compute commands.
For example, bond output from the <a class="reference internal" href="compute_property_local.html"><span class="doc">compute property/local</span></a> command can be combined
with data from this command and output by the <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a>
command in a consistent way.</p>
<p>Here is an example of how to do this:</p>
<pre class="literal-block">
compute 1 all property/local btype batom1 batom2
compute 2 all bond/local dist engpot
dump 1 all local 1000 tmp.dump index c_1[*] c_2[*]
</pre>
<p><strong>Output info:</strong></p>
<p>This compute calculates a local vector or local array depending on the
number of keywords. The length of the vector or number of rows in the
array is the number of bonds. If a single keyword is specified, a
local vector is produced. If two or more keywords are specified, a
local array is produced where the number of columns = the number of
keywords. The vector or array can be accessed by any command that
uses local values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">this section</span></a> for an overview of LAMMPS output
options.</p>
<p>The output for <em>dist</em> will be in distance <a class="reference internal" href="units.html"><span class="doc">units</span></a>. The
output for <em>velvib</em> will be in velocity <a class="reference internal" href="units.html"><span class="doc">units</span></a>. The output
for <em>omega</em> will be in velocity/distance <a class="reference internal" href="units.html"><span class="doc">units</span></a>. The
output for <em>engtrans</em>, <em>engvib</em>, <em>engrot</em>, and <em>engpot</em> will be in
energy <a class="reference internal" href="units.html"><span class="doc">units</span></a>. The output for <em>force</em> will be in force
<a class="reference internal" href="units.html"><span class="doc">units</span></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands</h2>
<p><a class="reference internal" href="dump.html"><span class="doc">dump local</span></a>, <a class="reference internal" href="compute_property_local.html"><span class="doc">compute property/local</span></a></p>
<p><strong>Default:</strong> none</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2013 Sandia Corporation.
</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:'./',
VERSION:'',
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>

Event Timeline