Repository navigation
Expand file tree
/
Copy pathespressopp.analysis.RDFatomistic.html
More file actions
237 lines (213 loc) · 22.4 KB
/
Copy pathespressopp.analysis.RDFatomistic.html
File metadata and controls
237 lines (213 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>espressopp.analysis.RDFatomistic — ESPResSo++ vlatest</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
<link rel="shortcut icon" href="_static/favicon_blue.ico"/>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=c6e86fd7"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="espressopp.analysis.StaticStructF" href="espressopp.analysis.StaticStructF.html" />
<link rel="prev" title="espressopp.analysis.RadialDistrF" href="espressopp.analysis.RadialDistrF.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
ESPResSo++
<img src="_static/logo_theory_group.png" class="logo" alt="Logo"/>
</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" aria-label="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="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="classdescription.html">User Interface</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="analysis.html">analysis</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.AllParticlePos.html">espressopp.analysis.AllParticlePos</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.AnalysisBase.html">espressopp.analysis.AnalysisBase</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.Autocorrelation.html">espressopp.analysis.Autocorrelation</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.CMVelocity.html">espressopp.analysis.CMVelocity</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.ConfigsParticleDecomp.html">espressopp.analysis.ConfigsParticleDecomp</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.Configurations.html">espressopp.analysis.Configurations</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.ConfigurationsExt.html">espressopp.analysis.ConfigurationsExt</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.Energy.html">espressopp.analysis.Energy</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.IntraChainDistSq.html">espressopp.analysis.IntraChainDistSq</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.MeanSquareDispl.html">espressopp.analysis.MeanSquareDispl</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.MeanSquareInternalDist.html">espressopp.analysis.MeanSquareInternalDist</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.NPartSubregion.html">espressopp.analysis.NPartSubregion</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.NPartSubregion.html#espressopp.analysis.NPartSubregion.NPartSubregionLocal"><code class="docutils literal notranslate"><span class="pre">NPartSubregionLocal</span></code></a></li>
<li class="toctree-l3 current"><a class="reference internal" href="espressopp.analysis.Observable.html">espressopp.analysis.Observable</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.AdressDensity.html">espressopp.analysis.AdressDensity</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.CenterOfMass.html">espressopp.analysis.CenterOfMass</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.MaxPID.html">espressopp.analysis.MaxPID</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.NeighborFluctuation.html">espressopp.analysis.NeighborFluctuation</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.NPart.html">espressopp.analysis.NPart</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.PotentialEnergy.html">espressopp.analysis.PotentialEnergy</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.Pressure.html">espressopp.analysis.Pressure</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.RadialDistrF.html">espressopp.analysis.RadialDistrF</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">espressopp.analysis.RDFatomistic</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.StaticStructF.html">espressopp.analysis.StaticStructF</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.XDensity.html">espressopp.analysis.XDensity</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.XPressure.html">espressopp.analysis.XPressure</a></li>
<li class="toctree-l4"><a class="reference internal" href="espressopp.analysis.XTemperature.html">espressopp.analysis.XTemperature</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.RadGyrXProfilePI.html">espressopp.analysis.RadGyrXProfilePI</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.RadGyrXProfilePI.html#espressopp.analysis.RadGyrXProfilePI.RadGyrXProfilePILocal"><code class="docutils literal notranslate"><span class="pre">RadGyrXProfilePILocal</span></code></a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">espressopp.analysis.RDFatomistic</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.SubregionTracking.html">espressopp.analysis.SubregionTracking</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.SubregionTracking.html#espressopp.analysis.SubregionTracking.SubregionTrackingLocal"><code class="docutils literal notranslate"><span class="pre">SubregionTrackingLocal</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.SystemMonitor.html">espressopp.analysis.SystemMonitor</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.Velocities.html">espressopp.analysis.Velocities</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.VelocityAutocorrelation.html">espressopp.analysis.VelocityAutocorrelation</a></li>
<li class="toctree-l3"><a class="reference internal" href="espressopp.analysis.Viscosity.html">espressopp.analysis.Viscosity</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bc.html">bc</a></li>
<li class="toctree-l2"><a class="reference internal" href="check.html">check</a></li>
<li class="toctree-l2"><a class="reference internal" href="esutil.html">esutil</a></li>
<li class="toctree-l2"><a class="reference internal" href="external.html">external</a></li>
<li class="toctree-l2"><a class="reference internal" href="integrator.html">integrator</a></li>
<li class="toctree-l2"><a class="reference internal" href="interaction.html">interaction</a></li>
<li class="toctree-l2"><a class="reference internal" href="io.html">io</a></li>
<li class="toctree-l2"><a class="reference internal" href="espressopp.html">espressopp</a></li>
<li class="toctree-l2"><a class="reference internal" href="standard_system.html">standard_system</a></li>
<li class="toctree-l2"><a class="reference internal" href="storage.html">storage</a></li>
<li class="toctree-l2"><a class="reference internal" href="tools.html">tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="logging.html">Logging mechanism</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pdf.html">PDF Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">ESPResSo++</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="classdescription.html">User Interface</a></li>
<li class="breadcrumb-item"><a href="analysis.html">analysis</a></li>
<li class="breadcrumb-item"><a href="espressopp.analysis.Observable.html">espressopp.analysis.Observable</a></li>
<li class="breadcrumb-item active">espressopp.analysis.RDFatomistic</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/espressopp.analysis.RDFatomistic.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="espressopp-analysis-rdfatomistic">
<span id="module-espressopp.analysis.RDFatomistic"></span><h1>espressopp.analysis.RDFatomistic<a class="headerlink" href="#espressopp-analysis-rdfatomistic" title="Link to this heading"></a></h1>
<p>Class to compute radial distribution functions in adaptive resolution simulations in subregions of the box. Can be used for regular atomistic/coarse-grained (AT/CG) adaptive resolution simulations as well as path integral-based adaptive resolution simulations. The two functions (compute, computePathIntegral) exhibit different behavior.</p>
<p>The regular compute function is used for regular AT/CG simulations and there are two options:</p>
<p>Option 1 (spanbased = True): the RDF can be calculated in a cuboid region in the center of the box (periodic in y,z, limited in x). In this case, particle pairs are considered for which at least one of them is in the defined cuboid region. This can be useful when the high resolution region has a slab geometry. No further normalization should be required.</p>
<p>Option 2 (spanbased = False): the routine can also calculate unnormalized RDFs using particle pairs with both particles being in the high resolution region (based on the resolution value lambda, the span parameter is not used then). This can be useful when atomistic region has complicated or spherical geometries.</p>
<p>In any case, only pairs of atomistic particles belonging to two different coarse-grained particles are considered. Furthermore, note that the routine uses L_y / half (L_y is the box length in y-direction) as the maximum distance for the RDF calculation, which is then binned according to rdfN during the computation. Hence, L_y should be the shortest box side (or, equally short as L_x and/or L_z).</p>
<p>The computePathIntegral function is used for path integral-based adaptive resolution functions. It calculates the radial distribution functions over pairs of particles between different atoms or coarse-grained beads. Note, however, that in these types of quantum/classical adaptive resolution simulations, regular coarse-grained espressopp particles are associated with each atom and the additional “AdResS” atomistic particles correspond to the different Trotter beads. This means that the routine will, for molecules consisting of multiple atoms, calculate intramolecular rdfs, averaging over the Trotter bead pairs of the ring polymers, which represent the atoms. In doing so, it considers only particles pair with matching Trotter number and with the correct atomistic types. The results are averaged over all Trotter beads. Also in this case L_y / half (L_y is the box length in y-direction) is used as the maximum distance for the RDF calculation, which is then binned according to rdfN during the computation. Furthermore, the calculation is always “spanbased” in x direction (the function ignores the spanbased flag), but in such a fashion that BOTH particles need to be in the defined cuboid region. Normalization is performed as derived in R. Potestio et al., Phys. Rev. Lett. 111, 060601 (2013), Supp. Info. This means that, considering only particles with matching Trotter numbers, the computePathIntegral function calculates the RDF between particles of type A and B within a region bounded in x-direction by <span class="math notranslate nohighlight">\(X_{min}\)</span> and <span class="math notranslate nohighlight">\(X_{max}\)</span> as</p>
<div class="math notranslate nohighlight">
\[ \begin{align}\begin{aligned}g_{slab}^{ab}(r^{AB}) = \sum_{a \in N^A} \sum_{b \in N^B} \frac{1}{ N^A N^B} \frac{\delta_\Delta(|\mathbf{r}_a - \mathbf{r}_b| - r)}{v(\mathbf{r}_a)/V_{slab}}\\\begin{split}\delta_\Delta(r) = \begin{cases} 1 \quad \textrm{for} \quad r<\Delta \\ 0 \quad \textrm{otherwise} \end{cases}\end{split}\\v(\mathbf{r}_a)=2\pi\Delta \; r_a(2r_a-h(\mathbf{r}_a))\\h(\mathbf{r}_a) = (r_a - X^+)\theta(r_a - X^+) - (r_a - X^-)\theta(r_a - X^-)\\X^+ = X_{max} -x_a\\X^- = x_a - X_{min}\\\begin{split}\theta(r) = \begin{cases} 1 \quad \textrm{for} \quad r>0 \\ 0 \quad \textrm{otherwise} \end{cases}\end{split}\end{aligned}\end{align} \]</div>
<p>where <span class="math notranslate nohighlight">\(N^A\)</span> and <span class="math notranslate nohighlight">\(N^B\)</span> are the number of particles of type A and B in the relevant subregion for the RDF calculation and <span class="math notranslate nohighlight">\(V_{slab}\)</span> is the total volume of this subregion. Furthermore, <span class="math notranslate nohighlight">\(r_a\)</span> denotes the radius of the spherical shell for the RDF calculation around particle <span class="math notranslate nohighlight">\(a\)</span>, <span class="math notranslate nohighlight">\(\Delta\)</span> is the thickness of the shell, and <span class="math notranslate nohighlight">\(x_a\)</span> is the <span class="math notranslate nohighlight">\(x\)</span> coordinate of particle <span class="math notranslate nohighlight">\(a\)</span>. The final result is an average over all imaginary time slices (Trotter numbers).</p>
<p>Examples:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">rdf_0_1</span> <span class="o">=</span> <span class="n">espressopp</span><span class="o">.</span><span class="n">analysis</span><span class="o">.</span><span class="n">RDFatomistic</span><span class="p">(</span><span class="n">system</span> <span class="o">=</span> <span class="n">system</span><span class="p">,</span> <span class="n">type1</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">type2</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">spanbased</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">span</span> <span class="o">=</span> <span class="mf">1.5</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># creates the class for calculating the RDF between atomistic particles of type 1 and 0 between different molecules,</span>
<span class="gp">>>> </span><span class="c1"># At least one of these particles has to be within plus/minus 1.5 from the center of the box in x-direction</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">rdf_0_1</span><span class="o">.</span><span class="n">compute</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span>
<span class="gp">>>> </span><span class="c1"># computes the rdf using 100 bins over a distance corresponding to L_y / 2.0</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic">
<span class="sig-prename descclassname"><span class="pre">espressopp.analysis.</span></span><span class="sig-name descname"><span class="pre">RDFatomistic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">system</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spanbased</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">span</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic" title="Link to this definition"></a></dt>
<dd><p>Constructs the RDFatomistic object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<em>std::shared_ptr<System></em>) – system object</p></li>
<li><p><strong>type1</strong> (<em>int</em>) – type of atom 1</p></li>
<li><p><strong>type2</strong> (<em>int</em>) – type of atom 2</p></li>
<li><p><strong>spanbased</strong> (<em>bool</em>) – (default: True) If True, calculates RDFs in a cuboid region of radius span from the center (limited in x, periodic in y,z). If False, calculates RDFs with both particles being in the high resolution region (using lambda resolution values and ignoring span parameter).</p></li>
<li><p><strong>span</strong> (<em>real</em>) – (default: 1.0) +/- distance from centre of box in x-direction of the cuboid region used for RDF calculation if spanbased == True. If spanbased == False, this parameter is not used.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic.compute">
<span class="sig-prename descclassname"><span class="pre">espressopp.analysis.RDFatomistic.</span></span><span class="sig-name descname"><span class="pre">compute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rdfN</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic.compute" title="Link to this definition"></a></dt>
<dd><p>Calculates the atomistic RDF assuming a regular atomistic/coarse-grained adaptive resolution setup.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>rdfN</strong> (<em>int</em>) – number of bins</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>list of reals</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic.computePathIntegral">
<span class="sig-prename descclassname"><span class="pre">espressopp.analysis.RDFatomistic.</span></span><span class="sig-name descname"><span class="pre">computePathIntegral</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rdfN</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#espressopp.analysis.RDFatomistic.espressopp.analysis.RDFatomistic.computePathIntegral" title="Link to this definition"></a></dt>
<dd><p>Calculates the path integral-based RDF averaging over all Trotter bead pairs with the same Trotter bead number between different ring polymers assuming a path integral-based quantum/classical adaptive resolution setup.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>rdfN</strong> (<em>int</em>) – number of bins</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>list of reals</p>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="espressopp.analysis.RadialDistrF.html" class="btn btn-neutral float-left" title="espressopp.analysis.RadialDistrF" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="espressopp.analysis.StaticStructF.html" class="btn btn-neutral float-right" title="espressopp.analysis.StaticStructF" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2013-2026, Max Planck Institute for Polymer Research.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>