Page MenuHomec4science

fix_bond_create.html
No OneTemporary

File Metadata

Created
Sat, Dec 28, 10:31

fix_bond_create.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>fix bond/create command &mdash; LAMMPS 15 May 2015 version 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 15 May 2015 version 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>fix bond/create command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Homepage</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="fix-bond-create-command">
<span id="index-0"></span><h1>fix bond/create command<a class="headerlink" href="#fix-bond-create-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>fix ID group-ID bond/create Nevery itype jtype Rmin bondtype keyword values ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command</li>
<li>bond/create = style name of this fix command</li>
<li>Nevery = attempt bond creation every this many steps</li>
<li>itype,jtype = atoms of itype can bond to atoms of jtype</li>
<li>Rmin = 2 atoms separated by less than Rmin can bond (distance units)</li>
<li>bondtype = type of created bonds</li>
<li>zero or more keyword/value pairs may be appended to args</li>
<li>keyword = <em>iparam</em> or <em>jparam</em> or <em>prob</em> or <em>atype</em> or <em>dtype</em> or <em>itype</em></li>
</ul>
<pre class="literal-block">
<em>iparam</em> values = maxbond, newtype
maxbond = max # of bonds of bondtype the itype atom can have
newtype = change the itype atom to this type when maxbonds exist
<em>jparam</em> values = maxbond, newtype
maxbond = max # of bonds of bondtype the jtype atom can have
newtype = change the jtype atom to this type when maxbonds exist
<em>prob</em> values = fraction seed
fraction = create a bond with this probability if otherwise eligible
seed = random number seed (positive integer)
<em>atype</em> value = angletype
angletype = type of created angles
<em>dtype</em> value = dihedraltype
dihedraltype = type of created dihedrals
<em>itype</em> value = impropertype
impropertype = type of created impropers
</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>fix 5 all bond/create 10 1 2 0.8 1
fix 5 all bond/create 1 3 3 0.8 1 prob 0.5 85784 iparam 2 3
fix 5 all bond/create 1 3 3 0.8 1 prob 0.5 85784 iparam 2 3 atype 1 dtype 2
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Create bonds between pairs of atoms as a simulation runs according to
specified criteria. This can be used to model cross-linking of
polymers, the formation of a percolation network, etc. In this
context, a bond means an interaction between a pair of atoms computed
by the <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> command. Once the bond is created
it will be permanently in place. Optionally, the creation of a bond
can also create angle, dihedral, and improper interactions that bond
is part of. See the discussion of the <em>atype</em>, <em>dtype</em>, and <em>itype</em>
keywords below.</p>
<p>This is different than a <a class="reference internal" href="pair_style.html"><em>pairwise</em></a> bond-order
potential such as Tersoff or AIREBO which infers bonds and many-body
interactions based on the current geometry of a small cluster of atoms
and effectively creates and destroys bonds and higher-order many-body
interactions from timestep to timestep as atoms move.</p>
<p>A check for possible new bonds is performed every <em>Nevery</em> timesteps.
If two atoms I,J are within a distance <em>Rmin</em> of each other, if I is
of atom type <em>itype</em>, if J is of atom type <em>jtype</em>, if both I and J
are in the specified fix group, if a bond does not already exist
between I and J, and if both I and J meet their respective <em>maxbond</em>
requirement (explained below), then I,J is labeled as a &#8220;possible&#8221;
bond pair.</p>
<p>If several atoms are close to an atom, it may have multiple possible
bond partners. Every atom checks its list of possible bond partners
and labels the closest such partner as its &#8220;sole&#8221; bond partner. After
this is done, if atom I has atom J as its sole partner, and atom J has
atom I as its sole partner, then the I,J bond is &#8220;eligible&#8221; to be
formed.</p>
<p>Note that these rules mean an atom will only be part of at most one
created bond on a given timestep. It also means that if atom I
chooses atom J as its sole partner, but atom J chooses atom K is its
sole partner (due to Rjk &lt; Rij), then this means atom I will not form
a bond on this timestep, even if it has other possible bond partners.</p>
<p>It is permissible to have <em>itype</em> = <em>jtype</em>. <em>Rmin</em> must be &lt;= the
pairwise cutoff distance between <em>itype</em> and <em>jtype</em> atoms, as defined
by the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> command.</p>
<p>The <em>iparam</em> and <em>jparam</em> keywords can be used to limit the bonding
functionality of the participating atoms. Each atom keeps track of
how many bonds of <em>bondtype</em> it already has. If atom I of
itype already has <em>maxbond</em> bonds (as set by the <em>iparam</em>
keyword), then it will not form any more. Likewise for atom J. If
<em>maxbond</em> is set to 0, then there is no limit on the number of bonds
that can be formed with that atom.</p>
<p>The <em>newtype</em> value for <em>iparam</em> and <em>jparam</em> can be used to change
the atom type of atom I or J when it reaches <em>maxbond</em> number of bonds
of type <em>bondtype</em>. This means it can now interact in a pairwise
fashion with other atoms in a different way by specifying different
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> coefficients. If you do not wish the
atom type to change, simply specify <em>newtype</em> as <em>itype</em> or <em>jtype</em>.</p>
<p>The <em>prob</em> keyword can also effect whether an eligible bond is
actually created. The <em>fraction</em> setting must be a value between 0.0
and 1.0. A uniform random number between 0.0 and 1.0 is generated and
the eligible bond is only created if the random number &lt; fraction.</p>
<p>Any bond that is created is assigned a bond type of <em>bondtype</em></p>
<p>When a bond is created, data structures within LAMMPS that store bond
topology are updated to reflect the creation. If the bond is part of
new 3-body (angle) or 4-body (dihedral, improper) interactions, you
can choose to create new angles, dihedrals, impropers as well, using
the <em>atype</em>, <em>dtype</em>, and <em>itype</em> keywords. All of these changes
typically affect pairwise interactions between atoms that are now part
of new bonds, angles, etc.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">One data structure that is not updated when a bond
breaks are the molecule IDs stored by each atom. Even though two
molecules become one moleclue due to the created bond, all atoms in
the new moleclue retain their original molecule IDs.</p>
</div>
<p>If the <em>atype</em> keyword is used and if an angle potential is defined
via the <code class="xref doc docutils literal"><span class="pre">angle_style</span></code> command, then any new 3-body
interactions inferred by the creation of a bond will create new angles
of type <em>angletype</em>, with parameters assigned by the corresponding
<a class="reference internal" href="angle_coeff.html"><em>angle_coeff</em></a> command. Likewise, the <em>dtype</em> and
<em>itype</em> keywords will create new dihedrals and impropers of type
<em>dihedraltype</em> and <em>impropertype</em>.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">To create a new bond, the internal LAMMPS data
structures that store this information must have space for it. When
LAMMPS is initialized from a data file, the list of bonds is scanned
and the maximum number of bonds per atom is tallied. If some atom
will acquire more bonds than this limit as this fix operates, then the
&#8220;extra bond per atom&#8221; parameter must be set to allow for it. Ditto
for &#8220;extra angle per atom&#8221;, &#8220;extra dihedral per atom&#8221;, and &#8220;extra
improper per atom&#8221; if angles, dihedrals, or impropers are being added
when bonds are created. See the <a class="reference internal" href="read_data.html"><em>read_data</em></a> or
<a class="reference internal" href="create_box.html"><em>create_box</em></a> command for more details. Note that a
data file with no atoms can be used if you wish to add unbonded atoms
via the <a class="reference internal" href="create_atoms.html"><em>create atoms</em></a> command, e.g. for a
percolation simulation.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">LAMMPS stores and maintains a data structure with a
list of the 1st, 2nd, and 3rd neighbors of each atom (within the bond
topology of the system) for use in weighting pairwise interactions for
bonded atoms. Note that adding a single bond always adds a new 1st
neighbor but may also induce <em>many</em> new 2nd and 3rd neighbors,
depending on the molecular topology of your system. The &#8220;extra
special per atom&#8221; parameter must typically be set to allow for the new
maximum total size (1st + 2nd + 3rd neighbors) of this per-atom list.
There are 3 ways to do this. See the <a class="reference internal" href="read_data.html"><em>read_data</em></a> or
<a class="reference internal" href="create_box.html"><em>create_box</em></a> or &#8220;special_bonds extra&#8221; commands for
details.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Even if you do not use the <em>atype</em>, <em>dtype</em>, or
<em>itype</em> keywords, the list of topological neighbors is updated for
atoms affected by the new bond. This in turn affects which neighbors
are considered for pairwise interactions, using the weighting rules
set by the <a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command. Consider a new
bond created between atoms I,J. If J has a bonded neighbor K, then K
becomes a 2nd neighbor of I. Even if the <em>atype</em> keyword is not used
to create angle I-J-K, the pairwise interaction between I and K will
be potentially turned off or weighted by the 1-3 weighting specified
by the <a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command. This is the case
even if the &#8220;angle yes&#8221; option was used with that command. The same
is true for 3rd neighbors (1-4 interactions), the <em>dtype</em> keyword, and
the &#8220;dihedral yes&#8221; option used with the
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command.</p>
</div>
<p>Note that even if your simulation starts with no bonds, you must
define a <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> and use the
<a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a> command to specify coefficients for the
<em>bondtype</em>. Similarly, if new atom types are specified by the
<em>iparam</em> or <em>jparam</em> keywords, they must be within the range of atom
types allowed by the simulation and pairwise coefficients must be
specified for the new types.</p>
<p>Computationally, each timestep this fix operates, it loops over
neighbor lists and computes distances between pairs of atoms in the
list. It also communicates between neighboring processors to
coordinate which bonds are created. Moreover, if any bonds are
created, neighbor lists must be immediately updated on the same
timestep. This is to insure that any pairwise interactions that
should be turned &#8220;off&#8221; due to a bond creation, because they are now
excluded by the presence of the bond and the settings of the
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command, will be immediately
recognized. All of these operations increase the cost of a timestep.
Thus you should be cautious about invoking this fix too frequently.</p>
<p>You can dump out snapshots of the current bond topology via the <a class="reference internal" href="dump.html"><em>dump local</em></a> command.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Creating a bond typically alters the energy of a
system. You should be careful not to choose bond creation criteria
that induce a dramatic change in energy. For example, if you define a
very stiff harmonic bond and create it when 2 atoms are separated by a
distance far from the equilibribum bond length, then the 2 atoms will
oscillate dramatically when the bond is formed. More generally, you
may need to thermostat your system to compensate for energy changes
resulting from created bonds (and angles, dihedrals, impropers).</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options
are relevant to this fix.</p>
<p>This fix computes two statistics which it stores in a global vector of
length 2, which can be accessed by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. The vector values calculated
by this fix are &#8220;intensive&#8221;.</p>
<p>These are the 2 quantities:</p>
<ul class="simple">
<li><ol class="first arabic">
<li># of bonds created on the most recent creation timestep</li>
</ol>
</li>
<li><ol class="first arabic" start="2">
<li>cummulative # of bonds created</li>
</ol>
</li>
</ul>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This fix is part of the MC package. It is only enabled if LAMMPS was
built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="fix_bond_break.html"><em>fix bond/break</em></a>, <a class="reference internal" href="fix_bond_swap.html"><em>fix bond/swap</em></a>, <a class="reference internal" href="dump.html"><em>dump local</em></a>,
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a></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 iparam = (0,itype), jparam = (0,jtype), and
prob = 1.0.</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</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:'15 May 2015 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="_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