# Changeset 3591

Ignore:
Timestamp:
Sep 11, 2018 4:13:58 PM (5 years ago)
Message:

work on FindNonstandard? for mag space groups
enhance UseMagAtomDialog? to show mag site symmetry

Location:
trunk
Files:
4 edited

Unmodified
Removed
• ## trunk/GSASIIlattice.py

 r3590 cba = np.rot90(np.eye(3)) cba[0,2] *= -1      #makes -cba Mats = {'abc':abc,'cab':np.roll(abc,2,1),'bca':np.roll(abc,1,1), 'acb':np.roll(cba,1,1),'bac':np.roll(cba,2,1),'cba':cba} BNS = {'A':{'abc':'A','cab':'C','bca':'B','acb':'B','bac':'C','cba':'A'}, Mats = {'abc':abc,'cab':np.roll(abc,1,1),'bca':np.roll(abc,2,1), 'acb':np.roll(cba,1,1),'bac':np.roll(cba,2,1),'cba':cba}        #ok BNS = {'A':{'abc':'A','cab':'C','bca':'B','acb':'A','bac':'B','cba':'C'}, 'B':{'abc':'B','cab':'A','bca':'C','acb':'C','bac':'A','cba':'B'}, 'C':{'abc':'C','cab':'B','bca':'A','acb':'A','bac':'B','cba':'C'}, 'a':{'abc':'a','cab':'c','bca':'b','acb':'b','bac':'c','cba':'a'}, 'C':{'abc':'C','cab':'B','bca':'A','acb':'B','bac':'C','cba':'A'}, 'a':{'abc':'a','cab':'c','bca':'b','acb':'a','bac':'b','cba':'c'},   #Ok 'b':{'abc':'b','cab':'a','bca':'c','acb':'c','bac':'a','cba':'b'}, 'c':{'abc':'c','cab':'b','bca':'a','acb':'a','bac':'b','cba':'c'}, 'c':{'abc':'c','cab':'b','bca':'a','acb':'b','bac':'c','cba':'a'}, 'S':{'abc':'S','cab':'S','bca':'S','acb':'S','bac':'S','cba':'S'}, } Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb'} Trans = Phase['Trans'] Uvec = Phase['Uvec'] spn = SGData['SGSpin'] if 'ortho' in SGData['SGSys']: #        transText = G2spc.Trans2Text(nl.inv(Trans.T)) transText = G2spc.Trans2Text(Trans.T) lattSym = '' for fld in transText.split(','): if 'a' in fld: lattSym += 'a' if 'b' in fld: lattSym += 'b' if 'c' in fld: lattSym += 'c' if len(lattSym) == 5: print(transText,lattSym) lattSym = Fives[lattSym] #            return None lattSym = G2spc.getlattSym(Trans) SpGrp = SGData['SpGrp'] NUvec = np.inner(np.abs(Mats[lattSym]),Uvec) NTrans = np.inner(Mats[lattSym],Trans.T) spn[1:4] = np.inner(Mats[lattSym],spn[1:4]) if lattSym != 'abc' and SpGrp in G2spc.altSettingOrtho: NSG = G2spc.altSettingOrtho[SpGrp].get(lattSym,SpGrp).replace("'",'').split(' ') NUvec = np.inner(Uvec,Mats[lattSym])    #ok NTrans = np.inner(Mats[lattSym],Trans.T)        #ok spn[1:4] = np.inner(np.abs(Mats[lattSym]),spn[1:4])         #ok SGsym = G2spc.getlattSym(Mats[lattSym]) if lattSym != 'abc': NSG = G2spc.altSettingOrtho[SpGrp].get(SGsym,SpGrp).replace("'",'').split(' ') Bns = '' if bns:
• ## trunk/GSASIIphsGUI.py

 r3590 self.panel = wx.Panel(self) Indx = {} Mstr = [' Mx ',' My ',' Mz '] Mstr = [' Mx',' My',' Mz'] mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(wx.StaticText(self.panel,label='        Name, x, y, z, allowed moments:'),0,WACV) mainSizer.Add(wx.StaticText(self.panel,label='        Name, x, y, z, allowed moments, mag. site sym:'),0,WACV) atmSizer = wx.FlexGridSizer(0,2,5,5) for iuse,[use,atom,mxyz] in enumerate(zip(self.Use,self.Atoms,self.atMxyz)): mstr = [' __ ',' __ ',' __ '] for i,mx in enumerate(mxyz): mstr = [' ---',' ---',' ---'] for i,mx in enumerate(mxyz[1]): if mx: mstr[i] = Mstr[i] useChk.Bind(wx.EVT_CHECKBOX, OnUseChk) atmSizer.Add(useChk,0,WACV) text = '  %5s %10.5f %10.5f %10.5f %4s %4s %4s   '%(atom[0],atom[3],atom[4],atom[5],mstr[0],mstr[1],mstr[2]) text = '  %5s %10.5f %10.5f %10.5f (%s,%s,%s) %s   '%(atom[0],atom[3],atom[4],atom[5],mstr[0],mstr[1],mstr[2],mxyz[0]) atmSizer.Add(wx.StaticText(self.panel,label=text),0,WACV) mainSizer.Add(atmSizer) SytSym,Mul,Nop,dupDir = G2spc.SytSym(atom[3:6],SGData) CSI = G2spc.GetCSpqinel(SGData['SpnFlp'],dupDir) atMxyz.append(CSI[0]) MagSytSym = G2spc.MagSytSym(SytSym,dupDir,SGData) atMxyz.append([MagSytSym,CSI[0]]) dlg = UseMagAtomDialog(G2frame,SGData['MagSpGrp'],Atoms,atCodes,atMxyz,ifDelete=False) try: if dlg.ShowModal() == wx.ID_YES: opt = dlg.ShowModal() if  opt == wx.ID_YES: newPhase['Atoms'],atCodes = dlg.GetSelection() generalData['Lande g'] = len(generalData['AtomTypes'])*[2.,] break else: return finally: dlg.Destroy() Atms.append(atom) AtCods.append(atCodes[ia]) atMxyz.append(CSI[0]) MagSytSym = G2spc.MagSytSym(SytSym,dupDir,SGData) atMxyz.append([MagSytSym,CSI[0]]) dlg = UseMagAtomDialog(G2frame,magchoice['Name'],Atms,AtCods,atMxyz,ifDelete=True) try:
• ## trunk/GSASIIpwdGUI.py

 r3590 xyzs = G2spc.GenAtom(matm[3:6],SGData,False,Move=True) for x in xyzs: #                        xyz = np.inner((x[0]-Uvec),invTrans.T) xyz = G2lat.TransformXYZ(x[0]-Uvec,invTrans.T,np.zeros(3))%1. SytSym,Mul,Nop,dupDir = G2spc.SytSym(xyz,phase['SGData'])
• ## trunk/GSASIIspc.py

 r3589 Text = Text.replace('1.0','').replace('.0','').replace('0.5','1/2') return Text[:-1] def getlattSym(Trans): Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb'} transText = Trans2Text(Trans) lattSym = '' for fld in transText.split(','): if 'a' in fld: lattSym += 'a' if 'b' in fld: lattSym += 'b' if 'c' in fld: lattSym += 'c' if len(lattSym) == 5: lattSym = Fives[lattSym] return lattSym def Text2MT(mcifOpr,CIF=True):
Note: See TracChangeset for help on using the changeset viewer.