<spanid="index-0"></span><h1>pair_style line/lj command<aclass="headerlink"href="#pair-style-line-lj-command"title="Permalink to this headline">¶</a></h1>
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>Style <em>line/lj</em> treats particles which are line segments as a set of
small spherical particles that tile the line segment length as
explained below. Interactions between two line segments, each with N1
and N2 spherical particles, are calculated as the pairwise sum of
N1*N2 Lennard-Jones interactions. Interactions between a line segment
with N spherical particles and a point particle are treated as the
pairwise sum of N Lennard-Jones interactions. See the <aclass="reference internal"href="pair_lj.html"><em>pair_style lj/cut</em></a> doc page for the definition of Lennard-Jones
interactions.</p>
<p>The cutoff distance for an interaction between 2 line segments, or
between a line segment and a point particle, is calculated from the
position of the line segment (its center), not between pairs of
individual spheres comprising the line segment. Thus an interaction
is either calculated in its entirety or not at all.</p>
<p>The set of non-overlapping spherical particles that represent a line
segment, for purposes of this pair style, are generated in the
following manner. Their size is a function of the line segment length
and the specified sigma for that particle type. If a line segment has
a length L and is of type I, then the number of spheres N that
represent the segment is calculated as N = L/sigma_II, rounded up to
an integer value. Thus if L is not evenly divisibly by sigam_II, N is
incremented to include one extra sphere. In this case, the spheres
must be slightly smaller than sigma_II so as not to overlap, so a new
sigma-prime is chosen as the sphere diameter, such that L/N =
sigma-prime. Thus the line segment interacts with other segments or
point particles as a collection of N spheres of diameter sigma-prime,
evenly spaced along the line segment, so as to exactly cover its
length.</p>
<p>The LJ interaction between 2 spheres on different line segments of
types I,J is computed with an arithmetic mixing of the sigma values of
the 2 spheres and using the specified epsilon value for I,J atom
types. Note that because the sigma values for line segment spheres is
computed using only sigma_II values, specific to the line segment’s
type, this means that any specified sigma_IJ values (for I != J) are
effectively ignored.</p>
<p>For style <em>line/lj</em>, the following coefficients must be defined for
each pair of atoms types via the <aclass="reference internal"href="pair_coeff.html"><em>pair_coeff</em></a> command
as in the examples above, or in the data file or restart files read by
the <aclass="reference internal"href="read_data.html"><em>read_data</em></a> or <aclass="reference internal"href="read_restart.html"><em>read_restart</em></a>
commands:</p>
<ulclass="simple">
<li>epsilon (energy units)</li>
<li>sigma (distance units)</li>
<li>cutoff (distance units)</li>
</ul>
<p>The last coefficient is optional. If not specified, the global cutoff
is used.</p>
<hrclass="docutils"/>
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <aclass="reference internal"href="Section_accelerate.html"><em>Section_accelerate</em></a>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.</p>
<p>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <aclass="reference internal"href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <aclass="reference internal"href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <aclass="reference internal"href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.