Last change
on this file since 4386 was
93,
checked in by toby, 15 years ago
|
G2lattice: add GetBraviasNum? to interface GenHBravais to G2spc.SpcGroup? output
load test data only when needed
Makefile (etc): reorganize Makefile so that make all build targets where all sources
where all sources are provided
G2path: define a platform-specific path and prepend the bin directory if it exists; bin
is assumed to be locally built, which takes precedence over distributed files
|
-
Property svn:executable set to
*
|
File size:
5.6 KB
|
Line | |
---|
1 | #!/usr/bin/env /Users/toby/build/cctbx_build/bin/python |
---|
2 | ''' |
---|
3 | Generate symmetry operations in cctbx.sgtbx for use in testing the |
---|
4 | GSASII space group generation code. All 230 spacegroups are tested plus |
---|
5 | rhombohedral settings of R space groups. |
---|
6 | |
---|
7 | The output from this is placed in sgtbxtestinp.py which contains a dictionary |
---|
8 | sgtbx that can be used for testing. |
---|
9 | |
---|
10 | ''' |
---|
11 | |
---|
12 | from cctbx import sgtbx |
---|
13 | import sys |
---|
14 | import datetime |
---|
15 | |
---|
16 | def GenSGdat(spc): |
---|
17 | fp.write("'%s': [\n" % spc) |
---|
18 | s=sgtbx.space_group_info(spc) |
---|
19 | for s1 in s.group(): |
---|
20 | # print s1.as_double_array() |
---|
21 | fp.write("%s ,\n" % (s1.as_double_array(),)) |
---|
22 | fp.write("],\n\n") |
---|
23 | |
---|
24 | fp = open('sgtbxtestinp.py','w') |
---|
25 | fp.write("# output from sgtbx computed on platform %s on %s\n" % |
---|
26 | (sys.platform, datetime.date.today()) ) |
---|
27 | fp.write("sgtbx = {\n") |
---|
28 | #cubic |
---|
29 | GenSGdat('p 2 3') |
---|
30 | GenSGdat('f 2 3') |
---|
31 | GenSGdat('i 2 3') |
---|
32 | GenSGdat('p 21 3') |
---|
33 | GenSGdat('i 21 3') |
---|
34 | GenSGdat('p m 3') |
---|
35 | GenSGdat('p n -3') |
---|
36 | GenSGdat('f m 3') |
---|
37 | GenSGdat('f d -3') |
---|
38 | GenSGdat('i m -3') |
---|
39 | GenSGdat('p a 3') |
---|
40 | GenSGdat('i a 3') |
---|
41 | GenSGdat('p 4 3 2') |
---|
42 | GenSGdat('p 42 3 2') |
---|
43 | GenSGdat('f 4 3 2') |
---|
44 | GenSGdat('f 41 3 2') |
---|
45 | GenSGdat('i 4 3 2') |
---|
46 | GenSGdat('p 43 3 2') |
---|
47 | GenSGdat('p 41 3 2') |
---|
48 | GenSGdat('i 41 3 2') |
---|
49 | GenSGdat('p -4 3 m') |
---|
50 | GenSGdat('f -4 3 m') |
---|
51 | GenSGdat('i -4 3 m') |
---|
52 | GenSGdat('p -4 3 n') |
---|
53 | GenSGdat('f -4 3 c') |
---|
54 | GenSGdat('i -4 3 d') |
---|
55 | GenSGdat('p m -3 m') |
---|
56 | GenSGdat('p n -3 n') |
---|
57 | GenSGdat('p m -3 n') |
---|
58 | GenSGdat('p n -3 m') |
---|
59 | GenSGdat('f m -3 m') |
---|
60 | GenSGdat('f m -3 c') |
---|
61 | GenSGdat('f d -3 m') |
---|
62 | GenSGdat('f d -3 c') |
---|
63 | GenSGdat('i m -3 m') |
---|
64 | GenSGdat('i a -3 d') |
---|
65 | # ortho |
---|
66 | GenSGdat('p 2 2 2') |
---|
67 | GenSGdat('p 2 2 21') |
---|
68 | GenSGdat('p 21 21 2') |
---|
69 | GenSGdat('p 21 21 21') |
---|
70 | GenSGdat('c 2 2 21') |
---|
71 | GenSGdat('c 2 2 2') |
---|
72 | GenSGdat('f 2 2 2') |
---|
73 | GenSGdat('i 2 2 2') |
---|
74 | GenSGdat('i 21 21 21') |
---|
75 | GenSGdat('p m m 2') |
---|
76 | GenSGdat('p m c 21') |
---|
77 | GenSGdat('p c c 2') |
---|
78 | GenSGdat('p m a 2') |
---|
79 | GenSGdat('p c a 21') |
---|
80 | GenSGdat('p n c 2') |
---|
81 | GenSGdat('p m n 21') |
---|
82 | GenSGdat('p b a 2') |
---|
83 | GenSGdat('p n a 21') |
---|
84 | GenSGdat('p n n 2') |
---|
85 | GenSGdat('c m m 2') |
---|
86 | GenSGdat('c m c 21') |
---|
87 | GenSGdat('c c c 2') |
---|
88 | GenSGdat('a m m 2') |
---|
89 | GenSGdat('a b m 2') |
---|
90 | GenSGdat('a m a 2') |
---|
91 | GenSGdat('a b a 2') |
---|
92 | GenSGdat('f m m 2') |
---|
93 | GenSGdat('f d d 2') |
---|
94 | GenSGdat('i m m 2') |
---|
95 | GenSGdat('i b a 2') |
---|
96 | GenSGdat('i m a 2') |
---|
97 | GenSGdat('p m m m') |
---|
98 | GenSGdat('p n n n') |
---|
99 | GenSGdat('p c c m') |
---|
100 | GenSGdat('p b a n') |
---|
101 | GenSGdat('p m m a') |
---|
102 | GenSGdat('p n n a') |
---|
103 | GenSGdat('p m n a') |
---|
104 | GenSGdat('p c c a') |
---|
105 | GenSGdat('p b a m') |
---|
106 | GenSGdat('p c c n') |
---|
107 | GenSGdat('p b c m') |
---|
108 | GenSGdat('p n n m') |
---|
109 | GenSGdat('p m m n') |
---|
110 | GenSGdat('p b c n') |
---|
111 | GenSGdat('p b c a') |
---|
112 | GenSGdat('p n m a') |
---|
113 | GenSGdat('c m c m') |
---|
114 | GenSGdat('c m c a') |
---|
115 | GenSGdat('c m m m') |
---|
116 | GenSGdat('c c c m') |
---|
117 | GenSGdat('c m m a') |
---|
118 | GenSGdat('c c c a') |
---|
119 | GenSGdat('f m m m') |
---|
120 | GenSGdat('f d d d') |
---|
121 | GenSGdat('i m m m') |
---|
122 | GenSGdat('i b a m') |
---|
123 | GenSGdat('i b c a') |
---|
124 | GenSGdat('i m m a') |
---|
125 | # tetragonal |
---|
126 | GenSGdat('p 4') |
---|
127 | GenSGdat('p 41') |
---|
128 | GenSGdat('p 42') |
---|
129 | GenSGdat('p 43') |
---|
130 | GenSGdat('i 4') |
---|
131 | GenSGdat('i 41') |
---|
132 | GenSGdat('p -4') |
---|
133 | GenSGdat('i -4') |
---|
134 | GenSGdat('p 4/m') |
---|
135 | GenSGdat('p 42/m') |
---|
136 | GenSGdat('p 4/n') |
---|
137 | GenSGdat('p 42/n') |
---|
138 | GenSGdat('i 4/m') |
---|
139 | GenSGdat('i 41/a') |
---|
140 | GenSGdat('p 4 2 2') |
---|
141 | GenSGdat('p 4 21 2') |
---|
142 | GenSGdat('p 41 2 2') |
---|
143 | GenSGdat('p 41 21 2') |
---|
144 | GenSGdat('p 42 2 2') |
---|
145 | GenSGdat('p 42 21 2') |
---|
146 | GenSGdat('p 43 2 2') |
---|
147 | GenSGdat('p 43 21 2') |
---|
148 | GenSGdat('i 4 2 2') |
---|
149 | GenSGdat('i 41 2 2') |
---|
150 | GenSGdat('p 4 m m') |
---|
151 | GenSGdat('p 4 b m') |
---|
152 | GenSGdat('p 42 c m') |
---|
153 | GenSGdat('p 42 n m') |
---|
154 | GenSGdat('p 4 c c') |
---|
155 | GenSGdat('p 4 n c') |
---|
156 | GenSGdat('p 42 m c') |
---|
157 | GenSGdat('p 42 b c') |
---|
158 | GenSGdat('i 4 m m') |
---|
159 | GenSGdat('i 4 c m') |
---|
160 | GenSGdat('i 41 m d') |
---|
161 | GenSGdat('i 41 c d') |
---|
162 | GenSGdat('p -4 2 m') |
---|
163 | GenSGdat('p -4 2 c') |
---|
164 | GenSGdat('p -4 21 m') |
---|
165 | GenSGdat('p -4 21 c') |
---|
166 | GenSGdat('p -4 m 2') |
---|
167 | GenSGdat('p -4 c 2') |
---|
168 | GenSGdat('p -4 b 2') |
---|
169 | GenSGdat('p -4 n 2') |
---|
170 | GenSGdat('i -4 m 2') |
---|
171 | GenSGdat('i -4 c 2') |
---|
172 | GenSGdat('i -4 2 m') |
---|
173 | GenSGdat('i -4 2 d') |
---|
174 | GenSGdat('p 4/m m m') |
---|
175 | GenSGdat('p 4/m c c') |
---|
176 | GenSGdat('p 4/n b m') |
---|
177 | GenSGdat('p 4/n n c') |
---|
178 | GenSGdat('p 4/m b m') |
---|
179 | GenSGdat('p 4/m n c') |
---|
180 | GenSGdat('p 4/n m m') |
---|
181 | GenSGdat('p 4/n c c') |
---|
182 | GenSGdat('p 42/m m c') |
---|
183 | GenSGdat('p 42/m c m') |
---|
184 | GenSGdat('p 42/n b c') |
---|
185 | GenSGdat('p 42/n n m') |
---|
186 | GenSGdat('p 42/m b c') |
---|
187 | GenSGdat('p 42/m n m') |
---|
188 | GenSGdat('p 42/n m c') |
---|
189 | GenSGdat('p 42/n c m') |
---|
190 | GenSGdat('i 4/m m m') |
---|
191 | GenSGdat('i 4/m c m') |
---|
192 | GenSGdat('i 41/a m d') |
---|
193 | GenSGdat('i 41/a c d') |
---|
194 | # triclinic |
---|
195 | GenSGdat('p 1') |
---|
196 | GenSGdat('p -1') |
---|
197 | # monoclinic |
---|
198 | GenSGdat('p 2') |
---|
199 | GenSGdat('p 21') |
---|
200 | GenSGdat('c 2') |
---|
201 | GenSGdat('p m') |
---|
202 | GenSGdat('p c') |
---|
203 | GenSGdat('c m') |
---|
204 | GenSGdat('c c') |
---|
205 | GenSGdat('p 2/m') |
---|
206 | GenSGdat('p 21/m') |
---|
207 | GenSGdat('c 2/m') |
---|
208 | GenSGdat('p 2/c') |
---|
209 | GenSGdat('p 21/c') |
---|
210 | GenSGdat('c 2/c') |
---|
211 | # trigonal |
---|
212 | GenSGdat('p 3') |
---|
213 | GenSGdat('p 31') |
---|
214 | GenSGdat('p 32') |
---|
215 | GenSGdat('r 3') |
---|
216 | GenSGdat('r 3 r') |
---|
217 | GenSGdat('p -3') |
---|
218 | GenSGdat('r -3') |
---|
219 | GenSGdat('r -3 r') |
---|
220 | GenSGdat('p 3 1 2') |
---|
221 | GenSGdat('p 3 2 1') |
---|
222 | GenSGdat('p 31 1 2') |
---|
223 | GenSGdat('p 31 2 1') |
---|
224 | GenSGdat('p 32 1 2') |
---|
225 | GenSGdat('p 32 2 1') |
---|
226 | GenSGdat('r 3 2 h') |
---|
227 | GenSGdat('r 3 2 r') |
---|
228 | GenSGdat('p 3 m 1') |
---|
229 | GenSGdat('p 3 1 m') |
---|
230 | GenSGdat('p 3 c 1') |
---|
231 | GenSGdat('p 3 1 c') |
---|
232 | GenSGdat('r 3 m h') |
---|
233 | GenSGdat('r 3 m r') |
---|
234 | GenSGdat('r 3 c') |
---|
235 | GenSGdat('r 3 c r') |
---|
236 | GenSGdat('p -3 1 m') |
---|
237 | GenSGdat('p -3 1 c') |
---|
238 | GenSGdat('p -3 m 1') |
---|
239 | GenSGdat('p -3 c 1') |
---|
240 | GenSGdat('r -3 m') |
---|
241 | GenSGdat('r -3 m r') |
---|
242 | GenSGdat('r -3 c') |
---|
243 | GenSGdat('r -3 c r') |
---|
244 | # hexagonal |
---|
245 | GenSGdat('p 6') |
---|
246 | GenSGdat('p 61') |
---|
247 | GenSGdat('p 65') |
---|
248 | GenSGdat('p 62') |
---|
249 | GenSGdat('p 64') |
---|
250 | GenSGdat('p 63') |
---|
251 | GenSGdat('p -6') |
---|
252 | GenSGdat('p 6/m') |
---|
253 | GenSGdat('p 63/m') |
---|
254 | GenSGdat('p 6 2 2') |
---|
255 | GenSGdat('p 61 2 2') |
---|
256 | GenSGdat('p 65 2 2') |
---|
257 | GenSGdat('p 62 2 2') |
---|
258 | GenSGdat('p 64 2 2') |
---|
259 | GenSGdat('p 63 2 2') |
---|
260 | GenSGdat('p 6 m m') |
---|
261 | GenSGdat('p 6 c c') |
---|
262 | GenSGdat('p 63 c m') |
---|
263 | GenSGdat('p 63 m c') |
---|
264 | GenSGdat('p -6 m 2') |
---|
265 | GenSGdat('p -6 c 2') |
---|
266 | GenSGdat('p -6 2 m') |
---|
267 | GenSGdat('p -6 2 c') |
---|
268 | GenSGdat('p 6/m m m') |
---|
269 | GenSGdat('p 6/m c c') |
---|
270 | GenSGdat('p 63/m c m') |
---|
271 | GenSGdat('p 63/m m c') |
---|
272 | # non-standard |
---|
273 | GenSGdat('p 21 1 1') |
---|
274 | GenSGdat('p 1 21 1') |
---|
275 | GenSGdat('p 1 1 21') |
---|
276 | fp.write("}\n") |
---|
277 | fp.close() |
---|
Note: See
TracBrowser
for help on using the repository browser.