source: trunk/GSASIIsolve.py @ 939

Last change on this file since 939 was 939, checked in by toby, 10 years ago

fix & cleanup unit tests; add/change doc strings for sphinx; add all G2 py files to sphinx

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Revision URL Id
File size: 1.6 KB
Line 
1# -*- coding: utf-8 -*-
2'''
3*GSASIIsolve - structure solving routines*
4==========================================
5
6'''
7########### SVN repository information ###################
8# $Date: 2013-06-03 04:07:35 +0000 (Mon, 03 Jun 2013) $
9# $Author: toby $
10# $Revision: 939 $
11# $URL: trunk/GSASIIsolve.py $
12# $Id: GSASIIsolve.py 939 2013-06-03 04:07:35Z toby $
13########### SVN repository information ###################
14import sys
15import os.path as ospath
16import numpy as np
17import cPickle
18import time
19import math
20import GSASIIpath
21GSASIIpath.SetVersionNumber("$Revision: 939 $")
22import GSASIIElem as G2el
23import GSASIIlattice as G2lat
24import GSASIIspc as G2spc
25import GSASIIstrIO as G2stIO
26
27def ShowBanner():
28    'Print authorship, copyright and citation notice'
29    print 80*'*'
30    print '    General Structure Analysis System-II Crystal Structure Solution'
31    print '              by Robert B. Von Dreele & Brian H. Toby'
32    print '                Argonne National Laboratory(C), 2010'
33    print ' This product includes software developed by the UChicago Argonne, LLC,' 
34    print '            as Operator of Argonne National Laboratory.'
35    print 80*'*','\n'
36   
37def ShowControls(Controls):
38    'Print controls information'
39    print ' Controls:'
40   
41def Solve(GPXfile):
42    'perform the computation'
43    ShowBanner()
44    Controls = G2stIO.GetControls(GPXfile)
45    ShowControls(Controls)
46       
47def main():
48    'needs doc string'
49    arg = sys.argv
50    if len(arg) > 1:
51        GPXfile = arg[1]
52        if not ospath.exists(GPXfile):
53            print 'ERROR - ',GPXfile," doesn't exist!"
54            exit()
55        GPXpath = ospath.dirname(arg[1])
56        Solve(GPXfile)
57    else:
58        print 'ERROR - missing filename'
59        exit()
60    print "Done"
61         
62if __name__ == '__main__':
63    main()
64
Note: See TracBrowser for help on using the repository browser.