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