Page MenuHomec4science

thermo_modify.html
No OneTemporary

File Metadata

Created
Mon, Jul 8, 16:11

thermo_modify.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>thermo_modify 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">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">thermo_modify command</a><ul>
<li><a class="reference internal" href="#syntax">Syntax</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#description">Description</a></li>
<li><a class="reference internal" href="#restrictions">Restrictions</a></li>
<li><a class="reference internal" href="#related-commands">Related commands</a></li>
<li><a class="reference internal" href="#default">Default</a></li>
</ul>
</li>
</ul>
</div>
</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>thermo_modify 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="thermo-modify-command">
<span id="index-0"></span><h1>thermo_modify command</h1>
<div class="section" id="syntax">
<h2>Syntax</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">thermo_modify</span> <span class="n">keyword</span> <span class="n">value</span> <span class="o">...</span>
</pre></div>
</div>
<ul class="simple">
<li>one or more keyword/value pairs may be listed</li>
</ul>
<pre class="literal-block">
keyword = <em>lost</em> or <em>lost/bond</em> or <em>norm</em> or <em>flush</em> or <em>line</em> or <em>format</em> or <em>temp</em> or <em>press</em>:l
<em>lost</em> value = <em>error</em> or <em>warn</em> or <em>ignore</em>
<em>lost/bond</em> value = <em>error</em> or <em>warn</em> or <em>ignore</em>
<em>norm</em> value = <em>yes</em> or <em>no</em>
<em>flush</em> value = <em>yes</em> or <em>no</em>
<em>line</em> value = <em>one</em> or <em>multi</em>
<em>format</em> values = <em>line</em> string, <em>int</em> string, <em>float</em> string, M string, or <em>none</em>
string = C-style format string
M = integer from 1 to N, where N = # of quantities being output
<em>temp</em> value = compute ID that calculates a temperature
<em>press</em> value = compute ID that calculates a pressure
</pre>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">thermo_modify</span> <span class="n">lost</span> <span class="n">ignore</span> <span class="n">flush</span> <span class="n">yes</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">myTemp</span> <span class="nb">format</span> <span class="mi">3</span> <span class="o">%</span><span class="mf">15.8</span><span class="n">g</span>
<span class="n">thermo_modify</span> <span class="n">temp</span> <span class="n">myTemp</span> <span class="nb">format</span> <span class="n">line</span> <span class="s2">&quot;</span><span class="si">%ld</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%g</span><span class="s2"> </span><span class="si">%15.8g</span><span class="s2">&quot;</span>
<span class="n">thermo_modify</span> <span class="n">line</span> <span class="n">multi</span> <span class="nb">format</span> <span class="nb">float</span> <span class="o">%</span><span class="n">g</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Set options for how thermodynamic information is computed and printed
by LAMMPS.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">These options apply to the currently defined thermo style. When
you specify a <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command, all
thermodynamic settings are restored to their default values, including
those previously reset by a thermo_modify command. Thus if your input
script specifies a thermo_style command, you should use the
thermo_modify command after it.</p>
</div>
<p>The <em>lost</em> keyword determines whether LAMMPS checks for lost atoms
each time it computes thermodynamics and what it does if atoms are
lost. An atom can be &#8220;lost&#8221; if it moves across a non-periodic
simulation box <a class="reference internal" href="boundary.html"><span class="doc">boundary</span></a> or if it moves more than a box
length outside the simulation domain (or more than a processor
sub-domain length) before reneighboring occurs. The latter case is
typically due to bad dynamics, e.g. too large a timestep or huge
forces and velocities. If the value is <em>ignore</em>, LAMMPS does not
check for lost atoms. If the value is <em>error</em> or <em>warn</em>, LAMMPS
checks and either issues an error or warning. The code will exit with
an error and continue with a warning. A warning will only be issued
once, the first time an atom is lost. This can be a useful debugging
option.</p>
<p>The <em>lost/bond</em> keyword determines whether LAMMPS throws an error or
not if an atom in a bonded interaction (bond, angle, etc) cannot be
found when it creates bonded neighbor lists. By default this is a
fatal error. However in some scenarios it may be desirable to only
issue a warning or ignore it and skip the computation of the missing
bond, angle, etc. An example would be when gas molecules in a vapor
are drifting out of the box through a fixed boundary condition (see
the <a class="reference internal" href="boundary.html"><span class="doc">boundary</span></a> command). In this case one atom may be
deleted before the rest of the molecule is, on a later timestep.</p>
<p>The <em>norm</em> keyword determines whether various thermodynamic output
values are normalized by the number of atoms or not, depending on
whether it is set to <em>yes</em> or <em>no</em>. Different unit styles have
different defaults for this setting (see below). Even if <em>norm</em> is
set to <em>yes</em>, a value is only normalized if it is an &#8220;extensive&#8221;
quantity, meaning that it scales with the number of atoms in the
system. For the thermo keywords described by the doc page for the
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command, all energy-related keywords
are extensive, such as <em>pe</em> or <em>ebond</em> or <em>enthalpy</em>. Other keywords
such as <em>temp</em> or <em>press</em> are &#8220;intensive&#8221; meaning their value is
independent (in a statistical sense) of the number of atoms in the
system and thus are never normalized. For thermodynamic output values
extracted from fixes and computes in a <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command, the doc page for the individual
<a class="reference internal" href="fix.html"><span class="doc">fix</span></a> or <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> lists whether the value is
&#8220;extensive&#8221; or &#8220;intensive&#8221; and thus whether it is normalized.
Thermodynamic output values calculated by a variable formula are
assumed to be &#8220;intensive&#8221; and thus are never normalized. You can
always include a divide by the number of atoms in the variable formula
if this is not the case.</p>
<p>The <em>flush</em> keyword invokes a flush operation after thermodynamic info
is written to the log file. This insures the output in that file is
current (no buffering by the OS), even if LAMMPS halts before the
simulation completes.</p>
<p>The <em>line</em> keyword determines whether thermodynamics will be output as
a series of numeric values on one line or in a multi-line format with
3 quantities with text strings per line and a dashed-line header
containing the timestep and CPU time. This modify option overrides
the <em>one</em> and <em>multi</em> thermo_style settings.</p>
<p>The <em>format</em> keyword can be used to change the default numeric format
of any of quantities the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command
outputs. All the specified format strings are C-style formats,
e.g. as used by the C/C++ printf() command. The <em>line</em> keyword takes
a single argument which is the format string for the entire line of
thermo output, with N fields, which you must enclose in quotes if it
is more than one field. The <em>int</em> and <em>float</em> keywords take a single
format argument and are applied to all integer or floating-point
quantities output. The setting for <em>M string</em> also takes a single
format argument which is used for the Mth value output in each line,
e.g. the 5th column is output in high precision for &#8220;format 5
%20.15g&#8221;.</p>
<p>The <em>format</em> keyword can be used multiple times. The precedence is
that for each value in a line of output, the <em>M</em> format (if specified)
is used, else the <em>int</em> or <em>float</em> setting (if specified) is used,
else the <em>line</em> setting (if specified) for that value is used, else
the default setting is used. A setting of <em>none</em> clears all previous
settings, reverting all values to their default format.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The thermo output values <em>step</em> and <em>atoms</em> are stored
internally as 8-byte signed integers, rather than the usual 4-byte
signed integers. When specifying the <em>format int</em> option you can use
a &#8220;%d&#8221;-style format identifier in the format string and LAMMPS will
convert this to the corresponding 8-byte form when it is applied to
those keywords. However, when specifying the <em>line</em> option or <em>format
M string</em> option for <em>step</em> and <em>natoms</em>, you should specify a format
string appropriate for an 8-byte signed integer, e.g. one with &#8220;%ld&#8221;.</p>
</div>
<p>The <em>temp</em> keyword is used to determine how thermodynamic temperature
is calculated, which is used by all thermo quantities that require a
temperature (&#8220;temp&#8221;, &#8220;press&#8221;, &#8220;ke&#8221;, &#8220;etotal&#8221;, &#8220;enthalpy&#8221;, &#8220;pxx&#8221;, etc).
The specified compute ID must have been previously defined by the user
via the <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command and it must be a style of
compute that calculates a temperature. As described in the
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command, thermo output uses a default
compute for temperature with ID = <em>thermo_temp</em>. This option allows
the user to override the default.</p>
<p>The <em>press</em> keyword is used to determine how thermodynamic pressure is
calculated, which is used by all thermo quantities that require a
pressure (&#8220;press&#8221;, &#8220;enthalpy&#8221;, &#8220;pxx&#8221;, etc). The specified compute ID
must have been previously defined by the user via the
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command and it must be a style of compute that
calculates a pressure. As described in the
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command, thermo output uses a default
compute for pressure with ID = <em>thermo_press</em>. This option allows the
user to override the default.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If both the <em>temp</em> and <em>press</em> keywords are used in a single
thermo_modify command (or in two separate commands), then the order in
which the keywords are specified is important. Note that a <a class="reference internal" href="compute_pressure.html"><span class="doc">pressure compute</span></a> defines its own temperature compute as
an argument when it is specified. The <em>temp</em> keyword will override
this (for the pressure compute being used by thermodynamics), but only
if the <em>temp</em> keyword comes after the <em>press</em> keyword. If the <em>temp</em>
keyword comes before the <em>press</em> keyword, then the new pressure
compute specified by the <em>press</em> keyword will be unaffected by the
<em>temp</em> setting.</p>
</div>
</div>
<div class="section" id="restrictions">
<h2>Restrictions</h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands</h2>
<p><a class="reference internal" href="thermo.html"><span class="doc">thermo</span></a>, <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a></p>
</div>
<div class="section" id="default">
<h2>Default</h2>
<p>The option defaults are lost = error, norm = yes for unit style of
<em>lj</em>, norm = no for unit style of <em>real</em> and <em>metal</em>, flush = no,
and temp/press = compute IDs defined by thermo_style.</p>
<p>The defaults for the line and format options depend on the thermo
style. For styles &#8220;one&#8221; and &#8220;custom&#8221;, the line and format defaults
are &#8220;one&#8221;, &#8220;%8d&#8221;, and &#8220;%12.8g&#8221;. For style &#8220;multi&#8221;, the line and
format defaults are &#8220;multi&#8221;, &#8220;%8d&#8221;, and &#8220;%14.4f&#8221;.</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