Debian Codegraph @

doc/compute_rdf.html

raw
1
2
3 <!DOCTYPE html>
4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6 <head>
7 <meta charset="utf-8">
8
9 <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
11 <title>compute rdf command &mdash; LIGGGHTS v3.X documentation</title>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
30
31
32
33
34
35 <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/>
36
37
38 <script src="_static/js/modernizr.min.js"></script>
39
40 </head>
41
42 <body class="wy-body-for-nav" role="document">
43
44
45 <div class="wy-grid-for-nav">
46
47
48 <nav data-toggle="wy-nav-shift" class="wy-nav-side">
49 <div class="wy-side-scroll">
50 <div class="wy-side-nav-search">
51
52
53
54 <a href="Manual.html" class="icon icon-home"> LIGGGHTS
55
56
57
58 </a>
59
60
61
62
63 <div class="version">
64 v3.X
65 </div>
66
67
68
69
70 <div role="search">
71 <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
72 <input type="text" name="q" placeholder="Search docs" />
73 <input type="hidden" name="check_keywords" value="yes" />
74 <input type="hidden" name="area" value="default" />
75 </form>
76 </div>
77
78
79 </div>
80
81 <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
82
83
84
85
86
87
88 <ul>
89 <li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
90 <li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
91 <li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
92 <li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
93 <li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
94 <li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
95 <li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
96 <li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
97 <li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
98 <li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
99 <li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
100 </ul>
101
102
103
104 </div>
105 </div>
106 </nav>
107
108 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
109
110
111 <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
112
113 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
114 <a href="Manual.html">LIGGGHTS</a>
115
116 </nav>
117
118
119
120 <div class="wy-nav-content">
121 <div class="rst-content">
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138 <div role="navigation" aria-label="breadcrumbs navigation">
139
140 <ul class="wy-breadcrumbs">
141
142 <li><a href="Manual.html">Docs</a> &raquo;</li>
143
144 <li>compute rdf command</li>
145
146
147 <li class="wy-breadcrumbs-aside">
148
149
150 <a href="_sources/compute_rdf.txt" rel="nofollow"> View page source</a>
151
152 <a href="http://www.cfdem.com"> Website</a>
153
154 <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
155
156
157
158 </li>
159
160 </ul>
161
162
163 <hr/>
164
165 </div>
166 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
167 <div itemprop="articleBody">
168
169 <div class="section" id="compute-rdf-command">
170 <span id="index-0"></span><h1>compute rdf command<a class="headerlink" href="#compute-rdf-command" title="Permalink to this headline">¶</a></h1>
171 <div class="section" id="syntax">
172 <h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
173 <div class="highlight-python"><div class="highlight"><pre>compute ID group-ID rdf general_keyword general_values Nbin itype1 jtype1 itype2 jtype2 ...
174 </pre></div>
175 </div>
176 <ul class="simple">
177 <li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
178 <li>rdf = style name of this compute command</li>
179 <li>general_keywords general_values are documented in <a class="reference external" href="compute.html&quot;">compute</a></li>
180 <li>Nbin = number of RDF bins</li>
181 <li>itypeN = central atom type for Nth RDF histogram (see asterisk form below)</li>
182 <li>jtypeN = distribution atom type for Nth RDF histogram (see asterisk form below)</li>
183 </ul>
184 </div>
185 <div class="section" id="examples">
186 <h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
187 <div class="highlight-python"><div class="highlight"><pre>compute 1 all rdf 100
188 compute 1 all rdf 100 1 1
189 compute 1 all rdf 100 * 3
190 compute 1 fluid rdf 500 1 1 1 2 2 1 2 2
191 compute 1 fluid rdf 500 1*3 2 5 *10
192 </pre></div>
193 </div>
194 </div>
195 <div class="section" id="description">
196 <h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
197 <p>Define a computation that calculates the radial distribution function
198 (RDF), also called g(r), and the coordination number for a group of
199 particles. Both are calculated in histogram form by binning pairwise
200 distances into <em>Nbin</em> bins from 0.0 to the maximum force cutoff
201 defined by the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> command. The bins are of
202 uniform size in radial distance. Thus a single bin encompasses a thin
203 shell of distances in 3d and a thin ring of distances in 2d.</p>
204 <div class="admonition warning">
205 <p class="first admonition-title">Warning</p>
206 <p class="last">If you have a bonded system, then the settings of
207 <code class="xref doc docutils literal"><span class="pre">special_bonds</span></code> command can remove pairwise
208 interactions between atoms in the same bond, angle, or dihedral. This
209 is the default setting for the <code class="xref doc docutils literal"><span class="pre">special_bonds</span></code>
210 command, and means those pairwise interactions do not appear in the
211 neighbor list. Because this fix uses the neighbor list, it also means
212 those pairs will not be included in the RDF. One way to get around
213 this, is to write a dump file, and use the <code class="xref doc docutils literal"><span class="pre">rerun</span></code> command
214 to compute the RDF for snapshots in the dump file. The rerun script
215 can use a <code class="xref doc docutils literal"><span class="pre">special_bonds</span></code> command that includes all
216 pairs in the neighbor list.</p>
217 </div>
218 <p>The <em>itypeN</em> and <em>jtypeN</em> arguments are optional. These arguments
219 must come in pairs. If no pairs are listed, then a single histogram
220 is computed for g(r) between all atom types. If one or more pairs are
221 listed, then a separate histogram is generated for each
222 <em>itype</em>,*jtype* pair.</p>
223 <p>The <em>itypeN</em> and <em>jtypeN</em> settings can be specified in one of two
224 ways. An explicit numeric value can be used, as in the 4th example
225 above. Or a wild-card asterisk can be used to specify a range of atom
226 types. This takes the form &#8220;*&#8221; or &#8220;<em>n&#8221; or &#8220;n</em>&#8221; or &#8220;m*n&#8221;. If N = the
227 number of atom types, then an asterisk with no numeric values means
228 all types from 1 to N. A leading asterisk means all types from 1 to n
229 (inclusive). A trailing asterisk means all types from n to N
230 (inclusive). A middle asterisk means all types from m to n
231 (inclusive).</p>
232 <p>If both <em>itypeN</em> and <em>jtypeN</em> are single values, as in the 4th example
233 above, this means that a g(r) is computed where atoms of type <em>itypeN</em>
234 are the central atom, and atoms of type <em>jtypeN</em> are the distribution
235 atom. If either <em>itypeN</em> and <em>jtypeN</em> represent a range of values via
236 the wild-card asterisk, as in the 5th example above, this means that a
237 g(r) is computed where atoms of any of the range of types represented
238 by <em>itypeN</em> are the central atom, and atoms of any of the range of
239 types represented by <em>jtypeN</em> are the distribution atom.</p>
240 <p>Pairwise distances are generated by looping over a pairwise neighbor
241 list, just as they would be in a <a class="reference internal" href="pair_style.html"><em>pair_style</em></a>
242 computation. The distance between two atoms I and J is included in a
243 specific histogram if the following criteria are met:</p>
244 <ul class="simple">
245 <li>atoms I,J are both in the specified compute group</li>
246 <li>the distance between atoms I,J is less than the maximum force cutoff</li>
247 <li>the type of the I atom matches itypeN (one or a range of types)</li>
248 <li>the type of the J atom matches jtypeN (one or a range of types)</li>
249 </ul>
250 <p>It is OK if a particular pairwise distance is included in more than
251 one individual histogram, due to the way the <em>itypeN</em> and <em>jtypeN</em>
252 arguments are specified.</p>
253 <p>The g(r) value for a bin is calculated from the histogram count by
254 scaling it by the idealized number of how many counts there would be
255 if atoms of type <em>jtypeN</em> were uniformly distributed. Thus it
256 involves the count of <em>itypeN</em> atoms, the count of <em>jtypeN</em> atoms, the
257 volume of the entire simulation box, and the volume of the bin&#8217;s thin
258 shell in 3d (or the area of the bin&#8217;s thin ring in 2d).</p>
259 <p>A coordination number coord(r) is also calculated, which is the number
260 of atoms of type <em>jtypeN</em> within the current bin or closer, averaged
261 over atoms of type <em>itypeN</em>. This is calculated as the area- or
262 volume-weighted sum of g(r) values over all bins up to and including
263 the current bin, multiplied by the global average volume density of
264 atoms of type jtypeN.</p>
265 <p>The simplest way to output the results of the compute rdf calculation
266 to a file is to use the <a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a> command, for
267 example:</p>
268 <div class="highlight-python"><div class="highlight"><pre>compute myRDF all rdf 50
269 fix 1 all ave/time 100 1 100 c_myRDF file tmp.rdf mode vector
270 </pre></div>
271 </div>
272 </div>
273 <div class="section" id="output-info">
274 <h2>Output info<a class="headerlink" href="#output-info" title="Permalink to this headline">¶</a></h2>
275 <p>This compute calculates a global array with the number of rows =
276 <em>Nbins</em>, and the number of columns = 1 + 2*Npairs, where Npairs is the
277 number of I,J pairings specified. The first column has the bin
278 coordinate (center of the bin), Each successive set of 2 columns has
279 the g(r) and coord(r) values for a specific set of <em>itypeN</em> versus
280 <em>jtypeN</em> interactions, as described above. These values can be used
281 by any command that uses a global values from a compute as input. See
282 <span class="xref std std-ref">Section_howto 15</span> for an overview of
283 LIGGGHTS(R)-PUBLIC output options.</p>
284 <p>The array values calculated by this compute are all &#8220;intensive&#8221;.</p>
285 <p>The first column of array values will be in distance
286 <a class="reference internal" href="units.html"><em>units</em></a>. The g(r) columns of array values are normalized
287 numbers &gt;= 0.0. The coordination number columns of array values are
288 also numbers &gt;= 0.0.</p>
289 </div>
290 <div class="section" id="restrictions">
291 <h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
292 <p>The RDF is not computed for distances longer than the force cutoff,
293 since processors (in parallel) don&#8217;t know about atom coordinates for
294 atoms further away than that distance. If you want an RDF for larger
295 distances, you can use the <code class="xref doc docutils literal"><span class="pre">rerun</span></code> command to post-process
296 a dump file. The definition of g(r) used by LIGGGHTS(R)-PUBLIC is only appropriate
297 for characterizing atoms that are uniformly distributed throughout the
298 simulation cell. In such cases, the coordination number is still
299 correct and meaningful. As an example, if a large simulation cell
300 contains only one atom of type <em>itypeN</em> and one of <em>jtypeN</em>, then g(r)
301 will register an arbitrarily large spike at whatever distance they
302 happen to be at, and zero everywhere else. coord(r) will show a step
303 change from zero to one at the location of the spike in g(r).</p>
304 </div>
305 <div class="section" id="related-commands">
306 <h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
307 <p><a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a></p>
308 <p><strong>Default:</strong> none</p>
309 </div>
310 </div>
311
312
313 </div>
314 <div class="articleComments">
315
316 </div>
317 </div>
318 <footer>
319
320
321 <hr/>
322
323 <div role="contentinfo">
324 <p>
325 &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.
326
327 </p>
328 </div>
329 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>.
330
331 </footer>
332
333 </div>
334 </div>
335
336 </section>
337
338 </div>
339
340
341
342
343
344 <script type="text/javascript">
345 var DOCUMENTATION_OPTIONS = {
346 URL_ROOT:'./',
347 VERSION:'v3.X',
348 LANGUAGE:'None',
349 COLLAPSE_INDEX:false,
350 FILE_SUFFIX:'.html',
351 HAS_SOURCE: true,
352 SOURCELINK_SUFFIX: ''
353 };
354 </script>
355 <script type="text/javascript" src="_static/jquery.js"></script>
356 <script type="text/javascript" src="_static/underscore.js"></script>
357 <script type="text/javascript" src="_static/doctools.js"></script>
358
359
360
361
362
363 <script type="text/javascript" src="_static/js/theme.js"></script>
364
365
366
367
368 <script type="text/javascript">
369 jQuery(function () {
370 SphinxRtdTheme.StickyNav.enable();
371 });
372 </script>
373
374
375 </body>
376 </html>