Skip to content

Commit d62167a

Browse files
committed
deploy: 3a8ab08
1 parent f51311a commit d62167a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+17670
-114
lines changed

_modules/diffpy/structure.html

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
<!DOCTYPE html>
2+
<html class="writer-html5" lang="en" data-content_root="../../">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>diffpy.structure &mdash; diffpy.structure 3.1.0 documentation</title>
7+
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
8+
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />
9+
10+
11+
<!--[if lt IE 9]>
12+
<script src="../../_static/js/html5shiv.min.js"></script>
13+
<![endif]-->
14+
15+
<script src="../../_static/jquery.js?v=5d32c60e"></script>
16+
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
17+
<script src="../../_static/documentation_options.js?v=0ffc2956"></script>
18+
<script src="../../_static/doctools.js?v=9a2dae69"></script>
19+
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
20+
<script src="../../_static/js/theme.js"></script>
21+
<link rel="index" title="Index" href="../../genindex.html" />
22+
<link rel="search" title="Search" href="../../search.html" />
23+
</head>
24+
25+
<body class="wy-body-for-nav">
26+
<div class="wy-grid-for-nav">
27+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
28+
<div class="wy-side-scroll">
29+
<div class="wy-side-nav-search" >
30+
31+
32+
33+
<a href="../../index.html" class="icon icon-home">
34+
diffpy.structure
35+
</a>
36+
<div class="version">
37+
3.1.0
38+
</div>
39+
<div role="search">
40+
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
41+
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
42+
<input type="hidden" name="check_keywords" value="yes" />
43+
<input type="hidden" name="area" value="default" />
44+
</form>
45+
</div>
46+
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
47+
<ul>
48+
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
49+
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
50+
<li class="toctree-l1"><a class="reference internal" href="../../api/diffpy.structure.html">Package API</a></li>
51+
</ul>
52+
53+
</div>
54+
</div>
55+
</nav>
56+
57+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
58+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
59+
<a href="../../index.html">diffpy.structure</a>
60+
</nav>
61+
62+
<div class="wy-nav-content">
63+
<div class="rst-content">
64+
<div role="navigation" aria-label="Page navigation">
65+
<ul class="wy-breadcrumbs">
66+
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
67+
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
68+
<li class="breadcrumb-item active">diffpy.structure</li>
69+
<li class="wy-breadcrumbs-aside">
70+
</li>
71+
</ul>
72+
<hr/>
73+
</div>
74+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
75+
<div itemprop="articleBody">
76+
77+
<h1>Source code for diffpy.structure</h1><div class="highlight"><pre>
78+
<span></span><span class="ch">#!/usr/bin/env python</span>
79+
<span class="c1">##############################################################################</span>
80+
<span class="c1">#</span>
81+
<span class="c1"># (c) 2024 The Trustees of Columbia University in the City of New York.</span>
82+
<span class="c1"># All rights reserved.</span>
83+
<span class="c1">#</span>
84+
<span class="c1"># File coded by: Billinge Group members and community contributors.</span>
85+
<span class="c1">#</span>
86+
<span class="c1"># See GitHub contributions for a more detailed list of contributors.</span>
87+
<span class="c1"># https://github.com/diffpy/diffpy.structure/graphs/contributors</span>
88+
<span class="c1">#</span>
89+
<span class="c1"># See LICENSE.rst for license information.</span>
90+
<span class="c1">#</span>
91+
<span class="c1">##############################################################################</span>
92+
93+
<span class="sd">&quot;&quot;&quot;classes related to structure of materials</span>
94+
<span class="sd">Classes:</span>
95+
<span class="sd"> Atom</span>
96+
<span class="sd"> Lattice</span>
97+
<span class="sd"> Structure</span>
98+
<span class="sd"> PDFFitStructure</span>
99+
<span class="sd">Exceptions:</span>
100+
<span class="sd"> StructureFormatError</span>
101+
<span class="sd"> LatticeError</span>
102+
<span class="sd"> SymmetryError</span>
103+
<span class="sd">&quot;&quot;&quot;</span>
104+
105+
<span class="c1"># Interface definitions ------------------------------------------------------</span>
106+
107+
<span class="kn">from</span> <span class="nn">diffpy.structure.atom</span> <span class="kn">import</span> <span class="n">Atom</span>
108+
<span class="kn">from</span> <span class="nn">diffpy.structure.lattice</span> <span class="kn">import</span> <span class="n">Lattice</span>
109+
<span class="kn">from</span> <span class="nn">diffpy.structure.pdffitstructure</span> <span class="kn">import</span> <span class="n">PDFFitStructure</span>
110+
<span class="kn">from</span> <span class="nn">diffpy.structure.structure</span> <span class="kn">import</span> <span class="n">Structure</span>
111+
<span class="kn">from</span> <span class="nn">diffpy.structure.structureerrors</span> <span class="kn">import</span> <span class="n">LatticeError</span><span class="p">,</span> <span class="n">StructureFormatError</span><span class="p">,</span> <span class="n">SymmetryError</span>
112+
113+
<span class="c1"># obtain version information</span>
114+
115+
<span class="sd">&quot;&quot;&quot;Crystal structure container and parsers for structure formats.&quot;&quot;&quot;</span>
116+
117+
<span class="c1"># package version</span>
118+
<span class="kn">from</span> <span class="nn">diffpy.structure.version</span> <span class="kn">import</span> <span class="n">__version__</span>
119+
120+
<span class="c1"># top level routines</span>
121+
122+
123+
<div class="viewcode-block" id="loadStructure">
124+
<a class="viewcode-back" href="../../api/diffpy.structure.html#diffpy.structure.loadStructure">[docs]</a>
125+
<span class="k">def</span> <span class="nf">loadStructure</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">fmt</span><span class="o">=</span><span class="s2">&quot;auto&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
126+
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
127+
<span class="sd"> Load new structure object from the specified file.</span>
128+
129+
<span class="sd"> Parameters</span>
130+
<span class="sd"> ----------</span>
131+
132+
<span class="sd"> filename : str</span>
133+
<span class="sd"> Path to the file to be loaded.</span>
134+
<span class="sd"> fmt : str, optional</span>
135+
<span class="sd"> Format of the structure file such as &#39;cif&#39; or &#39;xyz&#39;. Must be</span>
136+
<span class="sd"> one of the formats listed by the `parsers.inputFormats` function.</span>
137+
<span class="sd"> When &#39;auto&#39;, all supported formats are tried in a sequence.</span>
138+
<span class="sd"> kw : misc, optional</span>
139+
<span class="sd"> Extra keyword arguments that are passed to `parsers.getParser`</span>
140+
<span class="sd"> function. These configure the dedicated Parser object that</span>
141+
<span class="sd"> is used to read content in filename.</span>
142+
143+
<span class="sd"> Returns</span>
144+
<span class="sd"> -------</span>
145+
<span class="sd"> stru : `Structure`, `PDFFitStructure`</span>
146+
<span class="sd"> The new Structure object loaded from the specified file.</span>
147+
<span class="sd"> Return a more specific PDFFitStructure type for &#39;pdffit&#39;</span>
148+
<span class="sd"> and &#39;discus&#39; formats.</span>
149+
<span class="sd"> &quot;&quot;&quot;</span>
150+
<span class="kn">from</span> <span class="nn">diffpy.structure.parsers</span> <span class="kn">import</span> <span class="n">getParser</span>
151+
152+
<span class="n">p</span> <span class="o">=</span> <span class="n">getParser</span><span class="p">(</span><span class="n">fmt</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">)</span>
153+
<span class="n">rv</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">parseFile</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
154+
<span class="k">return</span> <span class="n">rv</span></div>
155+
156+
157+
158+
<span class="c1"># silence pyflakes checker</span>
159+
<span class="k">assert</span> <span class="n">StructureFormatError</span> <span class="ow">and</span> <span class="n">LatticeError</span> <span class="ow">and</span> <span class="n">SymmetryError</span>
160+
<span class="k">assert</span> <span class="n">Atom</span>
161+
<span class="k">assert</span> <span class="n">Lattice</span>
162+
<span class="k">assert</span> <span class="n">Structure</span>
163+
<span class="k">assert</span> <span class="n">PDFFitStructure</span>
164+
165+
<span class="c1"># silence the pyflakes syntax checker</span>
166+
<span class="k">assert</span> <span class="n">__version__</span> <span class="ow">or</span> <span class="kc">True</span>
167+
168+
<span class="c1"># End of file</span>
169+
</pre></div>
170+
171+
</div>
172+
</div>
173+
<footer>
174+
175+
<hr/>
176+
177+
<div role="contentinfo">
178+
<p>&#169; Copyright 2024, The Trustees of Columbia University in the City of New York.</p>
179+
</div>
180+
181+
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
182+
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
183+
provided by <a href="https://readthedocs.org">Read the Docs</a>.
184+
185+
186+
</footer>
187+
</div>
188+
</div>
189+
</section>
190+
</div>
191+
<script>
192+
jQuery(function () {
193+
SphinxRtdTheme.Navigation.enable(true);
194+
});
195+
</script>
196+
197+
</body>
198+
</html>

0 commit comments

Comments
 (0)