Page MenuHomec4science

create_bonds.html
No OneTemporary

File Metadata

Created
Tue, Oct 1, 11:24

create_bonds.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>create_bonds 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>create_bonds 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="create-bonds-command">
<span id="index-0"></span><h1>create_bonds command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">create_bonds</span> <span class="n">group</span><span class="o">-</span><span class="n">ID</span> <span class="n">group2</span><span class="o">-</span><span class="n">ID</span> <span class="n">btype</span> <span class="n">rmin</span> <span class="n">rmax</span>
</pre></div>
</div>
<ul class="simple">
<li>group-ID = ID of first group</li>
<li>group2-ID = ID of second group, bonds will be between atoms in the 2 groups</li>
<li>btype = bond type of created bonds</li>
<li>rmin = minimum distance between pair of atoms to bond together</li>
<li>rmax = minimum distance between pair of atoms to bond together</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">create_bonds</span> <span class="nb">all</span> <span class="nb">all</span> <span class="mi">1</span> <span class="mf">1.0</span> <span class="mf">1.2</span>
<span class="n">create_bonds</span> <span class="n">surf</span> <span class="n">solvent</span> <span class="mi">3</span> <span class="mf">2.0</span> <span class="mf">2.4</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Create bonds between pairs of atoms that meet specified distance
criteria. The bond interactions can then be computed during a
simulation by the bond potential defined by the
<a class="reference internal" href="bond_style.html"><span class="doc">bond_style</span></a> and <a class="reference internal" href="bond_coeff.html"><span class="doc">bond_coeff</span></a>
commands. This command is useful for adding bonds to a system,
e.g. between nearest neighbors in a lattice of atoms, without having
to enumerate all the bonds in the data file read by the
<a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a> command.</p>
<p>Note that the flexibility of this command is limited. It can be used
several times to create different types of bond at different
distances. But it cannot typically create all the bonds that would
normally be defined in a complex system of molecules. Also note that
this command does not add any 3-body or 4-body interactions which,
depending on your model, may be induced by added bonds,
e.g. <a class="reference internal" href="angle_style.html"><span class="doc">angle</span></a>, <a class="reference internal" href="dihedral_style.html"><span class="doc">dihedral</span></a>, or
<a class="reference internal" href="improper_style.html"><span class="doc">improper</span></a> interactions.</p>
<p>All created bonds will be between pairs of atoms I,J where I is in one
of the two specified groups, and J is in the other. The two groups
can be the same, e.g. group &#8220;all&#8221;. The created bonds will be of bond
type <em>btype</em>, where <em>btype</em> must be a value between 1 and the number
of bond types defined. This maximum value is set by the &#8220;bond types&#8221;
field in the header of the data file read by the
<a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a> command, or via the optional &#8220;bond/types&#8221;
argument of the <a class="reference internal" href="create_box.html"><span class="doc">create_box</span></a> command.</p>
<p>For a bond to be created, an I,J pair of atoms must be a distance D
apart such that <em>rmin</em> &lt;= D &lt;= <em>rmax</em>.</p>
<p>The following settings must have been made in an input
script before this command is used:</p>
<ul class="simple">
<li>special_bonds weight for 1-2 interactions must be 0.0</li>
<li>a <a class="reference internal" href="pair_style.html"><span class="doc">pair_style</span></a> must be defined</li>
<li>no <a class="reference internal" href="kspace_style.html"><span class="doc">kspace_style</span></a> defined</li>
<li>minimum <a class="reference internal" href="pair_style.html"><span class="doc">pair_style</span></a> cutoff + <a class="reference internal" href="neighbor.html"><span class="doc">neighbor</span></a> skin &gt;= <em>rmax</em></li>
</ul>
<p>These settings are required so that a neighbor list can be created to
search for nearby atoms. Pairs of atoms that are already bonded
cannot appear in the neighbor list, to avoid creation of duplicate
bonds. The neighbor list for all atom type pairs must also extend to
a distance that encompasses the <em>rmax</em> for new bonds to create.</p>
<p>An additional requirement is that your system must be ready to perform
a simulation. This means, for example, that all
<a class="reference internal" href="pair_style.html"><span class="doc">pair_style</span></a> coefficients be set via the
<a class="reference internal" href="pair_coeff.html"><span class="doc">pair_coeff</span></a> command. A <a class="reference internal" href="bond_style.html"><span class="doc">bond_style</span></a>
command and all bond coefficients must also be set, even if no bonds
exist before this command is invoked. This is because the building of
neighbor list requires initialization and setup of a simulation,
similar to what a <a class="reference internal" href="run.html"><span class="doc">run</span></a> command would require.</p>
<p>Note that you can change any of these settings after this command
executes, e.g. if you wish to use long-range Coulombic interactions
via the <a class="reference internal" href="kspace_style.html"><span class="doc">kspace_style</span></a> command for your subsequent
simulation.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If the system has no bonds to begin with, or if more bonds per
atom are being added than currently exist, then you must insure that
the number of bond types and the maximum number of bonds per atom are
set to large enough values. Otherwise an error may occur when too
many bonds are added to an atom. If the <a class="reference internal" href="read_data.html"><span class="doc">read_data</span></a>
command is used to define the system, these 2 parameters can be set
via the &#8220;bond types&#8221; and &#8220;extra bond per atom&#8221; fields in the header
section of the data file. If the <a class="reference internal" href="create_box.html"><span class="doc">create_box</span></a> command
is used to define the system, these 2 parameters can be set via its
optional &#8220;bond/types&#8221; and &#8220;extra/bond/per/atom&#8221; arguments. See the
doc pages for the 2 commands for details.</p>
</div>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<p>This command cannot be used with molecular systems defined using
molecule template files via the <a class="reference internal" href="molecule.html"><span class="doc">molecule</span></a> and
<a class="reference internal" href="atom_style.html"><span class="doc">atom_style template</span></a> commands.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands</h2>
<p><a class="reference internal" href="create_atoms.html"><span class="doc">create_atoms</span></a>, <a class="reference internal" href="delete_bonds.html"><span class="doc">delete_bonds</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