Changeset 5049
- Timestamp:
- Oct 19, 2021 10:25:30 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpath.py
r5047 r5049 932 932 except: 933 933 pass 934 934 935 def exceptHook(*args): 935 936 '''A routine to be called when an exception occurs. It prints the traceback -
trunk/GSASIIphsGUI.py
r5045 r5049 4723 4723 atId = RMCPdict['atSeq'][iType] 4724 4724 atmChoice.Add(G2G.ValidatedTxtCtrl(pnl,RMCPdict['aTypes'],atId,xmin=0.,xmax=1.),0,WACV) 4725 atmChoice.Add(wx.StaticText(pnl,label='Isotope: '),0,WACV) 4726 for iType in range(nTypes): 4727 atId = RMCPdict['atSeq'][iType] 4728 atmChoice.Add(wx.StaticText(pnl,label=RMCPdict['Isotope'][atId]),0,WACV) 4725 4729 return atmChoice 4726 4730 … … 4735 4739 Indx = {} 4736 4740 atChoice = RMCPdict['atSeq'] 4737 if G2frame.RMCchoice == 'fullrmc':4738 atChoice = atNames4741 # if G2frame.RMCchoice == 'fullrmc': 4742 # atChoice = atNames 4739 4743 swapSizer = wx.FlexGridSizer(6,5,5) 4740 4744 swapLabels = [' ','Atom-A','Atom-B',' Swap prob.',' ','delete'] … … 4755 4759 return swapSizer 4756 4760 4757 def GetPairSizer(pnl,RMC dict):4761 def GetPairSizer(pnl,RMCPdict): 4758 4762 pairSizer = wx.FlexGridSizer(len(RMCPdict['Pairs'])+1,5,5) 4759 4763 pairSizer.Add((5,5),0) … … 4775 4779 return pairSizer 4776 4780 4777 def GetMetaSizer( metalist):4781 def GetMetaSizer(RMCPdict,metalist): 4778 4782 metaSizer = wx.FlexGridSizer(0,2,5,5) 4779 4783 for item in metalist: … … 4785 4789 RMCPdict['ReStart'] = [True,True] 4786 4790 4787 def GetSuperSizer( Xmax):4791 def GetSuperSizer(RMCPdict,Xmax): 4788 4792 superSizer = wx.BoxSizer(wx.HORIZONTAL) 4789 4793 axes = ['X','Y','Z'] … … 4794 4798 return superSizer 4795 4799 4796 def FileSizer(RMC dict,mainSizer):4800 def FileSizer(RMCPdict,mainSizer): 4797 4801 4798 4802 def OnFitScale(event): … … 5022 5026 return 5023 5027 5024 G2frame.GetStatusBar().SetStatusText('',1) 5025 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,True) 5026 if G2frame.RMCchoice == 'RMCProfile': 5027 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,True) 5028 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,True) 5029 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,True) 5030 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,False) 5031 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,False) 5032 elif G2frame.RMCchoice == 'fullrmc': 5033 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,False) 5034 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,False) 5035 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,False) 5036 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,False) 5037 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,False) 5038 #G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,True) 5039 if G2frame.FRMC.GetSizer(): 5040 G2frame.FRMC.GetSizer().Clear(True) 5041 bigSizer = wx.BoxSizer(wx.HORIZONTAL) 5042 mainSizer = wx.BoxSizer(wx.VERTICAL) 5043 runFile = ' ' 5044 choice = ['RMCProfile','fullrmc','PDFfit'] 5045 RMCsel = wx.RadioBox(G2frame.FRMC,-1,' Select RMC method:',choices=choice) 5046 RMCsel.SetStringSelection(G2frame.RMCchoice) 5047 RMCsel.Bind(wx.EVT_RADIOBOX, OnRMCselect) 5048 mainSizer.Add(RMCsel,0) 5049 mainSizer.Add((5,5),0) 5050 if G2frame.RMCchoice == 'fullrmc': 5028 def fullrmcSizer(RMCPdict): 5029 mainSizer = wx.BoxSizer(wx.VERTICAL) 5051 5030 if G2pwd.findfullrmc() is None: 5052 5031 dlg = wx.MessageDialog(G2frame, … … 5062 5041 if result == wx.ID_YES: 5063 5042 G2G.ShowHelp('fullrmc',G2frame) 5064 return 5043 return mainSizer 5065 5044 mainSizer.Add(wx.StaticText(G2frame.FRMC,label= 5066 5045 ''' "Fullrmc, a Rigid Body Reverse Monte Carlo Modeling Package Enabled with … … 5090 5069 'moleculePdb':'Select','targetDensity':1.0,'maxRecursion':10000,'Torsions':[],'Torsion Weight':1.e-5, 5091 5070 'Bond Weight':1.e-5,'min Contact':1.5,'periodicBound':True} 5092 RMCPdict = data['RMC']['fullrmc']5093 5071 5094 5072 def GetSuperSizer(): … … 5357 5335 G2G.HorizontalLine(mainSizer,G2frame.FRMC) 5358 5336 FileSizer(RMCPdict,mainSizer) 5359 5360 elif G2frame.RMCchoice == 'RMCProfile': 5337 return mainSizer 5338 5339 def RMCProfileSizer(RMCPdict): 5340 mainSizer = wx.BoxSizer(wx.VERTICAL) 5361 5341 subSizer = wx.BoxSizer(wx.HORIZONTAL) 5362 5342 subSizer.Add((-1,-1),1,wx.EXPAND) … … 5399 5379 'Stretch search':10.,'Pot. Temp.':300.,'useGPU':False,}} 5400 5380 5381 data['RMC']['RMCProfile']['Isotope'] = copy.copy(data['General']['Isotope']) 5382 data['RMC']['RMCProfile']['Isotopes'] = copy.deepcopy(data['General']['Isotopes']) 5383 data['RMC']['RMCProfile']['NoAtoms'] = copy.copy(data['General']['NoAtoms']) 5401 5384 RMCPdict = data['RMC']['RMCProfile'] 5402 5385 #patches … … 5444 5427 wx.CallAfter(UpdateRMC) 5445 5428 5446 # def GetMetaSizer():5447 # metalist = ['title','owner','material','phase','comment','source',]5448 # metaSizer = wx.FlexGridSizer(0,2,5,5)5449 # for item in metalist:5450 # metaSizer.Add(wx.StaticText(G2frame.FRMC,label=' Metadata item: '+item+' '),0,WACV)5451 # metaSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict['metadata'],item),0,WACV)5452 # return metaSizer5453 5454 5429 def GetTimeSizer(): 5455 5430 … … 5662 5637 5663 5638 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' Enter metadata items:'),0) 5664 mainSizer.Add(GetMetaSizer( ['title','owner','material','phase','comment','source',]),0)5639 mainSizer.Add(GetMetaSizer(RMCPdict,['title','owner','material','phase','comment','source',]),0) 5665 5640 5666 5641 G2G.HorizontalLine(mainSizer,G2frame.FRMC) … … 5668 5643 5669 5644 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' Lattice multipliers; if changed will force reset of atom positions:'),0) 5670 mainSizer.Add(GetSuperSizer( 20),0)5645 mainSizer.Add(GetSuperSizer(RMCPdict,20),0) 5671 5646 5672 5647 G2G.HorizontalLine(mainSizer,G2frame.FRMC) … … 5776 5751 5777 5752 FileSizer(RMCPdict,mainSizer) 5778 else: 5753 return mainSizer 5754 5755 def PDFfitSizer(data): 5756 5757 mainSizer = wx.BoxSizer(wx.VERTICAL) 5779 5758 Indx = {} 5780 5759 def PDFParmSizer(): 5781 5760 5761 def OnShape(event): 5762 RMCPdict['shape'] = shape.GetValue() 5763 wx.CallAfter(UpdateRMC) 5764 5782 5765 parmSizer = wx.FlexGridSizer(3,6,5,5) 5783 Names = ['delta1','delta2','s pdiameter','sratio']5784 Names2 = [' rcut','stepcut']5766 Names = ['delta1','delta2','sratio','spdiameter'] 5767 Names2 = ['stepcut','rcut'] 5785 5768 for name in Names: 5786 5769 … … 5790 5773 RMCPdict[name][1] = not RMCPdict[name][1] 5791 5774 5792 parmSizer.Add(wx.StaticText(G2frame.FRMC,label=name),0,WACV) 5793 parmSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict[name],0,xmin=0.,size=(70,25)),0,WACV) 5794 refine = wx.CheckBox(G2frame.FRMC,label='Refine') 5795 refine.SetValue(RMCPdict[name][1]) 5796 refine.Bind(wx.EVT_CHECKBOX,OnRefine) 5797 Indx[refine.GetId()] = name 5798 parmSizer.Add(refine,0,WACV) 5799 5800 for name in Names2: 5801 parmSizer.Add(wx.StaticText(G2frame.FRMC,label=name),0,WACV) 5802 parmSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict,name,xmin=0.,size=(70,25)),0,WACV) 5775 if name == 'spdiameter' and RMCPdict.get('shape','sphere') != 'sphere': 5776 parmSizer.Add((5,5)) 5777 parmSizer.Add((5,5)) 5778 parmSizer.Add((5,5)) 5779 else: 5780 parmSizer.Add(wx.StaticText(G2frame.FRMC,label=name),0,WACV) 5781 parmSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict[name],0,xmin=0.,size=(70,25)),0,WACV) 5782 refine = wx.CheckBox(G2frame.FRMC,label='Refine') 5783 refine.SetValue(RMCPdict[name][1]) 5784 refine.Bind(wx.EVT_CHECKBOX,OnRefine) 5785 Indx[refine.GetId()] = name 5786 parmSizer.Add(refine,0,WACV) 5787 parmSizer.Add(wx.StaticText(G2frame.FRMC,label=' Shape'),0,WACV) 5788 shape = wx.ComboBox(G2frame.FRMC,choices=['sphere','stepcut'],style=wx.CB_DROPDOWN|wx.TE_READONLY) 5789 shape.SetStringSelection(RMCPdict.get('shape','sphere')) 5790 shape.Bind(wx.EVT_COMBOBOX,OnShape) 5791 parmSizer.Add(shape,0,WACV) 5792 if RMCPdict.get('shape','sphere') == 'stepcut': 5793 for name in Names2: 5794 parmSizer.Add(wx.StaticText(G2frame.FRMC,label=name),0,WACV) 5795 parmSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict,name,xmin=0.,size=(70,25)),0,WACV) 5803 5796 5804 5797 return parmSizer … … 5825 5818 data['RMC']['PDFfit'] = {'files':files,'ReStart':[False,False],'metadata':metadata, 5826 5819 'delta1':[0.,False],'delta2':[0.,False],'spdiameter':[0.,False], 5827 'sratio':[1.,False],'rcut':0.0,'stepcut':0.0, 5820 'sratio':[1.,False],'rcut':0.0,'stepcut':0.0,'shape':'sphere', 5828 5821 'Xdata':{'dscale':[1.0,False],'Datarange':[0.,30.],'Fitrange':[0.,30.],'qdamp':[0.03,False],'qbroad':[0,False]}, 5829 5822 'Ndata':{'dscale':[1.0,False],'Datarange':[0.,30.],'Fitrange':[0.,30.],'qdamp':[0.03,False],'qbroad':[0,False]},} … … 5831 5824 RMCPdict = data['RMC']['PDFfit'] 5832 5825 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' Enter metadata items:'),0) 5833 mainSizer.Add(GetMetaSizer( ['title','date','temperature','doping']),0)5826 mainSizer.Add(GetMetaSizer(RMCPdict,['title','date','temperature','doping']),0) 5834 5827 5835 5828 G2G.HorizontalLine(mainSizer,G2frame.FRMC) 5836 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' PDF p rofile coefficients:'),0,WACV)5829 mainSizer.Add(wx.StaticText(G2frame.FRMC,label=' PDF phase profile coefficients:'),0,WACV) 5837 5830 mainSizer.Add(PDFParmSizer(),0) 5838 5831 5839 5832 G2G.HorizontalLine(mainSizer,G2frame.FRMC) 5840 5833 FileSizer(RMCPdict,mainSizer) 5834 return mainSizer 5835 5836 ####start of UpdateRMC 5837 G2frame.GetStatusBar().SetStatusText('',1) 5838 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,True) 5839 if G2frame.RMCchoice == 'RMCProfile': 5840 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,True) 5841 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,True) 5842 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,True) 5843 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,False) 5844 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,False) 5845 elif G2frame.RMCchoice == 'fullrmc': 5846 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_SETUPRMC,False) 5847 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_RUNRMC,False) 5848 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_VIEWRMC,False) 5849 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,False) 5850 G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_ISODISTORT,False) 5851 #G2frame.dataWindow.FRMCDataEdit.Enable(G2G.wxID_STOPRMC,True) 5852 if G2frame.FRMC.GetSizer(): 5853 G2frame.FRMC.GetSizer().Clear(True) 5854 bigSizer = wx.BoxSizer(wx.HORIZONTAL) 5855 mainSizer = wx.BoxSizer(wx.VERTICAL) 5856 runFile = ' ' 5857 choice = ['RMCProfile','fullrmc','PDFfit'] 5858 RMCsel = wx.RadioBox(G2frame.FRMC,-1,' Select RMC method:',choices=choice) 5859 RMCsel.SetStringSelection(G2frame.RMCchoice) 5860 RMCsel.Bind(wx.EVT_RADIOBOX, OnRMCselect) 5861 mainSizer.Add(RMCsel,0) 5862 mainSizer.Add((5,5),0) 5863 if G2frame.RMCchoice == 'fullrmc': 5864 RMCPdict = data['RMC']['fullrmc'] 5865 mainSizer.Add(fullrmcSizer(RMCPdict)) 5866 5867 elif G2frame.RMCchoice == 'RMCProfile': 5868 RMCPdict = data['RMC']['RMCProfile'] 5869 mainSizer.Add(RMCProfileSizer(RMCPdict)) 5870 5871 else: #PDFfit 5872 mainSizer.Add(PDFfitSizer(data)) 5841 5873 5842 5874 bigSizer.Add(mainSizer,1,wx.EXPAND) … … 5915 5947 RMCPdict = data['RMC']['PDFfit'] 5916 5948 title = RMCPdict['metadata']['title'] 5917 print(RMCPdict)5918 5919 print('PDFfit2 prep under construction')5949 G2pwd.MakePDFfitAtomsFile(data,RMCPdict) 5950 G2pwd.MakePDFfitRunFile(data,RMCPdict) 5951 5920 5952 5921 5953 def OnRunRMC(event): … … 6002 6034 # TODO: better to create this in a new terminal on Linux 6003 6035 subp.Popen(['/bin/bash','fullrmc.sh']) 6036 6004 6037 elif G2frame.RMCchoice == 'RMCProfile': 6005 6038 pName = generalData['Name'].replace(' ','_') … … 6057 6090 batch.close() 6058 6091 subp.Popen('runrmc.bat',creationflags=subp.CREATE_NEW_CONSOLE) 6092 6059 6093 elif G2frame.RMCchoice == 'PDFfit': 6060 6094 PDFfit_exec = G2pwd.findPDFfit() … … 6092 6126 GSASIIpath.MacRunScript(os.path.abspath('pdffit2.sh')) 6093 6127 else: 6094 # TODO: better to create this in a new terminal on Linux6095 6128 subp.Popen(['/bin/bash','pdffit2.sh']) 6129 #update choice? here? 6130 6131 G2pwdr.UpdatePDFfit(data,RMCPdata) 6132 6096 6133 6097 6134 -
trunk/GSASIIpwd.py
r5043 r5049 2616 2616 Times = RMCPdict['runTimes'] 2617 2617 Atseq = RMCPdict['atSeq'] 2618 Natoms = RMCPdict['NoAtoms'] 2619 sumatms = np.sum(np.array([Natoms[iatm] for iatm in Natoms])) 2620 Isotope = RMCPdict['Isotope'] 2621 Isotopes = RMCPdict['Isotopes'] 2618 2622 Atypes = RMCPdict['aTypes'] 2619 2623 atPairs = RMCPdict['Pairs'] … … 2641 2645 lenA = len(Atseq) 2642 2646 Pairs = [] 2647 Ncoeff = [] 2648 Nblen = [Isotopes[at][Isotope[at]]['SL'][0] for at in Atypes] 2643 2649 for pair in [[' %s-%s'%(Atseq[i],Atseq[j]) for j in range(i,lenA)] for i in range(lenA)]: 2644 2650 Pairs += pair 2645 pairMin = [atPairs[pair]for pair in Pairs if pair in atPairs] 2651 for pair in Pairs: 2652 pair = pair.replace(' ','') 2653 at1,at2 = pair.split('-') 2654 ncoef = Isotopes[at1][Isotope[at1]]['SL'][0]*Natoms[at1]/sumatms 2655 ncoef *= Isotopes[at2][Isotope[at2]]['SL'][0]*Natoms[at2]/sumatms 2656 if at1 != at2: 2657 ncoef *= 2. 2658 Ncoeff += [ncoef,] 2659 pairMin = [atPairs[pair] for pair in Pairs if pair in atPairs] 2646 2660 maxMoves = [Atypes[atm] for atm in Atseq if atm in Atypes] 2647 2661 fname = Name+'.dat' … … 2677 2691 fl.write('IGNORE_HISTORY_FILE ::\n') 2678 2692 fl.write('\n') 2693 fl.write('NEUTRON_COEFFICIENTS :: '+''.join(['%8.5f'%coeff for coeff in Ncoeff])+'\n') 2679 2694 fl.write('DISTANCE_WINDOW ::\n') 2680 2695 fl.write(' > MNDIST :: %s\n'%minD) … … 2774 2789 fl.write(' > DMIN :: %.2f\n'%(dMin-0.02)) 2775 2790 fl.write(' > WEIGHT :: %10.3f\n'%BraggWt) 2791 fl.write(' > SCATTERING LENGTH :: '+''.join(['%7.4f'%blen for blen in Nblen])+'\n') 2776 2792 fl.write('\n') 2777 2793 fl.write('END ::\n') … … 2942 2958 ''' 2943 2959 General = Phase['General'] 2960 fName = General['Name']+'-PDFfit.stru' 2961 fatm = open(fName.replace(' ','_'),'w') 2962 fatm.write('title structure of '+General['Name']+'\n') 2963 fatm.write('format pdffit\n') 2964 fatm.write('scale 1.000000\n') #fixed 2965 sharp = '%10.6f,%10.6f,%10.6f,%10.6f\n'%(RMCPdict['delta2'][0],RMCPdict['delta1'][0],RMCPdict['sratio'][0],RMCPdict['rcut'][0]) 2966 fatm.write('sharp '+sharp) 2967 shape = '' 2968 if RMCPdict['spdiameter'] > 0.: 2969 shape = 'sphere, %10.6f\n'%RMCPdict['spdiameter'] 2970 elif RMCPdict['stepcut'] > 0.: 2971 shape = 'stepcut, %10.6f\n'%RMCPdict['stepcut'] 2972 if shape: 2973 fatm.write('shape '+shape) 2974 fatm.write('spcgr %s\n'%General['SGData']['SpGrp'].replace(' ','')) 2975 cell = General['Cell'][1:7] 2976 fatm.write('cell %10.6f,%10.6f,%10.6f,%10.6f,%10.6f,%10.6f\n'%( 2977 cell[0],cell[1],cell[2],cell[3],cell[4],cell[5])) 2978 fatm.write('dcell '+5*' 0.000000,'+' 0.000000\n') 2979 Atoms = Phase['Atoms'] 2980 fatm.write('ncell %8d,%8d,%8d,%10d\n'%(1,1,1,len(Atoms))) 2981 fatm.write('atoms\n') 2982 cx,ct,cs,cia = General['AtomPtrs'] 2983 for atom in Atoms: 2984 fatm.write('%4s%18.8f%18.8f%18.8f%13.4f\n'%(atom[ct][:2].ljust(2),atom[cx],atom[cx+1],atom[cx+2],atom[cx+3])) 2985 fatm.write(' '+'%18.8f%18.8f%18.8f%13.4f\n'%(0.,0.,0.,0.)) 2986 fatm.write(' '+'%18.8f%18.8f%18.8f\n'%(atom[cia+2],atom[cia+3],atom[cia+4])) 2987 fatm.write(' '+'%18.8f%18.8f%18.8f\n'%(0.,0.,0.,)) 2988 fatm.write(' '+'%18.8f%18.8f%18.8f\n'%(atom[cia+5],atom[cia+6],atom[cia+7])) 2989 fatm.write(' '+'%18.8f%18.8f%18.8f\n'%(0.,0.,0.)) 2990 fatm.close() 2991 2992 def MakePDFfitRunFile(Phase,RMCPdict): 2993 '''Make the PDFfit atoms file 2994 ''' 2944 2995 print(RMCPdict) 2945 fName = Phase['Name']+'.stru' 2946 fatm = open(fName.replace(' ','_'),'w') 2947 a,b,c,alp,bet,gam = General['Cell'][1:7] 2948 fatm.write('\n') 2949 2996 General = Phase['General'] 2997 rundata = ''' 2998 #!/usr/bin/env python 2999 # -*- coding: utf-8 -*- 3000 from diffpy.pdffit2 import PdfFit 3001 pf = PdfFit() 3002 3003 # Load data ------------------------------------------------------------------ 3004 3005 # Load experimental x-ray PDF data 3006 qmax = 30.0 # Q-cutoff used in PDF calculation in 1/A 3007 qdamp = 0.01 # instrument Q-resolution factor, responsible for PDF decay 3008 pf.read_data('Ni-xray.gr', 'X', qmax, qdamp) 3009 pf.read_data('Ni-neutron.gr', 'N', qmax, qdamp) 3010 3011 # Load nickel structure, must be in PDFFIT or DISCUS format 3012 pf.read_struct('Ni.stru') 3013 ''' 3014 3015 fName = General['Name']+'.py' 3016 3017 rfile = open(fName,'w') 3018 rfile.writelines(rundata) 3019 rfile.close() 3020 3021 3022 print('PDFfit2 prep under construction') 3023 3024 def UpdatePDFfit(Phase,RMCPdict): 3025 3026 General = Phase['General'] 3027 fName = General['Name']+'-PDFfit.rstr' 3028 rstr = open(fName.replace(' ','_'),'r') 3029 lines = rstr.readlines() 3030 resdict = dict(zip(lines[:6].split(' ',))) 3031 General['Cell'][:7] = resdict['cell'] 3032 for inam,name in enumerate(['delta1','delta2','sratio','spdiameter']): 3033 RMCPdict['delta1'] = resdict['sharp'][0] 3034 3035 3036 print('PDFfit2 update under construction') 2950 3037 2951 3038 def MakefullrmcRun(pName,Phase,RMCPdict):
Note: See TracChangeset
for help on using the changeset viewer.