<spanid="index-0"></span><h1>fix ave/correlate/long command<aclass="headerlink"href="#fix-ave-correlate-long-command"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="syntax">
<h2>Syntax<aclass="headerlink"href="#syntax"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
v_name = global value calculated by an equal-style variable with name
</pre></div>
</div>
<ulclass="simple">
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>type</em> or <em>start</em> or <em>file</em> or <em>overwrite</em> or <em>title1</em> or <em>title2</em> or <em>ncorr</em> or <em>p</em> or <em>m</em></li>
</ul>
<preclass="literal-block">
<em>type</em> arg = <em>auto</em> or <em>upper</em> or <em>lower</em> or <em>auto/upper</em> or <em>auto/lower</em> or <em>full</em>
auto = correlate each value with itself
upper = correlate each value with each succeeding value
lower = correlate each value with each preceding value
auto/upper = auto + upper
auto/lower = auto + lower
full = correlate each value with every other value, including itself = auto + upper + lower
<em>start</em> args = Nstart
Nstart = start accumulating correlations on this timestep
<em>file</em> arg = filename
filename = name of file to output correlation data to
<em>overwrite</em> arg = none = overwrite output file with only latest output
<em>title1</em> arg = string
string = text to print as 1st line of output file
<em>title2</em> arg = string
string = text to print as 2nd line of output file
<em>ncorr</em> arg = Ncorrelators
Ncorrelators = number of correlators to store
<em>nlen</em> args = Nlen
Nlen = length of each correlator
<em>ncount</em> args = Ncount
Ncount = number of values over which succesive correlators are averaged
</pre>
</div>
<divclass="section"id="examples">
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>fix 1 all ave/correlate/long 5 1000 c_myTemp file temp.correlate
fix 1 all ave/correlate/long 1 10000 &
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
type upper title1 "My correlation data" nlen 15 ncount 3
</pre></div>
</div>
</div>
<divclass="section"id="description">
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>This fix is similar in spirit and syntax to the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a>. However, this fix allows the
efficient calculation of time correlation functions on the fly over
extremely long time windows without too much CPU overhead, using a
multiple-tau method <aclass="reference internal"href="#ramirez"><span>(Ramirez)</span></a> that decreases the resolution
of the stored correlation function with time.</p>
<p>The group specified with this command is ignored. However, note that
specified values may represent calculations performed by computes and
fixes which store their own “group” definitions.</p>
<p>Each listed value can be the result of a compute or fix or the
evaluation of an equal-style variable. See the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a> doc page for details.</p>
<p>The <em>Nevery</em> and <em>Nfreq</em> arguments specify on what timesteps the input
values will be used to calculate correlation data, and the frequency
with which the time correlation functions will be output to a file.
Note that there is no <em>Nrepeat</em> argument, unlike the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a> command.</p>
<p>The optional keywords <em>ncorr</em>, <em>nlen</em>, and <em>ncount</em> are unique to this
command and determine the number of correlation points calculated and
the memory and CPU overhead used by this calculation. <em>Nlen</em> and
<em>ncount</em> determine the amount of averaging done at longer correlation
times. The default values <em>nlen=16</em>, <em>ncount=2</em> ensure that the
systematic error of the multiple-tau correlator is always below the
level of the statistical error of a typical simulation (which depends
on the ensemble size and the simulation length).</p>
<p>The maximum correlation time (in time steps) that can be reached is
given by the formula (nlen-1) * ncount^(ncorr-1). Longer correlation
times are discarded and not calculated. With the default values of
the parameters (ncorr=20, nlen=16 and ncount=2), this corresponds to
7864320 time steps. If longer correlation times are needed, the value
of ncorr should be increased. Using nlen=16 and ncount=2, with
ncorr=30, the maximum number of steps that can be correlated is
80530636808. If ncorr=40, correlation times in excess of 8e12 time
steps can be calculated.</p>
<p>The total memory needed for each correlation pair is roughly
4*ncorr*nlen*8 bytes. With the default values of the parameters, this
corresponds to about 10 KB.</p>
<p>For the meaning of the additional optional keywords, see the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a> doc page.</p>
<h2>Restart, fix_modify, output, run start/stop, minimize info<aclass="headerlink"href="#restart-fix-modify-output-run-start-stop-minimize-info"title="Permalink to this headline">¶</a></h2>
<p>Since this fix in intended for the calculation of time correlation
functions over very long MD simulations, the information about this
fix is written automatically to binary restart files, so that the time
correlation calculation can continue in subsequent simulations. None
of the fix_modify options are relevant to this fix.</p>
<p>No parameter of this fix can be used with the start/stop keywords of
the run command. This fix is not invoked during energy minimization.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This compute is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<divclass="section"id="related-commands">
<h2>Related commands<aclass="headerlink"href="#related-commands"title="Permalink to this headline">¶</a></h2>
<p>The option defaults for keywords that are also keywords for the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a> command are as follows: type =
auto, start = 0, no file output, title 1,2 = strings as described on
the <aclass="reference internal"href="fix_ave_correlate.html"><em>fix ave/correlate</em></a> doc page.</p>
<p>The option defaults for keywords unique to this command are as
follows: ncorr=20, nlen=16, ncount=2.</p>
<hrclass="docutils"/>
<pid="ramirez"><strong>(Ramirez)</strong> J. Ramirez, S.K. Sukumaran, B. Vorselaars and
A.E. Likhtman, J. Chem. Phys. 133, 154103 (2010).</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>.