forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.util.convergence.html
259 lines (223 loc) · 18.7 KB
/
pymatgen.util.convergence.html
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.util.convergence module — pymatgen 2019.5.1 documentation</title>
<link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pymatgen.util.convergence">
<span id="pymatgen-util-convergence-module"></span><h1>pymatgen.util.convergence module<a class="headerlink" href="#module-pymatgen.util.convergence" title="Permalink to this headline">¶</a></h1>
<dl class="exception">
<dt id="pymatgen.util.convergence.SplineInputError">
<em class="property">exception </em><code class="descname">SplineInputError</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#SplineInputError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.SplineInputError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.determine_convergence">
<code class="descname">determine_convergence</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>name</em>, <em>tol=0.0001</em>, <em>extra=''</em>, <em>verbose=False</em>, <em>mode='extra'</em>, <em>plots=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#determine_convergence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.determine_convergence" title="Permalink to this definition">¶</a></dt>
<dd><p>test it and at which x_value dy(x)/dx < tol for all x >= x_value, conv is true is such a x_value exists.</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.exponential">
<code class="descname">exponential</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em>, <em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#exponential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.exponential" title="Permalink to this definition">¶</a></dt>
<dd><p>exponential function base n to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.extrapolate_reciprocal">
<code class="descname">extrapolate_reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>n</em>, <em>noise</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#extrapolate_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.extrapolate_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>return the parameters such that a + b / x^n hits the last two data points</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.extrapolate_simple_reciprocal">
<code class="descname">extrapolate_simple_reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#extrapolate_simple_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.extrapolate_simple_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.get_derivatives">
<code class="descname">get_derivatives</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>fd=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#get_derivatives"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.get_derivatives" title="Permalink to this definition">¶</a></dt>
<dd><p>return the derivatives of y(x) at the points x
if scipy is available a spline is generated to calculate the derivatives
if scipy is not available the left and right slopes are calculated, if both exist the average is returned
putting fd to zero always returns the finite difference slopes</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.get_weights">
<code class="descname">get_weights</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>mode=2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#get_weights"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.get_weights" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.id_generator">
<code class="descname">id_generator</code><span class="sig-paren">(</span><em>size=8</em>, <em>chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#id_generator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.id_generator" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.measure">
<code class="descname">measure</code><span class="sig-paren">(</span><em>function</em>, <em>xs</em>, <em>ys</em>, <em>popt</em>, <em>weights</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#measure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.measure" title="Permalink to this definition">¶</a></dt>
<dd><p>measure the quality of a fit</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.multi_curve_fit">
<code class="descname">multi_curve_fit</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>verbose</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#multi_curve_fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.multi_curve_fit" title="Permalink to this definition">¶</a></dt>
<dd><p>fit multiple functions to the x, y data, return the best fit</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.multi_reciprocal_extra">
<code class="descname">multi_reciprocal_extra</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>noise=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#multi_reciprocal_extra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.multi_reciprocal_extra" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates for a series of powers ns the parameters for which the last two points are at the curve.
With these parameters measure how well the other data points fit.
return the best fit.</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_exponential">
<code class="descname">p0_exponential</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_exponential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_exponential" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_reciprocal">
<code class="descname">p0_reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>predictor for first guess for reciprocal</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_simple_2reciprocal">
<code class="descname">p0_simple_2reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_simple_2reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_simple_2reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_simple_4reciprocal">
<code class="descname">p0_simple_4reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_simple_4reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_simple_4reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_simple_5reciprocal">
<code class="descname">p0_simple_5reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_simple_5reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_simple_5reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_simple_reciprocal">
<code class="descname">p0_simple_reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_simple_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_simple_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.p0_single_reciprocal">
<code class="descname">p0_single_reciprocal</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#p0_single_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.p0_single_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.print_and_raise_error">
<code class="descname">print_and_raise_error</code><span class="sig-paren">(</span><em>xs</em>, <em>ys</em>, <em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#print_and_raise_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.print_and_raise_error" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.print_plot_line">
<code class="descname">print_plot_line</code><span class="sig-paren">(</span><em>function</em>, <em>popt</em>, <em>xs</em>, <em>ys</em>, <em>name</em>, <em>tol=0.05</em>, <em>extra=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#print_plot_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.print_plot_line" title="Permalink to this definition">¶</a></dt>
<dd><p>print the gnuplot command line to plot the x, y data with the fitted function using the popt parameters</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.reciprocal">
<code class="descname">reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em>, <em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to the power n to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.simple_2reciprocal">
<code class="descname">simple_2reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#simple_2reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.simple_2reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.simple_4reciprocal">
<code class="descname">simple_4reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#simple_4reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.simple_4reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.simple_5reciprocal">
<code class="descname">simple_5reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#simple_5reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.simple_5reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.simple_reciprocal">
<code class="descname">simple_reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#simple_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.simple_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to fit convergence data</p>
</dd></dl>
<dl class="function">
<dt id="pymatgen.util.convergence.single_reciprocal">
<code class="descname">single_reciprocal</code><span class="sig-paren">(</span><em>x</em>, <em>a</em>, <em>b</em>, <em>c</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/util/convergence.html#single_reciprocal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.util.convergence.single_reciprocal" title="Permalink to this definition">¶</a></dt>
<dd><p>reciprocal function to fit convergence data</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pymatgen.util.convergence.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2011, Pymatgen Development Team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.0.1.
</div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</div>
</body>
</html>