Changeset 57 for trunk/testinp/gensgtbx.py
- Timestamp:
- Apr 29, 2010 9:30:47 PM (15 years ago)
- Location:
- trunk/testinp
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/testinp/gensgtbx.py ¶
r30 r57 2 2 ''' 3 3 Generate symmetry operations in cctbx.sgtbx for use in testing the 4 GSASII space group generation code. I think one of the 230 spacegroups 5 is missing from the list below; but there are two settings included for the 6 rhombohedral groups. 7 8 Redirect output to sgtbxdat.py to create the input file for testing. 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 9 10 ''' 10 11 11 12 from cctbx import sgtbx 13 import sys 14 import datetime 12 15 13 16 def GenSGdat(spc): 14 print "'%s': [" % spc17 fp.write("'%s': [\n" % spc) 15 18 s=sgtbx.space_group_info(spc) 16 19 for s1 in s.group(): 17 print s1.as_double_array(),"," 18 print "],\n" 19 print "sgtbx = {" 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") 20 28 #cubic 21 29 GenSGdat('p 2 3') … … 121 129 GenSGdat('p 43') 122 130 GenSGdat('i 4') 123 #GenSGdat('i 41 1 1') # not accepted by cctbx124 131 GenSGdat('i 41') 125 132 GenSGdat('p -4') … … 127 134 GenSGdat('p 4/m') 128 135 GenSGdat('p 42/m') 129 #GenSGdat('p 4/n 1 ') # does not work130 136 GenSGdat('p 4/n') 131 137 GenSGdat('p 42/n') … … 138 144 GenSGdat('p 42 2 2') 139 145 GenSGdat('p 42 21 2') 140 GenSGdat('p 43 2 2 146 GenSGdat('p 43 2 2') 141 147 GenSGdat('p 43 21 2') 142 148 GenSGdat('i 4 2 2') … … 144 150 GenSGdat('p 4 m m') 145 151 GenSGdat('p 4 b m') 146 GenSGdat('p 2 c m')152 GenSGdat('p 42 c m') 147 153 GenSGdat('p 42 n m') 148 154 GenSGdat('p 4 c c') … … 183 189 GenSGdat('p 42/n c m') 184 190 GenSGdat('i 4/m m m') 185 GenSGdat('i 4/m c m 191 GenSGdat('i 4/m c m') 186 192 GenSGdat('i 41/a m d') 187 193 GenSGdat('i 41/a c d') … … 192 198 GenSGdat('p 2') 193 199 GenSGdat('p 21') 194 GenSGdat('c 2 1 1')200 GenSGdat('c 2') 195 201 GenSGdat('p m') 196 202 GenSGdat('p c') 197 203 GenSGdat('c m') 198 204 GenSGdat('c c') 199 GenSGdat('p 1 2/m 1')205 GenSGdat('p 2/m') 200 206 GenSGdat('p 21/m') 201 207 GenSGdat('c 2/m') 202 208 GenSGdat('p 2/c') 203 209 GenSGdat('p 21/c') 204 GenSGdat('c 1 2/c 1')210 GenSGdat('c 2/c') 205 211 # trigonal 212 GenSGdat('p 3') 206 213 GenSGdat('p 31') 207 #GenSGdat('p 32 1 1') # not accepted by cctbx208 214 GenSGdat('p 32') 209 215 GenSGdat('r 3') … … 239 245 GenSGdat('p 6') 240 246 GenSGdat('p 61') 241 #GenSGdat('p 65 1 1') # not accepted by cctbx242 247 GenSGdat('p 65') 243 248 GenSGdat('p 62') … … 245 250 GenSGdat('p 63') 246 251 GenSGdat('p -6') 247 #GenSGdat('p 6/m 1 1') # not accepted by cctbx248 252 GenSGdat('p 6/m') 249 253 GenSGdat('p 63/m') … … 266 270 GenSGdat('p 63/m c m') 267 271 GenSGdat('p 63/m m c') 268 269 print "}" 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 TracChangeset
for help on using the changeset viewer.