Changeset 1055
- Timestamp:
- Sep 16, 2013 4:23:30 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r1051 r1055 429 429 RBRes = MCSA['rbData'][model['Type']][model['RBId']] 430 430 Pos = np.array(model['Pos'][0]) 431 Qori = np.array(model['Ori'][0]) 431 Ori = np.array(model['Ori'][0]) 432 Qori = AVdeg2Q(Ori[0],Ori[1:]) 432 433 if model['Type'] == 'Vector': 433 434 vecs = RBRes['rbVect'] … … 2356 2357 iters = 1 2357 2358 keepGoing = True 2359 bestn = 0 2358 2360 while keepGoing: 2359 2361 retval = 0 … … 2370 2372 best_state.x = last_state.x.copy() 2371 2373 best_state.cost = last_state.cost 2374 bestn = n 2372 2375 if dlg: 2373 GoOn = dlg.Update(best_state.cost*100, 2374 newmsg='%s%8.5f\n%s%8.4f%s'%('Temperature =',schedule.T,'MC/SA Residual =',best_state.cost*100,'%'))[0] 2376 GoOn = dlg.Update(min(100.,best_state.cost*100), 2377 newmsg='%s%8.5f, %s%d\n%s%8.4f%s'%('Temperature =',schedule.T, \ 2378 'Best trial:',bestn, \ 2379 'MC/SA Residual:',best_state.cost*100,'%', \ 2380 ))[0] 2375 2381 if not GoOn: 2376 2382 best_state.x = last_state.x.copy() … … 2493 2499 parmDict[mfx+'RBId'] = item['RBId'] 2494 2500 pstr = ['Px','Py','Pz'] 2495 ostr = ['Qa','Qi','Qj','Qk'] 2501 ostr = ['Qa','Qi','Qj','Qk'] #angle,vector not quaternion 2496 2502 for i in range(3): 2497 2503 name = mfx+pstr[i] … … 2502 2508 lower.append(limits[0]) 2503 2509 upper.append(limits[1]) 2510 AV = item['Ori'][0] 2511 A = AV[0] 2512 V = AV[1:] 2504 2513 for i in range(4): 2505 2514 name = mfx+ostr[i] 2506 parmDict[name] = item['Ori'][0][i] 2507 if item['Ovar'] == 'AV' and i: 2515 if i: 2516 parmDict[name] = V[i-1] 2517 else: 2518 parmDict[name] = A 2519 if item['Ovar'] == 'AV': 2508 2520 varyList += [name,] 2509 2521 limits = item['Ori'][2][i] … … 2572 2584 if parmDict[pfx+'MolCent'][1]: 2573 2585 Cart -= parmDict[pfx+'MolCent'][0] 2574 Qori = normQ(np.array([parmDict[pfx+'Qa'],parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']]))2586 Qori = AVdeg2Q(parmDict[pfx+'Qa'],[parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']]) 2575 2587 Pos = np.array([parmDict[pfx+'Px'],parmDict[pfx+'Py'],parmDict[pfx+'Pz']]) 2576 2588 for i,x in enumerate(Cart): … … 2605 2617 allX = np.reshape(allX,(-1,3)) 2606 2618 return allX 2619 2620 def normQuaternions(RBdata,parmDict,varyList,values): 2621 for iObj in range(parmDict['nObj']): 2622 pfx = str(iObj)+':' 2623 if parmDict[pfx+'Type'] in ['Vector','Residue']: 2624 Qori = AVdeg2Q(parmDict[pfx+'Qa'],[parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']]) 2625 A,V = Q2AVdeg(Qori) 2626 for i,name in enumerate(['Qa','Qi','Qj','Qk']): 2627 if i: 2628 parmDict[pfx+name] = V[i-1] 2629 else: 2630 parmDict[pfx+name] = A 2607 2631 2608 2632 def mcsaCalc(values,refList,rcov,ifInv,allFF,RBdata,varyList,parmDict): … … 2636 2660 refList[5] = Aterm+Bterm 2637 2661 sumFcsq = np.sum(refList[5]) 2638 scale = (parmDict['sumFosq']/sumFcsq)2662 scale = parmDict['sumFosq']/sumFcsq 2639 2663 refList[5] *= scale 2640 Srefs= refList[4]-refList[5]2641 M = np.inner( Srefs,np.inner(rcov,Srefs))2664 refList[6] = refList[4]-refList[5] 2665 M = np.inner(refList[6],np.inner(rcov,refList[6])) 2642 2666 tsum += (time.time()-t0) 2643 return M/parmDict['sumFosq']**2 2667 # print M,parmDict['sumFosq'],np.sum(refList[6]**2),np.sum(refList[4]**2) 2668 # print np.sum(refList[6]**2)/np.sum(refList[4]**2) 2669 return M/np.sum(refList[4]**2) 2644 2670 2645 2671 sq8ln2 = np.sqrt(8*np.log(2)) … … 2720 2746 Rnorm = np.outer(Rdiag,Rdiag) 2721 2747 rcov /= Rnorm 2722 elif 'Pawley' in reflName: 2748 elif 'Pawley' in reflName: #need a bail out if Pawley cov matrix doesn't exist. 2723 2749 covMatrix = covData['covMatrix'] 2724 2750 vList = covData['varyList'] … … 2776 2802 quench=MCSA['fast parms'][0], m=MCSA['fast parms'][1], n=MCSA['fast parms'][2], 2777 2803 lower=lower, upper=upper, slope=MCSA['log slope'],ranStart=MCSA.get('ranStart',True),dlg=pgbar) 2804 M = mcsaCalc(results[0],refs,rcov,ifInv,allFF,RBdata,varyList,parmDict) 2805 # for ref in refs.T: 2806 # print ' %4d %4d %4d %10.3f %10.3f %10.3f'%(int(ref[0]),int(ref[1]),int(ref[2]),ref[4],ref[5],ref[6]) 2807 # print np.sqrt((np.sum(refs[6]**2)/np.sum(refs[4]**2))) 2778 2808 Result = [False,False,results[1],results[2],]+list(results[0]) 2779 2809 Result.append(varyList) … … 2862 2892 if d: 2863 2893 V /= d 2894 p = A/2. 2895 Q[0] = np.cos(p) 2896 Q[1:4] = V*np.sin(p) 2864 2897 else: 2865 V = np.array([0.,0.,1.]) 2866 p = A/2. 2867 Q[0] = np.cos(p) 2868 Q[1:4] = V*np.sin(p) 2898 Q[3] = 1. 2869 2899 return Q 2870 2900 … … 2877 2907 if d: 2878 2908 V /= d 2909 p = A/2. 2910 Q[0] = cosd(p) 2911 Q[1:4] = V*sind(p) 2879 2912 else: 2880 V = np.array([0.,0.,1.]) 2881 p = A/2. 2882 Q[0] = cosd(p) 2883 Q[1:4] = V*sind(p) 2913 Q[3] = 1. 2884 2914 return Q 2885 2915 … … 2890 2920 A = 2.*acosd(Q[0]) 2891 2921 V = np.array(Q[1:]) 2892 d = np.sqrt(np.sum(V**2)) 2893 if d: 2894 V /= d 2895 else: 2896 A = 0. 2897 V = np.array([0.,0.,0.]) 2922 V /= sind(A/2.) 2898 2923 return A,V 2899 2924 … … 2904 2929 A = 2.*np.arccos(Q[0]) 2905 2930 V = np.array(Q[1:]) 2906 d = np.sqrt(np.sum(V**2)) 2907 if d: 2908 V /= d 2909 else: 2910 A = 0. 2911 V = np.array([0.,0.,0.]) 2931 V /= np.sin(A/2.) 2912 2932 return A,V 2913 2933 -
trunk/GSASIIphsGUI.py
r1052 r1055 206 206 Map = generalData['Map'] 207 207 Flip = generalData['Flip'] 208 MCSA = generalData['MCSA controls']208 MCSAdata = generalData['MCSA controls'] 209 209 PWDR = any(['PWDR' in item for item in data['Histograms'].keys()]) 210 210 # UpdateGeneral execution continues below … … 655 655 656 656 def OnRefList(event): 657 MCSA ['Data source'] = refList.GetValue()657 MCSAdata['Data source'] = refList.GetValue() 658 658 659 659 def OnDmin(event): … … 661 661 val = float(dmin.GetValue()) 662 662 if 1.0 <= val < 5.0: 663 MCSA ['dmin'] = val663 MCSAdata['dmin'] = val 664 664 except ValueError: 665 665 pass 666 dmin.SetValue("%.3f"%(MCSA ['dmin'])) #reset in case of error666 dmin.SetValue("%.3f"%(MCSAdata['dmin'])) #reset in case of error 667 667 668 668 def OnCycles(event): 669 MCSA ['Cycles'] = int(cycles.GetValue())669 MCSAdata['Cycles'] = int(cycles.GetValue()) 670 670 671 671 def OnAlist(event): 672 MCSA ['Algorithm'] = Alist.GetValue()672 MCSAdata['Algorithm'] = Alist.GetValue() 673 673 wx.CallAfter(UpdateGeneral) 674 674 … … 677 677 val = float(slope.GetValue()) 678 678 if .25 <= val < 1.0: 679 MCSA ['log slope'] = val679 MCSAdata['log slope'] = val 680 680 except ValueError: 681 681 pass 682 slope.SetValue("%.3f"%(MCSA ['log slope'])) #reset in case of error682 slope.SetValue("%.3f"%(MCSAdata['log slope'])) #reset in case of error 683 683 684 684 def OnAjump(event): … … 688 688 val = float(Obj.GetValue()) 689 689 if .0 <= val <= 1.0: 690 MCSA [name][ind] = val690 MCSAdata[name][ind] = val 691 691 except ValueError: 692 692 pass 693 Obj.SetValue("%.3f"%(MCSA [name][ind]))693 Obj.SetValue("%.3f"%(MCSAdata[name][ind])) 694 694 695 695 def OnRanStart(event): 696 MCSA ['ranStart'] = ranStart.GetValue()696 MCSAdata['ranStart'] = ranStart.GetValue() 697 697 698 698 def OnAnneal(event): … … 703 703 val = int(Obj.GetValue()) 704 704 if 1 <= val: 705 MCSA ['Annealing'][ind] = val705 MCSAdata['Annealing'][ind] = val 706 706 except ValueError: 707 Obj.SetValue(fmt%(MCSA ['Annealing'][ind]))707 Obj.SetValue(fmt%(MCSAdata['Annealing'][ind])) 708 708 else: 709 709 try: 710 710 val = float(Obj.GetValue()) 711 711 if .0 <= val: 712 MCSA ['Annealing'][ind] = val713 Obj.SetValue(fmt%(MCSA ['Annealing'][ind]))712 MCSAdata['Annealing'][ind] = val 713 Obj.SetValue(fmt%(MCSAdata['Annealing'][ind])) 714 714 except ValueError: 715 MCSA ['Annealing'][ind] = None716 Obj.SetValue(str(MCSA ['Annealing'][ind]))715 MCSAdata['Annealing'][ind] = None 716 Obj.SetValue(str(MCSAdata['Annealing'][ind])) 717 717 718 718 refList = [] … … 725 725 lineSizer = wx.BoxSizer(wx.HORIZONTAL) 726 726 lineSizer.Add(wx.StaticText(General,label=' Monte Carlo/Simulated Annealing controls: Reflection set from: '),0,wx.ALIGN_CENTER_VERTICAL) 727 refList = wx.ComboBox(General,-1,value=MCSA ['Data source'],choices=refList,727 refList = wx.ComboBox(General,-1,value=MCSAdata['Data source'],choices=refList, 728 728 style=wx.CB_READONLY|wx.CB_DROPDOWN) 729 729 refList.Bind(wx.EVT_COMBOBOX,OnRefList) 730 730 lineSizer.Add(refList,0,wx.ALIGN_CENTER_VERTICAL) 731 731 lineSizer.Add(wx.StaticText(General,label=' d-min: '),0,wx.ALIGN_CENTER_VERTICAL) 732 dmin = wx.TextCtrl(General,-1,value='%.3f'%(MCSA ['dmin']),style=wx.TE_PROCESS_ENTER)732 dmin = wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata['dmin']),style=wx.TE_PROCESS_ENTER) 733 733 dmin.Bind(wx.EVT_TEXT_ENTER,OnDmin) 734 734 dmin.Bind(wx.EVT_KILL_FOCUS,OnDmin) … … 739 739 line2Sizer.Add(wx.StaticText(General,label=' MC/SA runs: '),0,wx.ALIGN_CENTER_VERTICAL) 740 740 Cchoice = ['1','2','3','6','10','20','30','60','100'] 741 cycles = wx.ComboBox(General,-1,value=str(MCSA .get('Cycles',1)),choices=Cchoice,741 cycles = wx.ComboBox(General,-1,value=str(MCSAdata.get('Cycles',1)),choices=Cchoice, 742 742 style=wx.CB_READONLY|wx.CB_DROPDOWN) 743 743 cycles.Bind(wx.EVT_COMBOBOX,OnCycles) … … 746 746 ranStart = wx.CheckBox(General,-1,label=' Random start? (ignored if Start temp = None)') 747 747 ranStart.Bind(wx.EVT_CHECKBOX, OnRanStart) 748 ranStart.SetValue(MCSA .get('ranStart',True))748 ranStart.SetValue(MCSAdata.get('ranStart',True)) 749 749 line2Sizer.Add(ranStart,0,wx.ALIGN_CENTER_VERTICAL) 750 750 mcsaSizer.Add(line2Sizer) … … 754 754 # Achoice = ['log','fast','cauchy','boltzmann','Tremayne'] 755 755 line3Sizer.Add(wx.StaticText(General,label=' MC/SA schedule: '),0,wx.ALIGN_CENTER_VERTICAL) 756 Alist = wx.ComboBox(General,-1,value=MCSA ['Algorithm'],choices=Achoice,756 Alist = wx.ComboBox(General,-1,value=MCSAdata['Algorithm'],choices=Achoice, 757 757 style=wx.CB_READONLY|wx.CB_DROPDOWN) 758 758 Alist.Bind(wx.EVT_COMBOBOX,OnAlist) 759 759 line3Sizer.Add(Alist,0,wx.ALIGN_CENTER_VERTICAL) 760 if MCSA ['Algorithm'] in ['Tremayne','fast','boltzmann','cauchy']:760 if MCSAdata['Algorithm'] in ['Tremayne','fast','boltzmann','cauchy']: 761 761 Names = [' A-jump: ',' B-jump: '] 762 762 parms = 'Jump coeff' 763 if MCSA ['Algorithm'] in ['boltzmann','cauchy']:763 if MCSAdata['Algorithm'] in ['boltzmann','cauchy']: 764 764 Names = [' A-jump: '] 765 elif 'fast' in MCSA ['Algorithm']:765 elif 'fast' in MCSAdata['Algorithm']: 766 766 Names = [' quench: ',' m-factor: ',' n-factor: '] 767 767 parms = 'fast parms' 768 768 for i,name in enumerate(Names): 769 769 line3Sizer.Add(wx.StaticText(General,label=name),0,wx.ALIGN_CENTER_VERTICAL) 770 Ajump = wx.TextCtrl(General,-1,value='%.3f'%(MCSA [parms][i]),style=wx.TE_PROCESS_ENTER)770 Ajump = wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata[parms][i]),style=wx.TE_PROCESS_ENTER) 771 771 Ajump.Bind(wx.EVT_TEXT_ENTER,OnAjump) 772 772 Ajump.Bind(wx.EVT_KILL_FOCUS,OnAjump) 773 773 Indx[Ajump.GetId()] = [parms,i] 774 774 line3Sizer.Add(Ajump,0,wx.ALIGN_CENTER_VERTICAL) 775 elif 'log' in MCSA ['Algorithm']:775 elif 'log' in MCSAdata['Algorithm']: 776 776 line3Sizer.Add(wx.StaticText(General,label=' slope: '),0,wx.ALIGN_CENTER_VERTICAL) 777 slope = wx.TextCtrl(General,-1,value='%.3f'%(MCSA ['log slope']),style=wx.TE_PROCESS_ENTER)777 slope = wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata['log slope']),style=wx.TE_PROCESS_ENTER) 778 778 slope.Bind(wx.EVT_TEXT_ENTER,OnSlope) 779 779 slope.Bind(wx.EVT_KILL_FOCUS,OnSlope) … … 786 786 fmts = ['%.1f','%.5f','%d'] 787 787 for i,[name,fmt] in enumerate(zip(names,fmts)): 788 if MCSA ['Annealing'][i]:789 text = fmt%(MCSA ['Annealing'][i])788 if MCSAdata['Annealing'][i]: 789 text = fmt%(MCSAdata['Annealing'][i]) 790 790 else: 791 791 text = 'None' … … 4051 4051 def OnOriVal(event): 4052 4052 Obj = event.GetEventObject() 4053 model,ix = Indx[Obj.GetId()]4053 model,ix,ObjA,ObjV = Indx[Obj.GetId()] 4054 4054 A,V = G2mth.Q2AVdeg(model['Ori'][0]) 4055 4055 if ix: 4056 4056 Anew = A 4057 Vec = Obj .GetValue().split()4057 Vec = ObjV.GetValue().split() 4058 4058 try: 4059 4059 Vnew = [float(Vec[i]) for i in range(3)] … … 4063 4063 Vnew = V 4064 4064 try: 4065 Anew = float(Obj .GetValue())4065 Anew = float(ObjA.GetValue()) 4066 4066 except ValueError: 4067 4067 Anew = A 4068 4068 model['Ori'][0] = G2mth.AVdeg2Q(Anew,Vnew) 4069 A,V = G2mth.Q2AVdeg(model['Ori'][0]) 4070 if ix: 4071 ObjV.SetValue('%.3f %.3f %.3f'%(V[0],V[1],V[2])) 4072 else: 4073 ObjA.SetValue('%.5f'%(A)) 4069 4074 G2plt.PlotStructure(G2frame,data) 4070 4075 UpdateMCSA() … … 4107 4112 4108 4113 rbsizer2 = wx.FlexGridSizer(1,6,5,5) 4109 Orien,OrienV = G2mth.Q2AVdeg(model['Ori'][0]) 4110 Ori = [Orien,]+list(OrienV) 4114 Ori = model['Ori'][0] 4111 4115 rbsizer2.Add(wx.StaticText(MCSA,-1,'Oa: '),0,wx.ALIGN_CENTER_VERTICAL) 4112 4116 angVal = wx.TextCtrl(MCSA,-1,'%.5f'%(Ori[0]),style=wx.TE_PROCESS_ENTER) 4113 4117 angVal.Bind(wx.EVT_TEXT_ENTER,OnOriVal) 4114 4118 angVal.Bind(wx.EVT_KILL_FOCUS,OnOriVal) 4115 Indx[angVal.GetId()] = [model,0]4116 4119 rbsizer2.Add(angVal,0,wx.ALIGN_CENTER_VERTICAL) 4117 4120 rbsizer2.Add(wx.StaticText(MCSA,-1,'Oi,Oj,Ok: '),0,wx.ALIGN_CENTER_VERTICAL) … … 4119 4122 vecVal.Bind(wx.EVT_TEXT_ENTER,OnOriVal) 4120 4123 vecVal.Bind(wx.EVT_KILL_FOCUS,OnOriVal) 4121 Indx[vecVal.GetId()] = [model,1] 4124 Indx[angVal.GetId()] = [model,0,angVal,vecVal] 4125 Indx[vecVal.GetId()] = [model,1,angVal,vecVal] 4122 4126 rbsizer2.Add(vecVal,0,wx.ALIGN_CENTER_VERTICAL) 4123 4127 rbsizer2.Add(wx.StaticText(MCSA,-1,' Vary? '),0,wx.ALIGN_CENTER_VERTICAL) … … 4146 4150 rbsizer.Add(rbsizer2) 4147 4151 if model['Type'] == 'Residue': 4152 atNames = RBData['Residue'][model['RBId']]['atNames'] 4153 rbsizer.Add(wx.StaticText(MCSA,-1,'Torsions:'),0,wx.ALIGN_CENTER_VERTICAL) 4148 4154 rbsizer3 = wx.FlexGridSizer(1,8,5,5) 4149 4155 for it,tor in enumerate(model['Tor'][0]): 4150 name = 'Tor('+str(it)+')' 4156 iBeg,iFin = RBData['Residue'][model['RBId']]['rbSeq'][it][:2] 4157 name = atNames[iBeg]+'-'+atNames[iFin] 4151 4158 torRef = wx.CheckBox(MCSA,-1,label=' %s: '%(name)) 4152 4159 torRef.SetValue(model['Tor'][1][it]) … … 4237 4244 r,c = event.GetRow(),event.GetCol() 4238 4245 if c == 0: 4239 Models = data['MCSA']['Models']4240 4246 for row in range(resultsGrid.GetNumberRows()): 4241 4247 resultsTable.SetValue(row,c,False) 4242 4248 Results[row][0] = False 4243 4249 Results[r][0] = True 4244 resultsGrid.ForceRefresh()4245 4250 result = Results[r] 4246 for key,val in zip(result[-1],result[4:-1]): 4247 vals = key.split(':') 4248 nObj,name = int(vals[0]),vals[1] 4249 if 'A' in name: 4250 ind = ['Ax','Ay','Az'].index(name) 4251 Models[nObj]['Pos'][0][ind] = val 4252 elif 'Q' in name: 4253 Q = Models[nObj]['Ori'][0] 4254 A,V = G2mth.Q2AVdeg(Q) 4255 ind = ['Qa','Qi','Qj','Qk'].index(name) 4256 if ind: 4257 V[ind-1] = val 4258 else: 4259 A = val 4260 Q = G2mth.AVdeg2Q(A,V) 4261 Models[nObj]['Ori'][0] = Q 4262 elif 'P' in name: 4263 ind = ['Px','Py','Pz'].index(name) 4264 Models[nObj]['Pos'][0][ind] = val 4265 elif 'T' in name: 4266 tnum = int(name.split('Tor')[1]) 4267 Models[nObj]['Tor'][0][tnum] = val 4268 else: #March Dollase 4269 Models[0]['Coef'][0] = val 4251 Models = data['MCSA']['Models'] 4252 SetSolution(result,Models) 4270 4253 wx.CallAfter(UpdateMCSA,MCSA.GetScrollPos(wx.VERTICAL)) 4271 4254 G2plt.PlotStructure(G2frame,data) … … 4293 4276 resultsGrid = G2gd.GSGrid(MCSA) 4294 4277 resultsGrid.SetTable(resultsTable, True) 4295 resultsGrid.Bind(wg.EVT_GRID_ SELECT_CELL, OnCellChange)4278 resultsGrid.Bind(wg.EVT_GRID_CELL_LEFT_CLICK, OnCellChange) 4296 4279 resultsGrid.AutoSizeColumns(True) 4297 4280 for r in range(resultsGrid.GetNumberRows()): … … 4306 4289 4307 4290 # UpdateMCSA executable code starts here 4291 MCSA.DestroyChildren() 4308 4292 general = data['General'] 4309 4293 Amat,Bmat = G2lat.cell2AB(general['Cell'][1:7]) … … 4344 4328 Results = data['MCSA']['Results'] 4345 4329 mainSizer.Add(ResultsSizer(Results)) 4346 4330 4331 mainSizer.Layout() 4347 4332 SetPhaseWindow(G2frame.dataFrame,MCSA,mainSizer) 4348 4333 MCSA.Scroll(0,Scroll) 4334 4335 def SetSolution(result,Models): 4336 for key,val in zip(result[-1],result[4:-1]): 4337 vals = key.split(':') 4338 nObj,name = int(vals[0]),vals[1] 4339 if 'A' in name: 4340 ind = ['Ax','Ay','Az'].index(name) 4341 Models[nObj]['Pos'][0][ind] = val 4342 elif 'Q' in name: 4343 ind = ['Qa','Qi','Qj','Qk'].index(name) 4344 Models[nObj]['Ori'][0][ind] = val 4345 elif 'P' in name: 4346 ind = ['Px','Py','Pz'].index(name) 4347 Models[nObj]['Pos'][0][ind] = val 4348 elif 'T' in name: 4349 tnum = int(name.split('Tor')[1]) 4350 Models[nObj]['Tor'][0][tnum] = val 4351 else: #March Dollase 4352 Models[0]['Coef'][0] = val 4349 4353 4350 4354 def OnRunMultiMCSA(event): … … 4418 4422 pgbar.Destroy() 4419 4423 MCSAdata['Results'] = G2mth.sortArray(MCSAdata['Results'],2,reverse=False) 4424 MCSAdata['Results'][0][0] = True 4425 SetSolution(MCSAdata['Results'][0],data['MCSA']['Models']) 4420 4426 G2frame.dataDisplay.SetFocus() 4421 4427 Page = G2frame.dataDisplay.FindPage('MC/SA') … … 4460 4466 body = {'name':RB['RBname']+'('+str(len(data['MCSA']['Models']))+')','RBId':rbId,'Type':rbType, 4461 4467 'Pos':[[0.,0.,0.],[False,False,False],[[0.,1.],[0.,1.],[0.,1.]]],'Ovar':'','MolCent':[[0.,0.,0.],False], 4462 'Ori':[[1 .,0.,0.,0.],[False,False,False,False],[[-180.,180.],[-1.,1.],[-1.,1.],[-1.,1.]]]}4468 'Ori':[[180.,0.,0.,1.],[False,False,False,False],[[0.,360.],[-1.,1.],[-1.,1.],[-1.,1.]]]} 4463 4469 if rbType == 'Residue': 4464 4470 body['Tor'] = [[],[],[]]
Note: See TracChangeset
for help on using the changeset viewer.