source: branch/MPbranch/GSASIIsolve.py

Last change on this file was 484, checked in by vondreele, 10 years ago

change authorship
split GSASIIelem into a GUI & non-GUI parts
replace MsgDialogs? in GSASIIElem.py with simple prints
cleanup & refactor distance/angle/torsion calcs.

  • Property svn:keywords set to Date Author Revision URL Id
File size: 1.4 KB
Line 
1#GSASIIsolve - structure solving routines
2########### SVN repository information ###################
3# $Date: 2012-02-15 20:36:53 +0000 (Wed, 15 Feb 2012) $
4# $Author: vondreele $
5# $Revision: 484 $
6# $URL: branch/MPbranch/GSASIIsolve.py $
7# $Id: GSASIIsolve.py 484 2012-02-15 20:36:53Z vondreele $
8########### SVN repository information ###################
9import sys
10import os.path as ospath
11import numpy as np
12import cPickle
13import time
14import math
15import GSASIIpath
16import GSASIIElem as G2el
17import GSASIIlattice as G2lat
18import GSASIIspc as G2spc
19import GSASIIstruct as G2str
20
21def ShowBanner():
22    print 80*'*'
23    print '    General Structure Analysis System-II Crystal Structure Solution'
24    print '              by Robert B. Von Dreele & Brian H. Toby'
25    print '                Argonne National Laboratory(C), 2010'
26    print ' This product includes software developed by the UChicago Argonne, LLC,' 
27    print '            as Operator of Argonne National Laboratory.'
28    print 80*'*','\n'
29   
30def ShowControls(Controls):
31    print ' Controls:'
32   
33def Solve(GPXfile):
34    ShowBanner()
35    Controls = G2str.GetControls(GPXfile)
36    ShowControls(Controls)
37       
38def main():
39    arg = sys.argv
40    if len(arg) > 1:
41        GPXfile = arg[1]
42        if not ospath.exists(GPXfile):
43            print 'ERROR - ',GPXfile," doesn't exist!"
44            exit()
45        GPXpath = ospath.dirname(arg[1])
46        Solve(GPXfile)
47    else:
48        print 'ERROR - missing filename'
49        exit()
50    print "Done"
51         
52if __name__ == '__main__':
53    main()
54
Note: See TracBrowser for help on using the repository browser.