source: trunk/sphinxdocs/build/html/_modules/GSASIIsolve.html @ 957

Last change on this file since 957 was 957, checked in by toby, 9 years ago

redo docs

  • Property svn:mime-type set to text/html
File size: 10.0 KB
Line 
1
2
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6
7<html xmlns="http://www.w3.org/1999/xhtml">
8  <head>
9    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10   
11    <title>GSASIIsolve &mdash; GSAS-II 0.2.0 documentation</title>
12   
13    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
14    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
15   
16    <script type="text/javascript">
17      var DOCUMENTATION_OPTIONS = {
18        URL_ROOT:    '../',
19        VERSION:     '0.2.0',
20        COLLAPSE_INDEX: false,
21        FILE_SUFFIX: '.html',
22        HAS_SOURCE:  true
23      };
24    </script>
25    <script type="text/javascript" src="../_static/jquery.js"></script>
26    <script type="text/javascript" src="../_static/underscore.js"></script>
27    <script type="text/javascript" src="../_static/doctools.js"></script>
28    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
29    <link rel="top" title="GSAS-II 0.2.0 documentation" href="../index.html" />
30    <link rel="up" title="Module code" href="index.html" /> 
31  </head>
32  <body>
33    <div class="related">
34      <h3>Navigation</h3>
35      <ul>
36        <li class="right" style="margin-right: 10px">
37          <a href="../genindex.html" title="General Index"
38             accesskey="I">index</a></li>
39        <li class="right" >
40          <a href="../py-modindex.html" title="Python Module Index"
41             >modules</a> |</li>
42        <li><a href="../index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
43          <li><a href="index.html" accesskey="U">Module code</a> &raquo;</li> 
44      </ul>
45    </div> 
46
47    <div class="document">
48      <div class="documentwrapper">
49        <div class="bodywrapper">
50          <div class="body">
51           
52  <h1>Source code for GSASIIsolve</h1><div class="highlight"><pre>
53<span class="c"># -*- coding: utf-8 -*-</span>
54<span class="sd">&#39;&#39;&#39;</span>
55<span class="sd">*GSASIIsolve - structure solving routines*</span>
56<span class="sd">==========================================</span>
57
58<span class="sd">&#39;&#39;&#39;</span>
59<span class="c">########### SVN repository information ###################</span>
60<span class="c"># $Date: 2013-06-02 23:07:35 -0500 (Sun, 02 Jun 2013) $</span>
61<span class="c"># $Author: toby $</span>
62<span class="c"># $Revision: 939 $</span>
63<span class="c"># $URL: https://subversion.xor.aps.anl.gov/pyGSAS/trunk/GSASIIsolve.py $</span>
64<span class="c"># $Id: GSASIIsolve.py 939 2013-06-03 04:07:35Z toby $</span>
65<span class="c">########### SVN repository information ###################</span>
66<span class="kn">import</span> <span class="nn">sys</span>
67<span class="kn">import</span> <span class="nn">os.path</span> <span class="kn">as</span> <span class="nn">ospath</span>
68<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
69<span class="kn">import</span> <span class="nn">cPickle</span>
70<span class="kn">import</span> <span class="nn">time</span>
71<span class="kn">import</span> <span class="nn">math</span>
72<span class="kn">import</span> <span class="nn">GSASIIpath</span>
73<span class="n">GSASIIpath</span><span class="o">.</span><span class="n">SetVersionNumber</span><span class="p">(</span><span class="s">&quot;$Revision: 939 $&quot;</span><span class="p">)</span>
74<span class="kn">import</span> <span class="nn">GSASIIElem</span> <span class="kn">as</span> <span class="nn">G2el</span>
75<span class="kn">import</span> <span class="nn">GSASIIlattice</span> <span class="kn">as</span> <span class="nn">G2lat</span>
76<span class="kn">import</span> <span class="nn">GSASIIspc</span> <span class="kn">as</span> <span class="nn">G2spc</span>
77<span class="kn">import</span> <span class="nn">GSASIIstrIO</span> <span class="kn">as</span> <span class="nn">G2stIO</span>
78
79<div class="viewcode-block" id="ShowBanner"><a class="viewcode-back" href="../GSASIIsolve.html#GSASIIsolve.ShowBanner">[docs]</a><span class="k">def</span> <span class="nf">ShowBanner</span><span class="p">():</span>
80    <span class="s">&#39;Print authorship, copyright and citation notice&#39;</span>
81    <span class="k">print</span> <span class="mi">80</span><span class="o">*</span><span class="s">&#39;*&#39;</span>
82    <span class="k">print</span> <span class="s">&#39;    General Structure Analysis System-II Crystal Structure Solution&#39;</span>
83    <span class="k">print</span> <span class="s">&#39;              by Robert B. Von Dreele &amp; Brian H. Toby&#39;</span>
84    <span class="k">print</span> <span class="s">&#39;                Argonne National Laboratory(C), 2010&#39;</span>
85    <span class="k">print</span> <span class="s">&#39; This product includes software developed by the UChicago Argonne, LLC,&#39;</span> 
86    <span class="k">print</span> <span class="s">&#39;            as Operator of Argonne National Laboratory.&#39;</span>
87    <span class="k">print</span> <span class="mi">80</span><span class="o">*</span><span class="s">&#39;*&#39;</span><span class="p">,</span><span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span>
88    </div>
89<div class="viewcode-block" id="ShowControls"><a class="viewcode-back" href="../GSASIIsolve.html#GSASIIsolve.ShowControls">[docs]</a><span class="k">def</span> <span class="nf">ShowControls</span><span class="p">(</span><span class="n">Controls</span><span class="p">):</span>
90    <span class="s">&#39;Print controls information&#39;</span>
91    <span class="k">print</span> <span class="s">&#39; Controls:&#39;</span>
92    </div>
93<div class="viewcode-block" id="Solve"><a class="viewcode-back" href="../GSASIIsolve.html#GSASIIsolve.Solve">[docs]</a><span class="k">def</span> <span class="nf">Solve</span><span class="p">(</span><span class="n">GPXfile</span><span class="p">):</span>
94    <span class="s">&#39;perform the computation&#39;</span>
95    <span class="n">ShowBanner</span><span class="p">()</span>
96    <span class="n">Controls</span> <span class="o">=</span> <span class="n">G2stIO</span><span class="o">.</span><span class="n">GetControls</span><span class="p">(</span><span class="n">GPXfile</span><span class="p">)</span>
97    <span class="n">ShowControls</span><span class="p">(</span><span class="n">Controls</span><span class="p">)</span>
98        </div>
99<div class="viewcode-block" id="main"><a class="viewcode-back" href="../GSASIIsolve.html#GSASIIsolve.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
100    <span class="s">&#39;needs doc string&#39;</span>
101    <span class="n">arg</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span>
102    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
103        <span class="n">GPXfile</span> <span class="o">=</span> <span class="n">arg</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
104        <span class="k">if</span> <span class="ow">not</span> <span class="n">ospath</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">GPXfile</span><span class="p">):</span>
105            <span class="k">print</span> <span class="s">&#39;ERROR - &#39;</span><span class="p">,</span><span class="n">GPXfile</span><span class="p">,</span><span class="s">&quot; doesn&#39;t exist!&quot;</span>
106            <span class="nb">exit</span><span class="p">()</span>
107        <span class="n">GPXpath</span> <span class="o">=</span> <span class="n">ospath</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">arg</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
108        <span class="n">Solve</span><span class="p">(</span><span class="n">GPXfile</span><span class="p">)</span>
109    <span class="k">else</span><span class="p">:</span>
110        <span class="k">print</span> <span class="s">&#39;ERROR - missing filename&#39;</span>
111        <span class="nb">exit</span><span class="p">()</span>
112    <span class="k">print</span> <span class="s">&quot;Done&quot;</span>
113         </div>
114<span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&#39;__main__&#39;</span><span class="p">:</span>
115    <span class="n">main</span><span class="p">()</span>
116</pre></div>
117
118          </div>
119        </div>
120      </div>
121      <div class="sphinxsidebar">
122        <div class="sphinxsidebarwrapper">
123            <p class="logo"><a href="../index.html">
124              <img class="logo" src="../_static/G2_html_logo.png" alt="Logo"/>
125            </a></p>
126<div id="searchbox" style="display: none">
127  <h3>Quick search</h3>
128    <form class="search" action="../search.html" method="get">
129      <input type="text" name="q" />
130      <input type="submit" value="Go" />
131      <input type="hidden" name="check_keywords" value="yes" />
132      <input type="hidden" name="area" value="default" />
133    </form>
134    <p class="searchtip" style="font-size: 90%">
135    Enter search terms or a module, class or function name.
136    </p>
137</div>
138<script type="text/javascript">$('#searchbox').show(0);</script>
139        </div>
140      </div>
141      <div class="clearer"></div>
142    </div>
143    <div class="related">
144      <h3>Navigation</h3>
145      <ul>
146        <li class="right" style="margin-right: 10px">
147          <a href="../genindex.html" title="General Index"
148             >index</a></li>
149        <li class="right" >
150          <a href="../py-modindex.html" title="Python Module Index"
151             >modules</a> |</li>
152        <li><a href="../index.html">GSAS-II 0.2.0 documentation</a> &raquo;</li>
153          <li><a href="index.html" >Module code</a> &raquo;</li> 
154      </ul>
155    </div>
156    <div class="footer">
157        &copy; Copyright 2013, Von Dreele and Toby for Argonne National Laboratory.
158      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
159    </div>
160  </body>
161</html>
Note: See TracBrowser for help on using the repository browser.