# Changeset 4254

Ignore:
Timestamp:
Jan 17, 2020 8:41:23 AM (4 years ago)
Message:

Location:
trunk
Files:
4 edited

Unmodified
Removed
• ## trunk/GSASIIElem.py

 r3786 El['cmpb'] = Cmp5[6:] return El def GetBVS(Pair,atSeq,Valences): Els = Pair.strip().split('-') iAt = atSeq.index(Els[0]) jAt = atSeq.index(Els[1]) iVal = Valences[iAt][0] if Els[1] in ['O','F','Cl']: iEls = ['O','F','Cl'].index(Els[1]) if iVal in atmdata.BVScoeff: return atmdata.BVScoeff[iVal][iEls] else: return 0.0 elif Els[1] in ['Br','I','S','Se','Te','N','P','As','H','D']: iEls = ['Br','I','S','Se','Te','N','P','As','H','D'].index(Els[1]) if Els[0] in atmdata.BVSnotOFCl: return atmdata.BVSnotOFCl[Els[0]][iEls] else: return 0.0 else: return 0.0 def CheckElement(El):
• ## trunk/GSASIIphsGUI.py

 r4253 import numpy as np import numpy.linalg as nl import atmdata try: aTypes = dict(zip(Atypes,len(Atypes)*[0.10,])) atSeq = list(aTypes.keys()) atOxid = [[atmdata.BVSoxid[atm][0],0.001] for atm in atSeq] lenA = len(atSeq) Pairs= [] Pairs += pair Pairs = {pairs:[0.0,0.0,0.0] for pairs in Pairs} BVSpairs = [] if lenA > 1: for pair in [[' %s-%s'%(atSeq[i],atSeq[j]) for j in range(i+1,lenA)] for i in range(lenA)]: BVSpairs += pair BVS = {pairs:[0.0,0.0,0.0,0.0] for pairs in BVSpairs} files = {'Neutron real space data; G(r): ':['',0.05,'G(r)','RMC',], 'Neutron reciprocal space data; F(Q): ':['',0.05,'F(Q)','RMC',], Phase['RMC']['RMCProfile'] = {'SuperCell':[1,1,1],'UseSampBrd':[True,True],'aTypes':aTypes, 'atSeq':atSeq,'Pairs':Pairs,'histogram':['',1.0],'files':files,'metadata':metadata, 'runTimes':runTimes,'ReStart':False} 'runTimes':runTimes,'ReStart':False,'BVS':BVS,'Oxid':atOxid,'useBVS':False, 'AveCN':[],'FxCN':[]} self.RMCPdict = Phase['RMC']['RMCProfile'] self.Phase = Phase Obj = event.GetEventObject() itype = Indx[Obj.GetId()] tid = Obj.GetSelection() if itype < nTypes-1: tid = self.RMCPdict['atSeq'].index(Obj.GetStringSelection()) if itype < nTypes: if itype == tid: tid += 1 wx.CallAfter(self.Draw) def OnValSel(event): Obj = event.GetEventObject() itype = Indx[Obj.GetId()] self.RMCPdict['Oxid'][itype][0] = Obj.GetStringSelection() wx.CallAfter(self.Draw) def OnSize(event): self.RMCPdict['UseSampBrd'][0] = samSize.GetValue() dlg.Destroy() return self.Draw() wx.CallAfter(self.Draw) def OnFileFormat(event): self.RMCPdict['ReStart'] = True self.OKBtn.SetLabel('Restart') def OnUseBVS(event): self.RMCPdict['useBVS'] = not self.RMCPdict['useBVS'] wx.CallAfter(self.Draw) def OnResetBVS(event): Obj = event.GetEventObject() pair = Indx[Obj.GetId()] pId = [key for key in self.RMCPdict['BVS']].index(pair)+1 nId = len(self.RMCPdict['BVS'])+1 dist = G2elem.GetBVS(pair,self.RMCPdict['atSeq'],self.RMCPdict['Oxid']) if dist: self.RMCPdict['BVS'][pair] = [dist,0.37,3.0] bvsCh = bvsSizer.GetChildren() addr = 2*nId+pId bvsCh[addr].Window.SetValue('%6.3f'%dist) bvsCh[addr+nId].Window.SetValue('0.37') bvsCh[addr+2*nId].Window.SetValue('3.00') def OnAddFxCN(event): self.RMCPdict['FxCN'].append(['','',0.0,2.0,6,1.0,0.001]) wx.CallAfter(self.Draw) def OnDelFxCN(event): Obj = event.GetEventObject() fxCN = Indx[Obj.GetId()] del self.RMCPdict['FxCN'][fxCN] wx.CallAfter(self.Draw) def OnFxcnAtSel(event): Obj = event.GetEventObject() ifxCN,i = Indx[Obj.GetId()] self.RMCPdict['FxCN'][ifxCN][i] = Obj.GetStringSelection() def OnAddAveCN(event): self.RMCPdict['AveCN'].append(['','',0.0,2.0,6.,0.001]) wx.CallAfter(self.Draw) def OnDelAvCN(event): Obj = event.GetEventObject() fxCN = Indx[Obj.GetId()] del self.RMCPdict['AveCN'][fxCN] wx.CallAfter(self.Draw) def OnAvcnAtSel(event): Obj = event.GetEventObject() ifxCN,i = Indx[Obj.GetId()] self.RMCPdict['AveCN'][ifxCN][i] = Obj.GetStringSelection() Indx = {} #patches if 'runTimes' not in self.RMCPdict: self.RMCPdict['runTimes'] = [10.0,1.0] lenA = len(self.RMCPdict['atSeq']) if 'Oxid' not in self.RMCPdict: self.RMCPdict['Oxid'] = [[atmdata.BVSoxid[atm][0],0.001] for atm in self.RMCPdict['atSeq']] Pairs= [] for pair in [[' %s-%s'%(self.RMCPdict['atSeq'][i],self.RMCPdict['atSeq'][j]) for j in range(i,lenA)] for i in range(lenA)]: Pairs += pair self.RMCPdict['Pairs'] = dict(zip(Pairs,[self.RMCPdict['Pairs'].get(pair,[0.0,0.0,0.0]) for pair in Pairs])) BVSpairs = [] if 'BVS' not in self.RMCPdict: self.RMCPdict['useBVS'] = False self.RMCPdict['BVS'] = {} if lenA > 1: for pair in [[' %s-%s'%(self.RMCPdict['atSeq'][i],self.RMCPdict['atSeq'][j]) for j in range(i+1,lenA)] for i in range(lenA)]: BVSpairs += pair self.RMCPdict['BVS'] = dict(zip(BVSpairs,[self.RMCPdict['BVS'].get(pair,[0.0,0.0,0.0]) for pair in BVSpairs])) if 'FxCN' not in self.RMCPdict: self.RMCPdict.update({'AveCN':[],'FxCN':[]}) #end patches self.panel.Destroy() self.panel = wxscroll.ScrolledPanel(self,style = wx.DEFAULT_DIALOG_STYLE,size=(700,500)) metaSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['metadata'],item),0,WACV) mainSizer.Add(metaSizer,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) timeSizer = wx.BoxSizer(wx.HORIZONTAL) timeSizer.Add(wx.StaticText(self.panel,label=' Total running time (min): '),0,WACV) timeSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['runTimes'],1,min=0.1,max=20.),0,WACV) mainSizer.Add(timeSizer,0,WACV) mainSizer.Add(wx.StaticText(self.panel,label=' Lattice multipliers; if changed will force restart of RMCProfile:'),0,WACV) mainSizer.Add(wx.StaticText(self.panel,label=' Lattice multipliers; if changed will force reset of atom positions:'),0,WACV) superSizer = wx.BoxSizer(wx.HORIZONTAL) axes = ['X','Y','Z'] superSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['SuperCell'],i,min=1,max=20,size=(50,25),OnLeave=SetRestart),0,WACV) mainSizer.Add(superSizer,0,WACV) mainSizer.Add(wx.StaticText(self.panel,label=' NB: be sure to set cations first && anions last in atom ordering'),0,WACV) nTypes = len(self.RMCPdict['aTypes']) atmChoice = wx.FlexGridSizer(nTypes+1,5,5) Indx[atmSel.GetId()] = iType atmChoice.Add(atmSel,0,WACV) if self.RMCPdict['useBVS']: atmChoice.Add(wx.StaticText(self.panel,label=' Select valence: '),0,WACV) for itype in range(nTypes): valChoice = atmdata.BVSoxid[self.RMCPdict['atSeq'][itype]] valSel = wx.ComboBox(self.panel,choices=valChoice,style=wx.CB_DROPDOWN|wx.TE_READONLY) valSel.SetStringSelection(self.RMCPdict['Oxid'][itype][0]) valSel.Bind(wx.EVT_COMBOBOX,OnValSel) Indx[valSel.GetId()] = itype atmChoice.Add(valSel,0,WACV) atmChoice.Add(wx.StaticText(self.panel,label=' BVS weight: '),0,WACV) for itype in range(nTypes): atmChoice.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['Oxid'][itype],1,min=0.),0,WACV) atmChoice.Add(wx.StaticText(self.panel,label=' Set max shift: '),0,WACV) for iType in range(nTypes): atmChoice.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['aTypes'],atId,min=0.,max=1.),0,WACV) mainSizer.Add(atmChoice,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) mainSizer.Add(wx.StaticText(self.panel,label=' Enter constraints && restraints:'),0,WACV) mainSizer.Add(wx.StaticText(self.panel,label=' Set minimum && maximum distances for:'),0,WACV) for pair in self.RMCPdict['Pairs']: pairSizer.Add(wx.StaticText(self.panel,label=pair),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label=' Hard min: '),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label='%14s'%' Hard min: '),0,WACV) for pair in self.RMCPdict['Pairs']: pairSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['Pairs'][pair],0,min=0.,max=10.,size=(50,25)),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label=' Search from: '),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label='%14s'%' Search from: '),0,WACV) for pair in self.RMCPdict['Pairs']: pairSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['Pairs'][pair],1,min=self.RMCPdict['Pairs'][pair][0],max=10.,size=(50,25)),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label='       to: '),0,WACV) pairSizer.Add(wx.StaticText(self.panel,label='%14s'%'to: '),0,WACV) for pair in self.RMCPdict['Pairs']: pairSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['Pairs'][pair],2,min=0.,max=10.,size=(50,25)),0,WACV) mainSizer.Add(pairSizer,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) useBVS = wx.CheckBox(self.panel,label=' Use bond valence sum restraints for (set to 0 for non-bonded ones):') useBVS.SetValue(self.RMCPdict.get('useBVS',False)) useBVS.Bind(wx.EVT_CHECKBOX,OnUseBVS) mainSizer.Add(useBVS,0,WACV) if self.RMCPdict.get('useBVS',False): bvsSizer = wx.FlexGridSizer(len(self.RMCPdict['BVS'])+1,5,5) bvsSizer.Add((5,5),0) for pair in self.RMCPdict['BVS']: bvsSizer.Add(wx.StaticText(self.panel,label=pair),0,WACV) bvsSizer.Add(wx.StaticText(self.panel,label=' Reset:'),0,WACV) for pair in self.RMCPdict['BVS']: reset = wx.Button(self.panel,label='Yes') bvsSizer.Add(reset,0,WACV) reset.Bind(wx.EVT_BUTTON,OnResetBVS) Indx[reset.GetId()] = pair bvsSizer.Add(wx.StaticText(self.panel,label=' Bond length:'),0,WACV) for pair in self.RMCPdict['BVS']: bvsSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['BVS'][pair],0,min=0.,max=10.,size=(50,25)),0,WACV) bvsSizer.Add(wx.StaticText(self.panel,label=' B constant (0.37): '),0,WACV) for pair in self.RMCPdict['BVS']: bvsSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['BVS'][pair],1,min=0.,max=10.,size=(50,25)),0,WACV) bvsSizer.Add(wx.StaticText(self.panel,label=' Cut off: '),0,WACV) for pair in self.RMCPdict['BVS']: bvsSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['BVS'][pair],2,min=0.,max=10.,size=(50,25)),0,WACV) mainSizer.Add(bvsSizer,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) fxcnBox = wx.BoxSizer(wx.HORIZONTAL) fxcnAdd = wx.Button(self.panel,label='Add') fxcnAdd.Bind(wx.EVT_BUTTON,OnAddFxCN) fxcnBox.Add(fxcnAdd,0,WACV) fxcnBox.Add(wx.StaticText(self.panel,label=' Fixed coordination number restraint: '),0,WACV) mainSizer.Add(fxcnBox,0,WACV) if len(self.RMCPdict['FxCN']): atChoice = self.RMCPdict['atSeq'] fxcnSizer = wx.FlexGridSizer(8,5,5) fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','fraction','weight'] for lab in fxcnLabels: fxcnSizer.Add(wx.StaticText(self.panel,label=lab),0,WACV) for ifx,fxCN in enumerate(self.RMCPdict['FxCN']): delBtn = wx.Button(self.panel,label='Delete') delBtn.Bind(wx.EVT_BUTTON,OnDelFxCN) Indx[delBtn.GetId()] = ifx fxcnSizer.Add(delBtn,0,WACV) for i in [0,1]: atmSel = wx.ComboBox(self.panel,choices=atChoice,style=wx.CB_DROPDOWN|wx.TE_READONLY) atmSel.SetStringSelection(fxCN[i]) atmSel.Bind(wx.EVT_COMBOBOX,OnFxcnAtSel) Indx[atmSel.GetId()] = [ifx,i] fxcnSizer.Add(atmSel,0,WACV) fxcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,2,min=0.,max=5.,size=(50,25)),0,WACV) fxcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,3,min=0.,max=5.,size=(50,25)),0,WACV) fxcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,4,min=1,max=12,size=(50,25)),0,WACV) fxcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,5,min=0.,max=1.,size=(50,25)),0,WACV) fxcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,6,min=0.,size=(50,25)),0,WACV) mainSizer.Add(fxcnSizer,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) avcnBox = wx.BoxSizer(wx.HORIZONTAL) avcnAdd = wx.Button(self.panel,label='Add') avcnAdd.Bind(wx.EVT_BUTTON,OnAddAveCN) avcnBox.Add(avcnAdd,0,WACV) avcnBox.Add(wx.StaticText(self.panel,label=' Average coordination number restraint: '),0,WACV) mainSizer.Add(avcnBox,0,WACV) if len(self.RMCPdict['AveCN']): atChoice = self.RMCPdict['atSeq'] avcnSizer = wx.FlexGridSizer(7,5,5) fxcnLabels = [' ','Atom-1','Atom-2','min dist','max dist','CN','weight'] for lab in fxcnLabels: avcnSizer.Add(wx.StaticText(self.panel,label=lab),0,WACV) for ifx,fxCN in enumerate(self.RMCPdict['FxCN']): delBtn = wx.Button(self.panel,label='Delete') delBtn.Bind(wx.EVT_BUTTON,OnDelAvCN) Indx[delBtn.GetId()] = ifx avcnSizer.Add(delBtn,0,WACV) for i in [0,1]: atmSel = wx.ComboBox(self.panel,choices=atChoice,style=wx.CB_DROPDOWN|wx.TE_READONLY) atmSel.SetStringSelection(fxCN[i]) atmSel.Bind(wx.EVT_COMBOBOX,OnAvcnAtSel) Indx[atmSel.GetId()] = [ifx,i] avcnSizer.Add(atmSel,0,WACV) avcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,2,min=0.,max=5.,size=(50,25)),0,WACV) avcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,3,min=0.,max=5.,size=(50,25)),0,WACV) avcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,4,min=1.,max=12.,size=(50,25)),0,WACV) avcnSizer.Add(G2G.ValidatedTxtCtrl(self.panel,fxCN,5,min=0.,size=(50,25)),0,WACV) mainSizer.Add(avcnSizer,0,WACV) G2G.HorizontalLine(mainSizer,self.panel) mainSizer.Add(wx.StaticText(self.panel,label=' Select data:'),0,WACV) histograms = self.Phase['Histograms'] title = ' Select data for processing:' mainSizer.Add(wx.StaticText(self.panel,label=title),0,WACV) fileSizer = wx.FlexGridSizer(5,5,5) fileSizer = wx.FlexGridSizer(4,5,5) Formats = ['RMC','GUDRUN','STOG'] Heads = [' ','Format','Weight','Name'] for head in Heads: fileSizer.Add(wx.StaticText(self.panel,label=head),0,WACV) for fil in self.RMCPdict['files']: filSel = wx.Button(self.panel,label='Select') fileSizer.Add(filSel,0,WACV) if self.RMCPdict['files'][fil][0]: fileSizer.Add(wx.StaticText(self.panel,label=' Format, Weight: '),0,WACV) nform = 3 if 'Xray' in fil: nform = 1 fileSizer.Add(fileFormat,0,WACV) fileSizer.Add(G2G.ValidatedTxtCtrl(self.panel,self.RMCPdict['files'][fil],1),0,WACV) fileSizer.Add(wx.StaticText(self.panel,label=fil+self.RMCPdict['files'][fil][0]),0,WACV) if not self.RMCPdict['files'][fil][0]: fileSizer.Add((5,5),0) fileSizer.Add((5,5),0) fileSizer.Add((5,5),0) fileSizer.Add(wx.StaticText(self.panel,label=fil+self.RMCPdict['files'][fil][0]),0,WACV) mainSizer.Add(fileSizer,0,WACV) G2frame.runtext.SetValue(rundata) else: G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,True) dlg = SetUpRMCProfileDialog(G2frame,Name=pName,Phase=data) if dlg.ShowModal() == wx.ID_OK: if backfile is None: print(' Chebyschev-1 background not used; no .back file written') wx.MessageDialog(G2frame,' Chebyschev-1 background not used; '+ \ 'no .back file written & RMCProfile will not run','Wrong background function',wx.OK).ShowModal() G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,False) return else: print(backfile+ ' written') print(G2pwd.MakeBragg(G2frame,pName,data,PWId)+ ' written') if RMCPdict.get('ReStart',False): print(G2pwd.MakeRMC6f(G2frame,pName,data,RMCPdict['metadata'],RMCPdict['atSeq'], RMCPdict['SuperCell'],PWId)+ ' written') print(G2pwd.MakeRMCPdat(G2frame,pName,data,RMCPdict['metadata'],RMCPdict['runTimes'],RMCPdict['atSeq'], RMCPdict['aTypes'],RMCPdict['Pairs'],RMCPdict['SuperCell'],RMCPdict['files'],PWId,RMCPdict['histogram'][1])+ ' written') print(G2pwd.MakeRMC6f(G2frame,pName,data,RMCPdict,PWId)+ ' written') print(G2pwd.MakeRMCPdat(G2frame,pName,data,RMCPdict,PWId)+ ' written') print('RMCProfile file build completed') RMCPdict['ReStart'] = False else: print('RMCProfile file build failed - no histogram selected') G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,False) else: pass else: generalData = data['General'] RMCPdict = data['RMC']['RMCProfile'] pName = generalData['Name'].replace(' ','_') dlg = wx.FileDialog(G2frame, "Choose any RMCProfile csv results file for "+pName+":", labelY=Labels[label][1],newPlot=True,Title=Labels[label][2]+pName, lines=True,names=Names[1:]) print(' %s scale Ycalc/Yobs: %.4f'%(label,np.sum(Ycalc[1])/np.sum(Yobs[1]))) RMCPdict[pName+label] = np.sum(Ycalc[1])/np.sum(Yobs[1]) print(' %s scale Ycalc/Yobs: %.4f'%(label,RMCPdict[pName+label])) #partials plots Labels = {'_PDFpartials.csv':[r'$\mathsf{R,\AA}$','G(R)','RMCP G(R) partials for '], labelY=r'$\mathsf{\chi^2}$',newPlot=True,Title='RMCP Chi^2 for '+pName, lines=True,names=Names[3:]) UpdateRMC() ################################################################################
