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 ################### |
---|
14 | import sys |
---|
15 | import os.path as ospath |
---|
16 | import numpy as np |
---|
17 | import cPickle |
---|
18 | import time |
---|
19 | import math |
---|
20 | import GSASIIpath |
---|
21 | GSASIIpath.SetVersionNumber("$Revision: 939 $") |
---|
22 | import GSASIIElem as G2el |
---|
23 | import GSASIIlattice as G2lat |
---|
24 | import GSASIIspc as G2spc |
---|
25 | import GSASIIstrIO as G2stIO |
---|
26 | |
---|
27 | def 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 | |
---|
37 | def ShowControls(Controls): |
---|
38 | 'Print controls information' |
---|
39 | print ' Controls:' |
---|
40 | |
---|
41 | def Solve(GPXfile): |
---|
42 | 'perform the computation' |
---|
43 | ShowBanner() |
---|
44 | Controls = G2stIO.GetControls(GPXfile) |
---|
45 | ShowControls(Controls) |
---|
46 | |
---|
47 | def 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 | |
---|
62 | if __name__ == '__main__': |
---|
63 | main() |
---|
64 | |
---|