lammps/doc/html/tutorial_drude.html

595 lines
45 KiB
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>&lt;no title&gt; &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>&lt;no title&gt;</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">
<p><strong>Overview of Drude induced dipoles</strong></p>
<p>Polarizable atoms acquire an induced electric dipole moment under the
action of an external electric field, for example the electric field
created by the surrounding particles. Drude oscillators represent
these dipoles by two fixed charges: the core (DC) and the Drude
particle (DP) bound by a harmonic potential. The Drude particle can be
thought of as the electron cloud whose center can be displaced from
the position of the the corresponding nucleus.</p>
<p>The sum of the masses of a core-Drude pair should be the mass of the
initial (unsplit) atom, <span class="math">\(m_C + m_D = m\)</span>. The sum of their charges
should be the charge of the initial (unsplit) atom, <span class="math">\(q_C + q_D = q\)</span>.
A harmonic potential between the core and Drude partners should be
present, with force constant <span class="math">\(k_D\)</span> and an equilibrium distance of
zero. The (half-)stiffness of the <a class="reference internal" href="bond_harmonic.html"><span class="doc">harmonic bond</span></a>
<span class="math">\(K_D = k_D/2\)</span> and the Drude charge <span class="math">\(q_D\)</span> are related to the atom
polarizability <span class="math">\(\alpha\)</span> by</p>
<div class="math">
\[\begin{equation} K_D = \frac 1 2\, \frac {q_D^2} \alpha\end{equation}\]</div>
<p>Ideally, the mass of the Drude particle should be small, and the
stiffness of the harmonic bond should be large, so that the Drude
particle remains close ot the core. The values of Drude mass, Drude
charge, and force constant can be chosen following different
strategies, as in the following examples of polarizable force
fields.</p>
<ul class="simple">
<li><a class="reference internal" href="#lamoureux"><span class="std std-ref">Lamoureux and Roux</span></a> suggest adopting a global
half-stiffness, <span class="math">\(K_D\)</span> = 500 kcal/(mol &amp;Aring;&lt;sup&gt;2&lt;/sup&gt;) &amp;mdash;
which corresponds to a force constant <span class="math">\(k_D\)</span> = 4184 kJ/(mol
&amp;Aring;&lt;sup&gt;2&lt;/sup&gt;) &amp;mdash; for all types of core-Drude bond, a
global mass <span class="math">\(m_D\)</span> = 0.4 g/mol (or u) for all types of Drude
particle, and to calculate the Drude charges for individual atom types
from the atom polarizabilities using equation (1). This choice is
followed in the polarizable CHARMM force field.</li>
<li><a class="reference internal" href="#schroeder"><span class="std std-ref">Schroeder and Steinhauser</span></a> suggest adopting a global
charge <span class="math">\(q_D\)</span> = -1.0e and a global mass <span class="math">\(m_D\)</span> = 0.1 g/mol (or u)
for all Drude particles, and to calculate the force constant for each
type of core-Drude bond from equation (1). The timesteps used by these
authors are between 0.5 and 2 fs, with the degrees of freedom of the
Drude oscillators kept cold at 1 K. In both these force fields
hydrogen atoms are treated as non-polarizable.</li>
</ul>
<p>The motion of of the Drude particles can be calculated by minimizing
the energy of the induced dipoles at each timestep, by an interative,
self-consistent procedure. The Drude particles can be massless and
therefore do not contribute to the kinetic energy. However, the
relaxed method is computationall slow. An extended-lagrangian method
can be used to calculate the positions of the Drude particles, but
this requires them to have mass. It is important in this case to
decouple the degrees of freedom associated with the Drude oscillators
from those of the normal atoms. Thermalizing the Drude dipoles at
temperatures comparable to the rest of the simulation leads to several
problems (kinetic energy transfer, very short timestep, etc.), which
can be remediated by the &#8220;cold Drude&#8221; technique (<a class="reference internal" href="#lamoureux"><span class="std std-ref">Lamoureux and Roux</span></a>).</p>
<p>Two closely related models are used to represent polarization through
&#8220;charges on a spring&#8221;: the core-shell model and the Drude
model. Although the basic idea is the same, the core-shell model is
normally used for ionic/crystalline materials, whereas the Drude model
is normally used for molecular systems and fluid states. In ionic
crystals the symmetry around each ion and the distance between them
are such that the core-shell model is sufficiently stable. But to be
applicable to molecular/covalent systems the Drude model includes two
important features:</p>
<ol class="arabic simple">
<li>The possibility to thermostat the additional degrees of freedom</li>
</ol>
<blockquote>
<div>associated with the induced dipoles at very low temperature, in terms
of the reduced coordinates of the Drude particles with respect to
their cores. This makes the trajectory close to that of relaxed
induced dipoles.</div></blockquote>
<ol class="arabic simple">
<li>The Drude dipoles on covalently bonded atoms interact too strongly
due to the short distances, so an atom may capture the Drude particle
(shell) of a neighbor, or the induced dipoles within the same molecule
may align too much. To avoid this, damping at short of the
interactions between the point charges composing the induced dipole
can be done by <a class="reference internal" href="#thole"><span class="std std-ref">Thole</span></a> functions.</li>
</ol>
<hr class="docutils" />
<p><strong>Preparation of the data file</strong></p>
<p>The data file is similar to a standard LAMMPS data file for
<em>atom_style full</em>. The DPs and the <em>harmonic bonds</em> connecting them
to their DC should appear in the data file as normal atoms and bonds.</p>
<p>You can use the <em>polarizer</em> tool (Python script distributed with the
USER-DRUDE package) to convert a non-polarizable data file (here
<em>data.102494.lmp</em>) to a polarizable data file (<em>data-p.lmp</em>)</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">polarizer</span> <span class="o">-</span><span class="n">q</span> <span class="o">-</span><span class="n">f</span> <span class="n">phenol</span><span class="o">.</span><span class="n">dff</span> <span class="n">data</span><span class="o">.</span><span class="mf">102494.</span><span class="n">lmp</span> <span class="n">data</span><span class="o">-</span><span class="n">p</span><span class="o">.</span><span class="n">lmp</span>
</pre></div>
</div>
<p>This will automatically insert the new atoms and bonds.
The masses and charges of DCs and DPs are computed
from <em>phenol.dff</em>, as well as the DC-DP bond constants. The file
<em>phenol.dff</em> contains the polarizabilities of the atom types
and the mass of the Drude particles, for instance:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># units: kJ/mol, A, deg</span>
<span class="c1"># kforce is in the form k/2 r_D^2</span>
<span class="c1"># type m_D/u q_D/e k_D alpha/A3 thole</span>
<span class="n">OH</span> <span class="mf">0.4</span> <span class="o">-</span><span class="mf">1.0</span> <span class="mf">4184.0</span> <span class="mf">0.63</span> <span class="mf">0.67</span>
<span class="n">CA</span> <span class="mf">0.4</span> <span class="o">-</span><span class="mf">1.0</span> <span class="mf">4184.0</span> <span class="mf">1.36</span> <span class="mf">2.51</span>
<span class="n">CAI</span> <span class="mf">0.4</span> <span class="o">-</span><span class="mf">1.0</span> <span class="mf">4184.0</span> <span class="mf">1.09</span> <span class="mf">2.51</span>
</pre></div>
</div>
<p>The hydrogen atoms are absent from this file, so they will be treated
as non-polarizable atoms. In the non-polarizable data file
<em>data.102494.lmp</em>, atom names corresponding to the atom type numbers
have to be specified as comments at the end of lines of the <em>Masses</em>
section. You probably need to edit it to add these names. It should
look like</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Masses</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="mi">1</span> <span class="mf">12.011</span> <span class="c1"># CAI</span>
<span class="mi">2</span> <span class="mf">12.011</span> <span class="c1"># CA</span>
<span class="mi">3</span> <span class="mf">15.999</span> <span class="c1"># OH</span>
<span class="mi">4</span> <span class="mf">1.008</span> <span class="c1"># HA</span>
<span class="mi">5</span> <span class="mf">1.008</span> <span class="c1"># HO</span>
</pre></div>
</div>
<hr class="docutils" />
<p><strong>Basic input file</strong></p>
<p>The atom style should be set to (or derive from) <em>full</em>, so that you
can define atomic charges and molecular bonds, angles, dihedrals...</p>
<p>The <em>polarizer</em> tool also outputs certain lines related to the input
script (the use of these lines will be explained below). In order for
LAMMPS to recognize that you are using Drude oscillators, you should
use the fix <em>drude</em>. The command is</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">DRUDE</span> <span class="nb">all</span> <span class="n">drude</span> <span class="n">C</span> <span class="n">C</span> <span class="n">C</span> <span class="n">N</span> <span class="n">N</span> <span class="n">D</span> <span class="n">D</span> <span class="n">D</span>
</pre></div>
</div>
<p>The N, C, D following the <em>drude</em> keyword have the following meaning:
There is one tag for each atom type. This tag is C for DCs, D for DPs
and N for non-polarizable atoms. Here the atom types 1 to 3 (C and O
atoms) are DC, atom types 4 and 5 (H atoms) are non-polarizable and
the atom types 6 to 8 are the newly created DPs.</p>
<p>By recognizing the fix <em>drude</em>, LAMMPS will find and store matching
DC-DP pairs and will treat DP as equivalent to their DC in the
<em>special bonds</em> relations. It may be necessary to extend the space
for storing such special relations. In this case extra space should
be reserved by using the <em>extra</em> keyword of the <em>special_bonds</em>
command. With our phenol, there is 1 more special neighbor for which
space is required. Otherwise LAMMPS crashes and gives the required
value.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">special_bonds</span> <span class="n">lj</span><span class="o">/</span><span class="n">coul</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="mf">0.5</span> <span class="n">extra</span> <span class="mi">1</span>
</pre></div>
</div>
<p>Let us assume we want to run a simple NVT simulation at 300 K. Note
that Drude oscillators need to be thermalized at a low temperature in
order to approximate a self-consistent field (SCF), therefore it is not
possible to simulate an NVE ensemble with this package. Since dipoles
are approximated by a charged DC-DP pair, the <em>pair_style</em> must
include Coulomb interactions, for instance <em>lj/cut/coul/long</em> with
<em>kspace_style pppm</em>. For example, with a cutoff of 10. and a precision
1.e-4:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">10.0</span>
<span class="n">kspace_style</span> <span class="n">pppm</span> <span class="mf">1.0e-4</span>
</pre></div>
</div>
<p>As compared to the non-polarizable input file, <em>pair_coeff</em> lines need
to be added for the DPs. Since the DPs have no Lennard-Jones
interactions, their <em>epsilon</em> is 0. so the only <em>pair_coeff</em> line
that needs to be added is</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_coeff</span> <span class="o">*</span> <span class="mi">6</span><span class="o">*</span> <span class="mf">0.0</span> <span class="mf">0.0</span> <span class="c1"># All-DPs</span>
</pre></div>
</div>
<p>Now for the thermalization, the simplest choice is to use the <a class="reference internal" href="fix_langevin_drude.html"><span class="doc">fix langevin/drude</span></a>.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">LANG</span> <span class="nb">all</span> <span class="n">langevin</span><span class="o">/</span><span class="n">drude</span> <span class="mf">300.</span> <span class="mi">100</span> <span class="mi">12435</span> <span class="mf">1.</span> <span class="mi">20</span> <span class="mi">13977</span>
</pre></div>
</div>
<p>This applies a Langevin thermostat at temperature 300. to the centers
of mass of the DC-DP pairs, with relaxation time 100 and with random
seed 12345. This fix applies also a Langevin thermostat at temperature
1. to the relative motion of the DPs around their DCs, with relaxation
time 20 and random seed 13977. Only the DCs and non-polarizable
atoms need to be in this fix&#8217;s group. LAMMPS will thermostate the DPs
together with their DC. For this, ghost atoms need to know their
velocities. Thus you need to add the following command:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">comm_modify</span> <span class="n">vel</span> <span class="n">yes</span>
</pre></div>
</div>
<p>In order to avoid that the center of mass of the whole system
drifts due to the random forces of the Langevin thermostat on DCs, you
can add the <em>zero yes</em> option at the end of the fix line.</p>
<p>If the fix <em>shake</em> is used to constrain the C-H bonds, it should be
invoked after the fix <em>langevin/drude</em> for more accuracy.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">SHAKE</span> <span class="n">ATOMS</span> <span class="n">shake</span> <span class="mf">0.0001</span> <span class="mi">20</span> <span class="mi">0</span> <span class="n">t</span> <span class="mi">4</span> <span class="mi">5</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The group of the fix <em>shake</em> must not include the DPs. If the
group <em>ATOMS</em> is defined by non-DPs atom types, you could use</p>
</div>
<p>Since the fix <em>langevin/drude</em> does not perform time integration (just
modification of forces but no position/velocity updates), the fix
<em>nve</em> should be used in conjunction.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">NVE</span> <span class="nb">all</span> <span class="n">nve</span>
</pre></div>
</div>
<p>Finally, do not forget to update the atom type elements if you use
them in a <em>dump_modify ... element ...</em> command, by adding the element
type of the DPs. Here for instance</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dump</span> <span class="n">DUMP</span> <span class="nb">all</span> <span class="n">custom</span> <span class="mi">10</span> <span class="n">dump</span><span class="o">.</span><span class="n">lammpstrj</span> <span class="nb">id</span> <span class="n">mol</span> <span class="nb">type</span> <span class="n">element</span> <span class="n">x</span> <span class="n">y</span> <span class="n">z</span> <span class="n">ix</span> <span class="n">iy</span> <span class="n">iz</span>
<span class="n">dump_modify</span> <span class="n">DUMP</span> <span class="n">element</span> <span class="n">C</span> <span class="n">C</span> <span class="n">O</span> <span class="n">H</span> <span class="n">H</span> <span class="n">D</span> <span class="n">D</span> <span class="n">D</span>
</pre></div>
</div>
<p>The input file should now be ready for use!</p>
<p>You will notice that the global temperature <em>thermo_temp</em> computed by
LAMMPS is not 300. K as wanted. This is because LAMMPS treats DPs as
standard atoms in his default compute. If you want to output the
temperatures of the DC-DP pair centers of mass and of the DPs relative
to their DCs, you should use the <a class="reference internal" href="compute_temp_drude.html"><span class="doc">compute temp_drude</span></a></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">TDRUDE</span> <span class="nb">all</span> <span class="n">temp</span><span class="o">/</span><span class="n">drude</span>
</pre></div>
</div>
<p>And then output the correct temperatures of the Drude oscillators
using <em>thermo_style custom</em> with respectively <em>c_TDRUDE[1]</em> and
<em>c_TDRUDE[2]</em>. These should be close to 300.0 and 1.0 on average.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">thermo_style</span> <span class="n">custom</span> <span class="n">step</span> <span class="n">temp</span> <span class="n">c_TDRUDE</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="n">c_TDRUDE</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
</pre></div>
</div>
<hr class="docutils" />
<p><strong>Thole screening</strong></p>
<p>Dipolar interactions represented by point charges on springs may not
be stable, for example if the atomic polarizability is too high for
instance, a DP can escape from its DC and be captured by another DC,
which makes the force and energy diverge and the simulation
crash. Even without reaching this extreme case, the correlation
between nearby dipoles on the same molecule may be exagerated. Often,
special bond relations prevent bonded neighboring atoms to see the
charge of each other&#8217;s DP, so that the problem does not always appear.
It is possible to use screened dipole dipole interactions by using the
<a class="reference internal" href="pair_thole.html"><span class="doc">*pair_style thole*</span></a>. This is implemented as a
correction to the Coulomb pair_styles, which dampens at short distance
the interactions between the charges representing the induced dipoles.
It is to be used as <em>hybrid/overlay</em> with any standard <em>coul</em> pair
style. In our example, we would use</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_style</span> <span class="n">hybrid</span><span class="o">/</span><span class="n">overlay</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">10.0</span> <span class="n">thole</span> <span class="mf">2.6</span> <span class="mf">10.0</span>
</pre></div>
</div>
<p>This tells LAMMPS that we are using two pair_styles. The first one is
as above (<em>lj/cut/coul/long 10.0</em>). The second one is a <em>thole</em>
pair_style with default screening factor 2.6 (<a class="reference internal" href="#noskov"><span class="std std-ref">Noskov</span></a>) and
cutoff 10.0.</p>
<p>Since <em>hybrid/overlay</em> does not support mixing rules, the interaction
coefficients of all the pairs of atom types with i &lt; j should be
explicitly defined. The output of the <em>polarizer</em> script can be used
to complete the <em>pair_coeff</em> section of the input file. In our
example, this will look like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0700</span> <span class="mf">3.550</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">2</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0700</span> <span class="mf">3.550</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">3</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.1091</span> <span class="mf">3.310</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">4</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0458</span> <span class="mf">2.985</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">2</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0700</span> <span class="mf">3.550</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">3</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.1091</span> <span class="mf">3.310</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">4</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0458</span> <span class="mf">2.985</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">3</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.1700</span> <span class="mf">3.070</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">4</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0714</span> <span class="mf">2.745</span>
<span class="n">pair_coeff</span> <span class="mi">4</span> <span class="mi">4</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0300</span> <span class="mf">2.420</span>
<span class="n">pair_coeff</span> <span class="o">*</span> <span class="mi">5</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0000</span> <span class="mf">0.000</span>
<span class="n">pair_coeff</span> <span class="o">*</span> <span class="mi">6</span><span class="o">*</span> <span class="n">lj</span><span class="o">/</span><span class="n">cut</span><span class="o">/</span><span class="n">coul</span><span class="o">/</span><span class="n">long</span> <span class="mf">0.0000</span> <span class="mf">0.000</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">1</span> <span class="n">thole</span> <span class="mf">1.090</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">2</span> <span class="n">thole</span> <span class="mf">1.218</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">3</span> <span class="n">thole</span> <span class="mf">0.829</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">6</span> <span class="n">thole</span> <span class="mf">1.090</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">7</span> <span class="n">thole</span> <span class="mf">1.218</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">1</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.829</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">2</span> <span class="n">thole</span> <span class="mf">1.360</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">3</span> <span class="n">thole</span> <span class="mf">0.926</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">6</span> <span class="n">thole</span> <span class="mf">1.218</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">7</span> <span class="n">thole</span> <span class="mf">1.360</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">2</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.926</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">3</span> <span class="n">thole</span> <span class="mf">0.630</span> <span class="mf">0.670</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">6</span> <span class="n">thole</span> <span class="mf">0.829</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">7</span> <span class="n">thole</span> <span class="mf">0.926</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">3</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.630</span> <span class="mf">0.670</span>
<span class="n">pair_coeff</span> <span class="mi">6</span> <span class="mi">6</span> <span class="n">thole</span> <span class="mf">1.090</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">6</span> <span class="mi">7</span> <span class="n">thole</span> <span class="mf">1.218</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">6</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.829</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">7</span> <span class="mi">7</span> <span class="n">thole</span> <span class="mf">1.360</span> <span class="mf">2.510</span>
<span class="n">pair_coeff</span> <span class="mi">7</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.926</span> <span class="mf">1.590</span>
<span class="n">pair_coeff</span> <span class="mi">8</span> <span class="mi">8</span> <span class="n">thole</span> <span class="mf">0.630</span> <span class="mf">0.670</span>
</pre></div>
</div>
<p>For the <em>thole</em> pair style the coefficients are</p>
<ol class="arabic simple">
<li>the atom polarizability in units of cubic length</li>
<li>the screening factor of the Thole function (optional, default value
specified by the pair_style command)</li>
</ol>
<ul class="simple">
<li>the cutoff (optional, default value defined by the pair_style command)</li>
</ul>
<p>The special neighbors have charge-charge and charge-dipole
interactions screened by the <em>coul</em> factors of the <em>special_bonds</em>
command (0.0, 0.0, and 0.5 in the example above). Without using the
pair_style <em>thole</em>, dipole-dipole interactions are screened by the
same factor. By using the pair_style <em>thole</em>, dipole-dipole
interactions are screened by Thole&#8217;s function, whatever their special
relationship (except within each DC-DP pair of course). Consider for
example 1-2 neighbors: using the pair_style <em>thole</em>, their dipoles
will see each other (despite the <em>coul</em> factor being 0.) and the
interactions between these dipoles will be damped by Thole&#8217;s function.</p>
<hr class="docutils" />
<p><strong>Thermostats and barostats</strong></p>
<p>Using a Nose-Hoover barostat with the <em>langevin/drude</em> thermostat is
straightforward using fix <em>nph</em> instead of <em>nve</em>. For example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">NPH</span> <span class="nb">all</span> <span class="n">nph</span> <span class="n">iso</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">500</span>
</pre></div>
</div>
<p>It is also possible to use a Nose-Hoover instead of a Langevin
thermostat. This requires to use <a class="reference internal" href="fix_drude_transform.html"><span class="doc">*fix drude/transform*</span></a> just before and after the
time intergation fixes. The <em>fix drude/transform/direct</em> converts the
atomic masses, positions, velocities and forces into a reduced
representation, where the DCs transform into the centers of mass of
the DC-DP pairs and the DPs transform into their relative position
with respect to their DC. The <em>fix drude/transform/inverse</em> performs
the reverse transformation. For a NVT simulation, with the DCs and
atoms at 300 K and the DPs at 1 K relative to their DC one would use</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">DIRECT</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">direct</span>
<span class="n">fix</span> <span class="n">NVT1</span> <span class="n">ATOMS</span> <span class="n">nvt</span> <span class="n">temp</span> <span class="mf">300.</span> <span class="mf">300.</span> <span class="mi">100</span>
<span class="n">fix</span> <span class="n">NVT2</span> <span class="n">DRUDES</span> <span class="n">nvt</span> <span class="n">temp</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">20</span>
<span class="n">fix</span> <span class="n">INVERSE</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">inverse</span>
</pre></div>
</div>
<p>For our phenol example, the groups would be defined as</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">group</span> <span class="n">ATOMS</span> <span class="nb">type</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="c1"># DCs and non-polarizable atoms</span>
<span class="n">group</span> <span class="n">CORES</span> <span class="nb">type</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="c1"># DCs</span>
<span class="n">group</span> <span class="n">DRUDES</span> <span class="nb">type</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="c1"># DPs</span>
</pre></div>
</div>
<p>Note that with the fixes <em>drude/transform</em>, it is not required to
specify <em>comm_modify vel yes</em> because the fixes do it anyway (several
times and for the forces also). To avoid the flying ice cube artifact
<a class="reference internal" href="#lamoureux"><span class="std std-ref">(Lamoureux)</span></a>, where the atoms progressively freeze and the
center of mass of the whole system drifts faster and faster, the <em>fix
momentum</em> can be used. For instance:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">MOMENTUM</span> <span class="nb">all</span> <span class="n">momentum</span> <span class="mi">100</span> <span class="n">linear</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">1</span>
</pre></div>
</div>
<p>It is a bit more tricky to run a NPT simulation with Nose-Hoover
barostat and thermostat. First, the volume should be integrated only
once. So the fix for DCs and atoms should be <em>npt</em> while the fix for
DPs should be <em>nvt</em> (or vice versa). Second, the <em>fix npt</em> computes a
global pressure and thus a global temperature whatever the fix group.
We do want the pressure to correspond to the whole system, but we want
the temperature to correspond to the fix group only. We must then use
the <em>fix_modify</em> command for this. In the end, the block of
instructions for thermostating and barostating will look like</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">TATOMS</span> <span class="n">ATOMS</span> <span class="n">temp</span>
<span class="n">fix</span> <span class="n">DIRECT</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">direct</span>
<span class="n">fix</span> <span class="n">NPT</span> <span class="n">ATOMS</span> <span class="n">npt</span> <span class="n">temp</span> <span class="mf">300.</span> <span class="mf">300.</span> <span class="mi">100</span> <span class="n">iso</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">500</span>
<span class="n">fix_modify</span> <span class="n">NPT</span> <span class="n">temp</span> <span class="n">TATOMS</span> <span class="n">press</span> <span class="n">thermo_press</span>
<span class="n">fix</span> <span class="n">NVT</span> <span class="n">DRUDES</span> <span class="n">nvt</span> <span class="n">temp</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">20</span>
<span class="n">fix</span> <span class="n">INVERSE</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">inverse</span>
</pre></div>
</div>
<hr class="docutils" />
<p><strong>Rigid bodies</strong></p>
<p>You may want to simulate molecules as rigid bodies (but polarizable).
Common cases are water models such as <a class="reference internal" href="#swm4-ndp"><span class="std std-ref">SWM4-NDP</span></a>, which is a
kind of polarizable TIP4P water. The rigid bodies and the DPs should
be integrated separately, even with the Langevin thermostat. Let us
review the different thermostats and ensemble combinations.</p>
<p>NVT ensemble using Langevin thermostat:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">comm_modify</span> <span class="n">vel</span> <span class="n">yes</span>
<span class="n">fix</span> <span class="n">LANG</span> <span class="nb">all</span> <span class="n">langevin</span><span class="o">/</span><span class="n">drude</span> <span class="mf">300.</span> <span class="mi">100</span> <span class="mi">12435</span> <span class="mf">1.</span> <span class="mi">20</span> <span class="mi">13977</span>
<span class="n">fix</span> <span class="n">RIGID</span> <span class="n">ATOMS</span> <span class="n">rigid</span><span class="o">/</span><span class="n">nve</span><span class="o">/</span><span class="n">small</span> <span class="n">molecule</span>
<span class="n">fix</span> <span class="n">NVE</span> <span class="n">DRUDES</span> <span class="n">nve</span>
</pre></div>
</div>
<p>NVT ensemble using Nose-Hoover thermostat:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fix</span> <span class="n">DIRECT</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">direct</span>
<span class="n">fix</span> <span class="n">RIGID</span> <span class="n">ATOMS</span> <span class="n">rigid</span><span class="o">/</span><span class="n">nvt</span><span class="o">/</span><span class="n">small</span> <span class="n">molecule</span> <span class="n">temp</span> <span class="mf">300.</span> <span class="mf">300.</span> <span class="mi">100</span>
<span class="n">fix</span> <span class="n">NVT</span> <span class="n">DRUDES</span> <span class="n">nvt</span> <span class="n">temp</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">20</span>
<span class="n">fix</span> <span class="n">INVERSE</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">inverse</span>
</pre></div>
</div>
<p>NPT ensemble with Langevin thermostat:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">comm_modify</span> <span class="n">vel</span> <span class="n">yes</span>
<span class="n">fix</span> <span class="n">LANG</span> <span class="nb">all</span> <span class="n">langevin</span><span class="o">/</span><span class="n">drude</span> <span class="mf">300.</span> <span class="mi">100</span> <span class="mi">12435</span> <span class="mf">1.</span> <span class="mi">20</span> <span class="mi">13977</span>
<span class="n">fix</span> <span class="n">RIGID</span> <span class="n">ATOMS</span> <span class="n">rigid</span><span class="o">/</span><span class="n">nph</span><span class="o">/</span><span class="n">small</span> <span class="n">molecule</span> <span class="n">iso</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">500</span>
<span class="n">fix</span> <span class="n">NVE</span> <span class="n">DRUDES</span> <span class="n">nve</span>
</pre></div>
</div>
<p>NPT ensemble using Nose-Hoover thermostat:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">compute</span> <span class="n">TATOM</span> <span class="n">ATOMS</span> <span class="n">temp</span>
<span class="n">fix</span> <span class="n">DIRECT</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">direct</span>
<span class="n">fix</span> <span class="n">RIGID</span> <span class="n">ATOMS</span> <span class="n">rigid</span><span class="o">/</span><span class="n">npt</span><span class="o">/</span><span class="n">small</span> <span class="n">molecule</span> <span class="n">temp</span> <span class="mf">300.</span> <span class="mf">300.</span> <span class="mi">100</span> <span class="n">iso</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">500</span>
<span class="n">fix_modify</span> <span class="n">RIGID</span> <span class="n">temp</span> <span class="n">TATOM</span> <span class="n">press</span> <span class="n">thermo_press</span>
<span class="n">fix</span> <span class="n">NVT</span> <span class="n">DRUDES</span> <span class="n">nvt</span> <span class="n">temp</span> <span class="mf">1.</span> <span class="mf">1.</span> <span class="mi">20</span>
<span class="n">fix</span> <span class="n">INVERSE</span> <span class="nb">all</span> <span class="n">drude</span><span class="o">/</span><span class="n">transform</span><span class="o">/</span><span class="n">inverse</span>
</pre></div>
</div>
<hr class="docutils" />
<p id="lamoureux"><strong>(Lamoureux)</strong> Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003)</p>
<p id="schroeder"><strong>(Schroeder)</strong> Schr&amp;ouml;der and Steinhauser, J Chem Phys, 133,
154511 (2010).</p>
<dl class="docutils" id="jiang">
<dt><strong>(Jiang)</strong> Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux,</dt>
<dd>J Phys Chem Lett, 2, 87-92 (2011).</dd>
</dl>
<p id="thole"><strong>(Thole)</strong> Chem Phys, 59, 341 (1981).</p>
<p id="noskov"><strong>(Noskov)</strong> Noskov, Lamoureux and Roux, J Phys Chem B, 109, 6705 (2005).</p>
<p id="swm4-ndp"><strong>(SWM4-NDP)</strong> Lamoureux, Harder, Vorobyov, Roux, MacKerell, Chem Phys
Let, 418, 245-249 (2006)</p>
</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>