Changeset 3465 for trunk/imports/G2phase_CIF.py
- Timestamp:
- Jul 10, 2018 11:41:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/imports/G2phase_CIF.py
r3401 r3465 284 284 censpn += list(np.array(spnflp)*S) 285 285 self.MPhase['General']['SSGData'] = SSGData 286 else: 286 else: 287 287 try: 288 sgoploop = blk.GetLoop('_space_group_symop_magn.id') 289 sgcenloop = blk.GetLoop('_space_group_symop_magn_centering.id') 288 sgoploop = blk.GetLoop('_space_group_symop_magn_operation.id') 290 289 opid = sgoploop.GetItemPosition('_space_group_symop_magn_operation.xyz')[1] 291 centid = sgcenloop.GetItemPosition('_space_group_symop_magn_centering.xyz')[1] 292 except KeyError: #old mag cif names 293 sgoploop = blk.GetLoop('_space_group_symop.magn_id') 294 sgcenloop = blk.GetLoop('_space_group_symop.magn_centering_id') 295 opid = sgoploop.GetItemPosition('_space_group_symop.magn_operation_xyz')[1] 296 centid = sgcenloop.GetItemPosition('_space_group_symop.magn_centering_xyz')[1] 290 try: 291 sgcenloop = blk.GetLoop('_space_group_symop_magn_centering.id') 292 centid = sgcenloop.GetItemPosition('_space_group_symop_magn_centering.xyz')[1] 293 except KeyError: 294 sgcenloop = None 295 except KeyError: 296 try: 297 sgoploop = blk.GetLoop('_space_group_symop_magn.id') 298 sgcenloop = blk.GetLoop('_space_group_symop_magn_centering.id') 299 opid = sgoploop.GetItemPosition('_space_group_symop_magn_operation.xyz')[1] 300 centid = sgcenloop.GetItemPosition('_space_group_symop_magn_centering.xyz')[1] 301 except KeyError: #old mag cif names 302 sgoploop = blk.GetLoop('_space_group_symop.magn_id') 303 sgcenloop = blk.GetLoop('_space_group_symop.magn_centering_id') 304 opid = sgoploop.GetItemPosition('_space_group_symop.magn_operation_xyz')[1] 305 centid = sgcenloop.GetItemPosition('_space_group_symop.magn_centering_xyz')[1] 297 306 spnflp = [] 298 307 for op in sgoploop: … … 305 314 return False 306 315 censpn = [] 307 for cent in sgcenloop: 308 M,C,S = G2spc.MagText2MTS(cent[centid]) 309 SGData['SGCen'].append(C) 310 censpn += list(np.array(spnflp)*S) 316 if sgcenloop: 317 for cent in sgcenloop: 318 M,C,S = G2spc.MagText2MTS(cent[centid]) 319 SGData['SGCen'].append(C) 320 censpn += list(np.array(spnflp)*S) 321 else: 322 M,C,S = G2spc.MagText2MTS('x,y,z,+1') 323 SGData['SGCen'].append(C) 324 censpn += list(np.array(spnflp)*S) 311 325 self.MPhase['General']['SGData'] = SGData 312 326 self.MPhase['General']['SGData']['SpnFlp'] = censpn
Note: See TracChangeset
for help on using the changeset viewer.