• ## trunk/GSASIIpwd.py

 r4253 return fname def MakeRMC6f(G2frame,Name,Phase,Meta,Atseq,Supercell,PWId): def MakeRMC6f(G2frame,Name,Phase,RMCPdict,PWId): Meta = RMCPdict['metadata'] Atseq = RMCPdict['atSeq'] Supercell =  RMCPdict['SuperCell'] PWDdata = G2frame.GetPWDRdatafromTree(PWId) generalData = Phase['General'] return fname def MakeRMCPdat(G2frame,Name,Phase,Meta,Times,Atseq,Atypes,atPairs,Supercell,Files,PWId,BraggWt): def MakeRMCPdat(G2frame,Name,Phase,RMCPdict,PWId): Meta = RMCPdict['metadata'] Times = RMCPdict['runTimes'] Atseq = RMCPdict['atSeq'] Atypes = RMCPdict['aTypes'] atPairs = RMCPdict['Pairs'] Files = RMCPdict['files'] BraggWt = RMCPdict['histogram'][1] PWDdata = G2frame.GetPWDRdatafromTree(PWId) inst = PWDdata['Instrument Parameters'][0] fl.write('  > MNDIST :: %s\n'%minD) fl.write('  > MXDIST :: %s\n'%maxD) if RMCPdict['useBVS']: fl.write('BVS ::\n') fl.write('  > ATOM :: '+' '.join(Atseq)+'\n') fl.write('  > WEIGHTS :: %s\n'%' '.join(['%6.3f'%RMCPdict['BVS'][bvs][2] for bvs in RMCPdict['BVS']])) oxid = [] for val in RMCPdict['Oxid']: if len(val) == 3: oxid.append(val[0][1:]) else: oxid.append(val[0][2:]) fl.write('  > OXID :: %s\n'%' '.join(oxid)) fl.write('  > RIJ :: %s\n'%' '.join(['%6.3f'%RMCPdict['BVS'][bvs][0] for bvs in RMCPdict['BVS']])) fl.write('  > BVAL :: %s\n'%' '.join(['%6.3f'%RMCPdict['BVS'][bvs][1] for bvs in RMCPdict['BVS']])) fl.write('  > CUTOFF :: %s\n'%' '.join(['%6.3f'%RMCPdict['BVS'][bvs][3] for bvs in RMCPdict['BVS']])) fl.write('  > SAVE :: 100000\n') fl.write('  > UPDATE :: 100000\n') for ifx,fxcn in enumerate(RMCPdict['FxCN']): try: at1 = Atseq.index(fxcn[0]) at2 = Atseq.index(fxcn[1]) except ValueError: break fl.write('CSTR%d :: %d %d %.2f %.2f %d %.2d %.6f\n'%(ifx+1,at1,at2,fxcn[2],fxcn[3],fxcn[4],fxcn[5],fxcn[6])) for iav,avcn in enumerate(RMCPdict['AveCN']): try: at1 = Atseq.index(avcn[0]) at2 = Atseq.index(avcn[1]) except ValueError: break fl.write('CAVSTR%d :: %d %d %.2f %.2f %d %.2d %.6f\n'%(iav+1,at1,at2,avcn[2],avcn[3],avcn[4],avcn[5])) for File in Files: if Files[File][0]: fl.write('  > NO_FITTED_SCALE\n') if 'Xray' in File: fl.write('  > RECIPROCAL_SPACE_FIT :: 1 3000 1\n') fl.write('  > RECIPROCAL_SPACE_PARAMETERS :: 1 3000 %.4f\n'%Files[File][1]) fl.write('  > REAL_SPACE_FIT :: 1 3000 1\n') fl.write('  > REAL_SPACE_PARAMETERS :: 1 3000 %.4f\n'%Files[File][1])
