<li><p class="first">ID, group-ID are documented in <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> command</p>
</li>
<li><p class="first">saed/vtk = style name of this fix command</p>
</li>
<li><p class="first">Nevery = use input values every this many timesteps</p>
</li>
<li><p class="first">Nrepeat = # of times to use input values for calculating averages</p>
</li>
<li><p class="first">Nfreq = calculate averages every this many timesteps</p>
</li>
<li><p class="first">c_ID = saed compute ID</p>
<pre class="literal-block">
keyword = <em>file</em> or <em>ave</em> or <em>start</em> or <em>file</em> or <em>overwrite</em>:l
<em>ave</em> args = <em>one</em> or <em>running</em> or <em>window M</em>
one = output a new average value every Nfreq steps
running = output cumulative average of all previous Nfreq steps
window M = output average of M most recent Nfreq steps
<em>start</em> args = Nstart
Nstart = start averaging on this timestep
<em>file</em> arg = filename
filename = name of file to output time averages to
<em>overwrite</em> arg = none = overwrite output file with only latest output
</pre>
</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<pre class="literal-block">
compute 1 all saed 0.0251 Al O Kmax 1.70 Zone 0 0 1 dR_Ewald 0.01 c 0.5 0.5 0.5
compute 2 all saed 0.0251 Ni Kmax 1.70 Zone 0 0 0 c 0.05 0.05 0.05 manual echo
</pre>
<pre class="literal-block">
fix saed/vtk 1 1 1 c_1 file Al2O3_001.saed
fix saed/vtk 1 1 1 c_2 file Ni_000.saed
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Time average computed intensities from <a class="reference internal" href="compute_saed.html"><span class="doc">compute saed</span></a> and
write output to a file in the 3rd generation vtk image data format for
visualization directly in parallelized visualization software packages
like ParaView and VisIt. Note that if no time averaging is done, this
command can be used as a convenient way to simply output diffraction
intensities at a single snapshot.</p>
<p>To produce output in the image data vtk format ghost data is added
outside the <em>Kmax</em> range assigned in the compute saed. The ghost data is
assigned a value of -1 and can be removed setting a minimum isovolume
of 0 within the vizualiziton software. SAED images can be created by
visualizing a spherical slice of the data that is centered at
R_Ewald*[h k l]/norm([h k l]), where R_Ewald=1/lambda.</p>
<p>The group specified within this command is ignored. However, note that
specified values may represent calculations performed by saed computes
which store their own “group” definitions.</p>
<p>Fix saed/vtk is designed to work only with <a class="reference internal" href="compute_saed.html"><span class="doc">compute saed</span></a>
values, e.g.</p>
<pre class="literal-block">
compute 3 top saed 0.0251 Al O
fix saed/vtk 1 1 1 c_3 file Al2O3_001.saed
</pre>
<hr class="docutils" />
<p>The <em>Nevery</em>, <em>Nrepeat</em>, and <em>Nfreq</em> arguments specify on what
timesteps the input values will be used in order to contribute to the
average. The final averaged quantities are generated on timesteps
that are a multiple of <em>Nfreq</em>. The average is over <em>Nrepeat</em>
quantities, computed in the preceding portion of the simulation every
<em>Nevery</em> timesteps. <em>Nfreq</em> must be a multiple of <em>Nevery</em> and
<em>Nevery</em> must be non-zero even if <em>Nrepeat</em> is 1.
Also, the timesteps
contributing to the average value cannot overlap,
i.e. Nrepeat*Nevery can not exceed Nfreq.</p>
<p>For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on
timesteps 90,92,94,96,98,100 will be used to compute the final average
on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on
timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time
averaging is done; values are simply generated on timesteps
100,200,etc.</p>
<hr class="docutils" />
<p>The output for fix ave/time/saed is a file writen with the 3rd generation
vtk image data formatting. The filename assigned by the <em>file</em> keyword is
appended with _N.vtk where N is an index (0,1,2...) to account for multiple
diffraction intensity outputs.</p>
<p>By default the header contains the following information (with example data):</p>
<pre class="literal-block">
# vtk DataFile Version 3.0 c_SAED
Image data set
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 337 219 209
ASPECT_RATIO 0.00507953 0.00785161 0.00821458
ORIGIN -0.853361 -0.855826 -0.854316
POINT_DATA 15424827
SCALARS intensity float
LOOKUP_TABLE default
...data
</pre>
<p>In this example, kspace is sampled across a 337 x 219 x 209 point mesh
where the mesh spacing is approximately 0.005, 0.007, and 0.008
inv(length) units in the k1, k2, and k3 directions, respectively.
The data is shifted by -0.85, -0.85, -0.85 inv(length) units so that
the origin will lie at 0, 0, 0. Here, 15,424,827 kspace points are
sampled in total.</p>
<hr class="docutils" />
<p>Additional optional keywords also affect the operation of this fix.</p>
<p>The <em>ave</em> keyword determines how the values produced every <em>Nfreq</em>
steps are averaged with values produced on previous steps that were
multiples of <em>Nfreq</em>, before they are accessed by another output
command or written to a file.</p>
<p>If the <em>ave</em> setting is <em>one</em>, then the values produced on timesteps
that are multiples of <em>Nfreq</em> are independent of each other; they are
output as-is without further averaging.</p>
<p>If the <em>ave</em> setting is <em>running</em>, then the values produced on
timesteps that are multiples of <em>Nfreq</em> are summed and averaged in a
cumulative sense before being output. Each output value is thus the
average of the value produced on that timestep with all preceding
values. This running average begins when the fix is defined; it can
only be restarted by deleting the fix via the <a class="reference internal" href="unfix.html"><span class="doc">unfix</span></a>
command, or by re-defining the fix by re-specifying it.</p>
<p>If the <em>ave</em> setting is <em>window</em>, then the values produced on
timesteps that are multiples of <em>Nfreq</em> are summed and averaged within
a moving “window” of time, so that the last M values are used to
produce the output. E.g. if M = 3 and Nfreq = 1000, then the output
on step 10000 will be the average of the individual values on steps
8000,9000,10000. Outputs on early steps will average over less than M
values if they are not available.</p>
<p>The <em>start</em> keyword specifies what timestep averaging will begin on.
The default is step 0. Often input values can be 0.0 at time 0, so
setting <em>start</em> to a larger value can avoid including a 0.0 in a
running or windowed average.</p>
<p>The <em>file</em> keyword allows a filename to be specified. Every <em>Nfreq</em>
steps, the vector of saed intensity data is written to a new file using
the 3rd generation vtk format. The base of each file is assigned by
the <em>file</em> keyword and this string is appended with _N.vtk where N is
an index (0,1,2...) to account for situations with multiple diffraction
intensity outputs.</p>
<p>The <em>overwrite</em> keyword will continuously overwrite the output file
with the latest output, so that it only contains one timestep worth of
output. This option can only be used with the <em>ave running</em> setting.</p>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><span class="doc">binary restart files</span></a>. None of the <a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> options
are relevant to this fix.</p>
<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"><span class="doc">run</span></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><span class="doc">energy minimization</span></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<p>The attributes for fix_saed_vtk must match the values assigned in the
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>.