Changeset 3163
- Timestamp:
- Nov 28, 2017 10:06:41 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrIO.py
r3157 r3163 860 860 isotope = bldata[0] 861 861 mass = bldata[1]['Mass'] 862 if 'SL' in bldata[1]: 862 if 'BW-LS' in bldata[1]: 863 bres = bldata[1]['BW-LS'] 864 blen = 0 865 else: 863 866 blen = bldata[1]['SL'][0] 864 867 bres = [] 865 else:866 blen = 0867 bres = bldata[1]['BW-LS']868 868 line = ' %8s%11s %10.3f %8.3f'%(Ename.ljust(8),isotope.center(11),mass,blen) 869 869 for item in bres: -
trunk/atmdata.py
r2133 r3163 525 525 'BW-LS':[ 0.683, 88.78, 4684.9, 28.11, 52.61,0,0,0,0]}, #LS 526 526 'Gd_160':{'Mass':159.927,'SL':[ .915, 0],'SA': .77}, 527 'Tb_ 527 'Tb_': {'Mass':158.925,'SL':[ .734, 0],'SA': 23.4}, 528 528 'Tb_159':{'Mass':158.925,'SL':[ .734, 0],'SA': 23.4}, 529 529 'Dy_': {'Mass': 162.50,'SL':[ 1.69, 0],'SA': 994.}, -
trunk/imports/G2phase_CIF.py
r3137 r3163 38 38 def __init__(self): 39 39 super(self.__class__,self).__init__( # fancy way to say ImportPhase.__init__ 40 extensionlist=('.CIF','.cif','.txt' ),40 extensionlist=('.CIF','.cif','.txt','.mcif'), 41 41 strictExtension=False, 42 42 formatName = 'CIF', … … 128 128 E = True 129 129 Super = False 130 magnetic = False 131 self.Phase['General']['Type'] = 'nuclear' 130 132 SpGrp = blk.get("_symmetry_space_group_name_H-M",'') 131 133 if not SpGrp: 132 134 SpGrp = blk.get("_space_group_name_H-M_alt",'') 135 if not SpGrp: 136 SpGrp = blk.get("_parent_space_group.name_H-M",'') 137 magnetic = True 138 self.Phase['General']['Type'] = 'magnetic' 139 self.Phase['General']['AtomPtrs'] = [3,1,10,12] 133 140 if not SpGrp: 134 141 sspgrp = blk.get("_space_group_ssg_name",'').split('(') … … 170 177 if not blk.get('_atom_site_type_symbol'): 171 178 self.isodistort_warnings += '\natom types are missing. \n Check & revise atom types as needed' 179 if magnetic: 180 magatomloop = blk.GetLoop('_atom_site_moment_label') 181 magatomkeys = [i.lower() for i in magatomloop.keys()] 172 182 if blk.get('_atom_site_aniso_label'): 173 183 anisoloop = blk.GetLoop('_atom_site_aniso_label') … … 217 227 '_atom_site_aniso_u_13' : 15, 218 228 '_atom_site_aniso_u_23' : 16, } 229 G2MagDict = {'_atom_site_moment_label': 0, 230 '_atom_site_moment_crystalaxis_x':7, 231 '_atom_site_moment_crystalaxis_y':8, 232 '_atom_site_moment_crystalaxis_z':9} 219 233 220 234 ranIdlookup = {} 221 235 for aitem in atomloop: 222 atomlist = ['','','',0,0,0,1.0,'',0,'I',0.01,0,0,0,0,0,0,0] 236 if magnetic: 237 atomlist = ['','','',0.,0.,0.,1.0,0.,0.,0.,'',0.,'I',0.01,0.,0.,0.,0.,0.,0.,0.] 238 else: 239 atomlist = ['','','',0.,0.,0.,1.0,'',0.,'I',0.01,0.,0.,0.,0.,0.,0.,0.] 223 240 atomlist[-1] = ran.randint(0,sys.maxsize) # add a random Id 224 241 while atomlist[-1] in ranIdlookup: … … 234 251 '_atom_site_adp_type'): #Iso or Aniso? 235 252 if val.lower() == 'uani': 236 atomlist[9] = 'A' 253 if magnetic: 254 atomlist[12] = 'A' 255 else: 256 atomlist[9] = 'A' 237 257 elif key == '_atom_site_u_iso_or_equiv': 238 258 uisoval = cif.get_number_with_esd(val)[0] 239 if uisoval is not None: atomlist[10] = uisoval 259 if uisoval is not None: 260 if magnetic: 261 atomlist[13] = uisoval 262 else: 263 atomlist[10] = uisoval 240 264 if not atomlist[1] and atomlist[0]: 241 265 typ = atomlist[0].rstrip('0123456789-+') … … 246 270 self.warnings += ' Atom type '+typ+' not recognized; Xe assumed\n' 247 271 if atomlist[0] in anisolabels: # does this atom have aniso values in separate loop? 248 atomlist[9] = 'A' # set the aniso flag 272 if magnetic: 273 atomlist[12] = 'A' 274 else: 275 atomlist[9] = 'A' 249 276 for val,key in zip( # load the values 250 277 anisoloop.GetKeyedPacket('_atom_site_aniso_label',atomlist[0]), 251 278 anisokeys): 252 279 col = G2AtomDict.get(key) 280 if magnetic: 281 col += 3 253 282 if col: 254 283 atomlist[col] = cif.get_number_with_esd(val)[0] 255 atomlist[7],atomlist[8] = G2spc.SytSym(atomlist[3:6],SGData)[:2] 284 if magnetic: 285 for mitem in magatomloop: 286 matom = mitem[G2MagDict.get('_atom_site_moment_label',-1)] 287 if atomlist[0] == matom: 288 for mval,mkey in zip(mitem,magatomkeys): 289 mcol = G2MagDict.get(mkey,-1) 290 if mcol: 291 atomlist[mcol] = cif.get_number_with_esd(mval)[0] 292 break 293 atomlist[10],atomlist[11] = G2spc.SytSym(atomlist[3:6],SGData)[:2] 294 else: 295 atomlist[7],atomlist[8] = G2spc.SytSym(atomlist[3:6],SGData)[:2] 256 296 atomlist[1] = G2elem.FixValence(atomlist[1]) 257 297 self.Phase['Atoms'].append(atomlist) … … 316 356 self.Phase['General']['Name'] = name.strip()[:20] 317 357 self.Phase['General']['Super'] = Super 358 if magnetic: 359 self.Phase['General']['Type'] = 'magnetic' 318 360 if Super: 319 361 self.Phase['General']['Type'] = 'modulated'
Note: See TracChangeset
for help on using the changeset viewer.