• ## trunk/atmdata.py

 r4197 'Bk':[2.20,  2.00, 1.70, 0], 'Cf':[2.20,  2.00, 1.70, 0], } # Bond valence coefficients for X-O, X-F & X-Cl Taken from Brese and O'Keefe, Acta Cryst B, 47, 192-197 (1991). BVSoxid = { 'Ac':['Ac+3',], 'Ag':['Ag+1',], 'Al':['Al+3',], 'Am':['Am+3',], 'As':['As+5','As+3','As-3',], 'Au':['Au+3',], 'B' :['B+3',], 'Ba':['Ba+2',], 'Be':['Be+2',], 'Bi':['Bi+5','Bi+3',], 'Bk':['Bk+3',], 'Br':['Br-1','Br+7',], 'C' :['C+4',], 'Ca':['Ca+2',], 'Cd':['Cd+2',], 'Ce':['Ce+4','Ce+3',], 'Cf':['Cf+3',], 'Cl':['Cl-1','Cl+7',], 'Cm':['Cm+3',], 'Co':['Co+2','Co+3',], 'Cr':['Cr+2','Cr+3','Cr+6',], 'Cs':['Cs+1',], 'Cu':['Cu+1','Cu+2',], 'Dy':['Dy+3',], 'Er':['Er+3',], 'Eu':['Eu+2','Eu+3',], 'F' :['F-1',], 'Fe':['Fe+2','Fe+3',], 'Ga':['Ga+3',], 'Gd':['Gd+3',], 'Ge':['Ge+4',], 'H' :['H+1','H-1',], 'D' :['D+1','D-1',], 'Hf':['Hf+4',], 'Hg':['Hg+1','Hg+2',], 'Ho':['Ho+3',], 'I' :['I-1','I+5','I+7',], 'In':['In+3',], 'Ir':['Ir+5',], 'K' :['K+1',], 'La':['La+3',], 'Li':['Li+1',], 'Lu':['Lu+3',], 'Mg':['Mg+2',], 'Mn':['Mn+2','Mn+3',',Mn+4','Mn+7',], 'Mo':['Mo+6',], 'N' :['N+5','N+3','N-3',], 'Na':['Na+1',], 'Nb':['Nb+5',], 'Nd':['Nd+3',], 'Ni':['Ni+2',], 'O' :['O-2',], 'Os':['Os+4',], 'P' :['P+5','P-3',], 'Pb':['Pb+2','Pb+4',], 'Pd':['Pd+2',], 'Pr':['Pr+3',], 'Pt':['Pt+2','Pt+4',], 'Pu':['Pu+3',], 'Rb':['Rb+1',], 'Re':['Re+7',], 'Rh':['Rh+3',], 'Ru':['Ru+4',], 'S' :['S+6','S+4','S-2',], 'Sb':['Sb+3','Sb+5',], 'Sc':['Sc+3',], 'Se':['Se+6','Se+4','Se-2',], 'Si':['Si+4',], 'Sm':['Sm+3',], 'Sn':['Sn+2','Sn+4',], 'Sr':['Sr+2',], 'Ta':['Ta+5',], 'Tb':['Tb+3',], 'Te':['Te+6','Te+4','Te-2',], 'Th':['Th+4',], 'Ti':['Ti+4','Ti+3',], 'Tl':['Tl+3','Tl+5',], 'Tm':['Tm+3',], 'U' :['U+4','U+6',], 'V': ['V+5','V+4','V+3',], 'W' :['W+6',], 'Y' :['Y+3',], 'Yb':['Yb+3',], 'Zn':['Zn+2',], 'Zr':['Zr+4'], } BVScoeff = { 'Ac+3':[ 2.24,  2.13,  2.63], 'Ag+1':[ 1.805, 1.80,  2.09], 'Al+3':[ 1.651, 1.545, 2.03], 'Am+3':[ 2.11,  2.00,  2.48], 'As+3':[ 1.789, 1.70,  2.16], 'As+5':[ 1.767, 1.62,  2.14], 'Au+3':[ 1.833, 1.81,  2.17], 'B+3':[  1.371, 1.31,  1.74], 'Ba+2':[ 2.29,  2.19,  2.69], 'Be+2':[ 1.381, 1.28,  1.76], 'Bi+3':[ 2.09,  1.99,  2.48], 'Bi+5':[ 2.06,  1.97,  2.44], 'Bk+3':[ 2.08,  1.96,  2.46], 'Br+7':[ 1.81,  1.72,  2.19], 'C+4':[  1.39,  1.32,  1.76], 'Ca+2':[ 1.967, 1.842, 2.37], 'Cd+2':[ 1.904, 1.811, 2.23], 'Ce+3':[ 2.151, 2.036, 2.52], 'Ce+4':[ 2.028, 1.995, 2.41], 'Cf+3':[ 2.07,  1.95,  2.45], 'Cl+7':[ 1.632, 1.55,  2.00], 'Cm+3':[ 2.23,  2.12,  2.62], 'Co+2':[ 1.692, 1.64,  2.01], 'Co+3':[ 1.70,  1.62,  2.05], 'Cr+2':[ 1.73,  1.67,  2.09], 'Cr+3':[ 1.724, 1.64,  2.08], 'Cr+6':[ 1.794, 1.74,  2.12], 'Cs+1':[ 2.42,  2.33,  2.79], 'Cu+1':[ 1.593, 1.60,  1.85], 'Cu+2':[ 1.679, 1.60,  2.00], 'Dy+3':[ 2.036, 1.922, 2.41], 'Er+3':[ 2.01,  1.906, 2.39], 'Eu+2':[ 2.147, 2.04,  2.53], 'Eu+3':[ 2.076, 1.961, 2.455], 'Fe+2':[ 1.734, 1.65,  2.06], 'Fe+3':[ 1.759, 1.67,  2.09], 'Ga+3':[ 1.73,  1.62,  2.07], 'Gd+3':[ 2.065, 1.95,  2.445], 'Ge+4':[ 1.748, 1.66,  2.14], 'H+1':[  0.95,  0.92,  1.28], 'Hf+4':[ 1.923, 1.85,  2.30], 'Hg+1':[ 1.90,  1.81,  2.28], 'Hg+2':[ 1.93,  1.90,  2.25], 'Ho+3':[ 2.023, 1.908, 2.401], 'I+5':[  2.00,  1.90,  2.38], 'I+7':[  1.93,  1.83,  2.31], 'In+3':[ 1.902, 1.79,  2.28], 'Ir+5':[ 1.916, 1.82,  2.30], 'K+1':[  2.13,  1.99,  2.52], 'La+3':[ 2.172, 2.057, 2.545], 'Li+1':[ 1.466, 1.36,  1.91], 'Lu+3':[ 1.971, 1.876, 2.361], 'Mg+2':[ 1.693, 1.581, 2.08], 'Mn+2':[ 1.79,  1.698, 2.13], 'Mn+3':[ 1.76,  1.66,  2.14], 'Mn+4':[ 1.753, 1.71,  2.13], 'Mn+7':[ 1.79,  1.72,  2.17], 'Mo+6':[ 1.907, 1.81,  2.28], 'N+3':[  1.361, 1.37,  1.75], 'N+5':[  1.432, 1.36,  1.8], 'Na+1':[ 1.8,   1.677, 2.15], 'Nb+5':[ 1.911, 1.87,  2.27], 'Nd+3':[ 2.117, 2.008, 2.492], 'Ni+2':[ 1.654, 1.599, 2.02], 'Os+4':[ 1.811, 1.72,  2.19], 'P+5':[  1.604, 1.521, 1.99], 'Pb+2':[ 2.112, 2.03,  2.53], 'Pb+4':[ 2.042, 1.94,  2.43], 'Pd+2':[ 1.792, 1.74,  2.05], 'Pr+3':[ 2.135, 2.022, 2.5], 'Pt+2':[ 1.768, 1.68,  2.05], 'Pt+4':[ 1.879, 1.759, 2.17], 'Pu+3':[ 2.11,  2.0,   2.48], 'Rb+1':[ 2.26,  2.16,  2.65], 'Re+7':[ 1.97,  1.86,  2.23], 'Rh+3':[ 1.791, 1.71,  2.17], 'Ru+4':[ 1.834, 1.74,  2.21], 'S+4':[  1.644, 1.6,   2.02], 'S+6':[  1.624, 1.56,  2.03], 'Sb+3':[ 1.973, 1.9,   2.35], 'Sb+5':[ 1.942, 1.8,   2.3], 'Sc+3':[ 1.849, 1.76,  2.23], 'Se+4':[ 1.811, 1.73,  2.22], 'Se+6':[ 1.788, 1.69,  2.16], 'Si+4':[ 1.624, 1.58,  2.03], 'Sm+3':[ 2.088, 1.977, 2.466], 'Sn+2':[ 1.984, 1.925, 2.36], 'Sn+4':[ 1.905, 1.84,  2.28], 'Sr+2':[ 2.118, 2.019, 2.51], 'Ta+5':[ 1.92,  1.88,  2.3], 'Tb+3':[ 2.049, 1.936, 2.427], 'Te+4':[ 1.977, 1.87,  2.37], 'Te+6':[ 1.917, 1.82,  2.3], 'Th+4':[ 2.167, 2.07,  2.55], 'Ti+3':[ 1.791, 1.723, 2.17], 'Ti+4':[ 1.815, 1.76,  2.19], 'Tl+1':[ 2.172, 2.15,  2.56], 'Tl+3':[ 2.003, 1.88,  2.32], 'Tm+3':[ 2.0,   1.842, 2.38], 'U+4':[  2.112, 2.034, 2.48], 'U+6':[  2.075, 1.966, 2.46], 'V+3':[  1.743, 1.702, 2.19], 'V+4':[  1.784, 1.7,   2.16], 'V+5':[  1.803, 1.71,  2.16], 'W+6':[  1.921, 1.83,  2.27], 'Y+3':[  2.014, 1.904, 2.4], 'Yb+3':[ 1.985, 1.875, 2.371], 'Zn+2':[ 1.704, 1.62,  2.01], 'Zr+4':[ 1.937, 1.854, 2.33], } #for X-Br-1 I-1 S-2 Se-2 Te-2 N-3 P-3 As-3 H-1 D-1 BVSnotOFCl = { 'Ag':[ 2.22, 2.38, 2.15, 2.26, 2.51, 1.85, 2.22, 2.30, 1.50, 1.50], 'Al':[ 2.20, 2.41, 2.13, 2.27, 2.48, 1.79, 2.24, 2.32, 1.45, 1.45], 'As':[ 2.32, 2.54, 2.26, 2.39, 2.61, 1.93, 2.34, 2.41, 1.56, 1.56], 'Au':[ 2.12, 2.34, 2.03, 2.18, 2.41, 1.72, 2.14, 2.22, 1.37, 1.37], 'B' :[ 1.88, 2.10, 1.82, 1.95, 2.20, 1.47, 1.88, 1.97, 1.14, 1.14], 'Ba':[ 2.88, 3.13, 2.77, 2.88, 3.08, 2.47, 2.88, 2.96, 2.22, 2.22], 'Be':[ 1.90, 2.10, 1.83, 1.97, 2.21, 1.50, 1.95, 2.00, 1.11, 1.11], 'Bi':[ 2.62, 2.84, 2.55, 2.72, 2.87, 2.24, 2.63, 2.72, 1.97, 1.97], 'C': [ 1.90, 2.12, 1.82, 1.97, 2.21, 1.47, 1.89, 1.99, 1.10, 1.10], 'Ca':[ 2.49, 2.72, 2.45, 2.56, 2.76, 2.14, 2.55, 2.62, 1.83, 1.83], 'Cd':[ 2.35, 2.57, 2.29, 2.40, 2.59, 1.96, 2.34, 2.43, 1.66, 1.66], 'Ce':[ 2.69, 2.92, 2.62, 2.74, 2.92, 2.34, 2.70, 2.78, 2.04, 2.04], 'Co':[ 2.18, 2.37, 2.06, 2.24, 2.46, 1.84, 2.21, 2.28, 1.44, 1.44], 'Cr':[ 2.26, 2.45, 2.18, 2.29, 2.52, 1.85, 2.27, 2.34, 1.52, 1.52], 'Cs':[ 2.95, 3.18, 2.89, 2.98, 3.16, 2.53, 2.93, 3.04, 2.44, 2.44], 'Cu':[ 1.99, 2.16, 1.86, 2.02, 2.27, 1.61, 1.97, 2.08, 1.21, 1.21], 'Dy':[ 2.56, 2.77, 2.47, 2.61, 2.80, 2.18, 2.57, 2.64, 1.89, 1.89], 'Er':[ 2.54, 2.75, 2.46, 2.59, 2.78, 2.16, 2.55, 2.63, 1.86, 1.86], 'Eu':[ 2.61, 2.83, 2.53, 2.66, 2.85, 2.24, 2.62, 2.70, 1.95, 1.95], 'Fe':[ 2.26, 2.47, 2.16, 2.28, 2.53, 1.86, 2.27, 2.35, 1.53, 1.53], 'Ga':[ 2.24, 2.45, 2.17, 2.30, 2.54, 1.84, 2.26, 2.34, 1.51, 1.51], 'Gd':[ 2.60, 2.82, 2.53, 2.65, 2.84, 2.22, 2.61, 2.68, 1.93, 1.93], 'Ge':[ 2.30, 2.50, 2.22, 2.35, 2.56, 1.88, 2.32, 2.43, 1.55, 1.55], 'H': [ 1.42, 1.61, 1.35, 1.48, 1.78, 1.03, 1.48, 1.52, 0.74, 0.74], 'Hf':[ 2.47, 2.68, 2.39, 2.52, 2.72, 2.09, 2.48, 2.56, 1.78, 1.78], 'Hg':[ 2.40, 2.59, 2.32, 2.47, 2.61, 2.02, 2.42, 2.50, 1.71, 1.71], 'Ho':[ 2.55, 2.77, 2.48, 2.61, 2.80, 2.18, 2.56, 2.64, 1.88, 1.88], 'In':[ 2.41, 2.63, 2.36, 2.47, 2.69, 2.03, 2.43, 2.51, 1.72, 1.72], 'Ir':[ 2.45, 2.66, 2.38, 2.51, 2.71, 2.06, 2.46, 2.54, 1.76, 1.76], 'K': [ 2.66, 2.88, 2.59, 2.72, 2.93, 2.26, 2.64, 2.83, 2.10, 2.10], 'La':[ 2.72, 2.93, 2.64, 2.74, 2.94, 2.34, 2.73, 2.80, 2.06, 2.06], 'Li':[ 2.02, 2.22, 1.94, 2.09, 2.30, 1.61, 2.04, 2.11, 1.31, 1.31], 'Lu':[ 2.50, 2.72, 2.43, 2.56, 2.75, 2.11, 2.51, 2.59, 1.82, 1.82], 'Mg':[ 2.28, 2.46, 2.18, 2.32, 2.53, 1.85, 2.29, 2.38, 1.53, 1.53], 'Mn':[ 2.26, 2.49, 2.20, 2.32, 2.55, 1.87, 2.24, 2.36, 1.55, 1.55], 'Mo':[ 2.43, 2.64, 2.35, 2.49, 2.69, 2.04, 2.44, 2.52, 1.73, 1.73], 'Na':[ 2.33, 2.56, 2.28, 2.41, 2.64, 1.93, 2.36, 2.53, 1.68, 1.68], 'Nb':[ 2.45, 2.68, 2.37, 2.51, 2.70, 2.06, 2.46, 2.54, 1.75, 1.75], 'Nd':[ 2.66, 2.87, 2.59, 2.71, 2.89, 2.30, 2.66, 2.74, 2.00, 2.00], 'Ni':[ 2.16, 2.34, 2.04, 2.14, 2.43, 1.75, 2.17, 2.24, 1.40, 1.40], 'P': [ 2.15, 2.40, 2.11, 2.26, 2.44, 1.73, 2.19, 2.25, 1.41, 1.41], 'Pb':[ 2.64, 2.78, 2.55, 2.67, 2.84, 2.22, 2.64, 2.72, 1.97, 1.97], 'Pd':[ 2.19, 2.38, 2.10, 2.22, 2.48, 1.81, 2.22, 2.30, 1.47, 1.47], 'Pr':[ 2.67, 2.89, 2.60, 2.72, 2.90, 2.30, 2.68, 2.75, 2.02, 2.02], 'Pt':[ 2.18, 2.37, 2.08, 2.19, 2.45, 1.77, 2.19, 2.26, 1.40, 1.40], 'Rb':[ 2.78, 3.01, 2.70, 2.81, 3.00, 2.37, 2.76, 2.87, 2.26, 2.26], 'Re':[ 2.45, 2.61, 2.37, 2.50, 2.70, 2.06, 2.46, 2.54, 1.75, 1.75], 'Rh':[ 2.25, 2.48, 2.15, 2.33, 2.55, 1.88, 2.29, 2.37, 1.55, 1.55], 'Ru':[ 2.26, 2.48, 2.16, 2.33, 2.54, 1.88, 2.29, 2.36, 1.61, 1.61], 'S': [ 2.17, 2.36, 2.07, 2.21, 2.45, 1.74, 2.15, 2.25, 1.38, 1.38], 'Sb':[ 2.50, 2.72, 2.45, 2.57, 2.78, 2.12, 2.52, 2.60, 1.77, 1.77], 'Sc':[ 2.38, 2.59, 2.32, 2.44, 2.64, 1.98, 2.40, 2.48, 1.68, 1.68], 'Se':[ 2.33, 2.54, 2.25, 2.36, 2.55, 1.93, 2.34, 2.42, 1.54, 1.54], 'Si':[ 2.20, 2.41, 2.13, 2.26, 2.49, 1.77, 2.23, 2.31, 1.47, 1.47], 'Sm':[ 2.62, 2.84, 2.55, 2.67, 2.86, 2.24, 2.63, 2.70, 1.96, 1.96], 'Sn':[ 2.55, 2.76, 2.45, 2.59, 2.76, 2.14, 2.45, 2.62, 1.85, 1.85], 'Sr':[ 2.68, 2.88, 2.59, 2.72, 2.87, 2.23, 2.67, 2.76, 2.01, 2.01], 'Ta':[ 2.45, 2.66, 2.39, 2.51, 2.70, 2.01, 2.47, 2.55, 1.76, 1.76], 'Tb':[ 2.58, 2.80, 2.51, 2.63, 2.82, 2.20, 2.59, 2.66, 1.91, 1.91], 'Te':[ 2.53, 2.76, 2.45, 2.53, 2.76, 2.12, 2.52, 2.60, 1.83, 1.83], 'Th':[ 2.71, 2.93, 2.64, 2.76, 2.94, 2.34, 2.73, 2.80, 2.07, 2.07], 'Ti':[ 2.32, 2.54, 2.24, 2.38, 2.60, 1.93, 2.36, 2.42, 1.61, 1.61], 'Tl':[ 2.70, 2.91, 2.63, 2.70, 2.93, 2.29, 2.71, 2.79, 2.05, 2.05], 'Tm':[ 2.53, 2.74, 2.45, 2.58, 2.77, 2.14, 2.53, 2.62, 1.85, 1.85], 'U': [ 2.63, 2.84, 2.56, 2.70, 2.86, 2.24, 2.64, 2.72, 1.97, 1.97], 'V': [ 2.30, 2.51, 2.23, 2.33, 2.57, 1.86, 2.31, 2.39, 1.58, 1.58], 'W': [ 2.45, 2.66, 2.39, 2.51, 2.71, 2.06, 2.46, 2.54, 1.76, 1.76], 'Y': [ 2.55, 2.77, 2.48, 2.61, 2.80, 2.17, 2.57, 2.64, 1.86, 1.86], 'Yb':[ 2.51, 2.72, 2.43, 2.56, 2.76, 2.12, 2.53, 2.59, 1.82, 1.82], 'Zn':[ 2.15, 2.36, 2.09, 2.22, 2.45, 1.77, 2.15, 2.24, 1.42, 1.42], 'Zr':[ 2.48, 2.69, 2.41, 2.53, 2.67, 2.11, 2.52, 2.57, 1.79, 1.79], } AtmBlens = {
Note: See TracChangeset for help on using the changeset viewer.