# Changeset 1475

Ignore:
Timestamp:
Aug 22, 2014 1:09:47 PM (9 years ago)
Message:

add MCSA tutorial to main gsasII.html web page
change difB tern from d3 to 1/d - works much better
make all TOF/2-theta to dsp & vv conversions with G2lat.Pos2dsp & Dsp2pos routines.

Location:
trunk
Files:
9 edited

Unmodified
Removed
• ## trunk/GSASIIlattice.py

 r1452 def Pos2dsp(Inst,pos): ''' convert powder pattern position (2-theta or TOF, musec) to d-spacing ignores secondary effects (e.g. difA,difB in TOF) ignores secondary effects (e.g. difB in TOF) ''' if 'C' in Inst['Type'][0]: wave = G2mth.getWave(Inst) dsp = wave/(2.0*sind((pos-Inst['Zero'][1])/2.0)) else:   #'T'OF - ignore difA, difB dsp = (pos-Inst['Zero'][1])/Inst['difC'][1] return dsp return wave/(2.0*sind((pos-Inst.get('Zero',[0,0])[1])/2.0)) else:   #'T'OF - ignore difB T = pos-Inst['Zero'][1] T1 = Inst['difC'][1]**2-4.*Inst['difA'][1]*T return 2.*T/(Inst['difC'][1]+np.sqrt(T1)) def Dsp2pos(Inst,dsp): if 'C' in Inst['Type'][0]: wave = G2mth.getWave(Inst) pos = 2.0*asind(wave/(2.*dsp))+Inst['Zero'][1] pos = 2.0*asind(wave/(2.*dsp))+Inst.get('Zero',[0,0])[1] else:   #'T'OF pos = Inst['difC'][1]*dsp+Inst['Zero'][1]+Inst['difA'][1]*dsp**2+Inst.get('difB',[0,0,False])[1]*dsp**3 pos = Inst['difC'][1]*dsp+Inst['Zero'][1]+Inst['difA'][1]*dsp**2+Inst.get('difB',[0,0,False])[1]/dsp return pos pos = 2.0*asind(parmdict['Lam']/(2.*dsp))+parmdict['Zero'] else:   #'T'OF pos = parmdict['difC']*dsp+parmdict['difA']*dsp**2+parmdict['difB']*dsp**3+parmdict['Zero'] pos = parmdict['difC']*dsp+parmdict['difA']*dsp**2+parmdict['difB']/dsp+parmdict['Zero'] return pos
• ## trunk/GSASIIplot.py

 r1474 try: Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters')) if 'C' in Parms['Type'][0]: wave = G2mth.getWave(Parms) if G2frame.qPlot and 'PWDR' in plottype: try: xpos = 2.0*asind(xpos*wave/(4*math.pi)) except ValueError:      #avoid bad value in asin beyond upper limit pass elif G2frame.dPlot: dsp = xpos q = 2.*np.pi/dsp xpos = 2.0*asind(wave/(2.*dsp)) dsp = 0.0 if abs(xpos) > 0.:                  #avoid possible singularity at beam center if 'PWDR' in plottype: dsp = wave/(2.*sind(abs(xpos)/2.0)) q = 2.*np.pi/dsp elif 'SASD' in plottype: dsp = 2*np.pi/xpos q = xpos if G2frame.Contour: if 'PWDR' in plottype: G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) elif 'SASD' in plottype: G2frame.G2plotNB.status.SetStatusText('d =%9.5f q = %9.5f pattern ID =%5d'%(dsp,q,int(ypos)),1) if G2frame.qPlot and 'PWDR' in plottype: q = xpos dsp = 2.*np.pi/q try: xpos = G2lat.Dsp2pos(Parms,2.0*np.pi/xpos) except ValueError:      #avoid bad value in asin beyond upper limit pass elif 'SASD' in plottype: q = xpos dsp = 2.*np.pi/q elif G2frame.dPlot: dsp = xpos q = 2.*np.pi/dsp xpos = G2lat.Dsp2pos(Parms,xpos) else: dsp = G2lat.Pos2dsp(Parms,xpos) q = 2.*np.pi/dsp if G2frame.Contour: #PWDR only if 'C' in Parms['Type'][0]: G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) else: G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) else: if 'C' in Parms['Type'][0]: if 'PWDR' in plottype: if G2frame.SqrtPlot: G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q = %9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) elif 'SASD' in plottype: G2frame.G2plotNB.status.SetStatusText('d =%9.5f q = %9.5f Intensity =%12.5g'%(dsp,q,ypos),1) else:       #TOF neutrons dsp = 0.0 difC = Parms['difC'][1] if G2frame.dPlot: dsp = xpos xpos = difC*dsp elif G2frame.qPlot and 'PWDR' in plottype: dsp = 2.*np.pi/xpos xpos = difC*dsp else: dsp = xpos/difC             #rough approx.! q = 2.*np.pi/dsp if G2frame.Contour: G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) G2frame.G2plotNB.status.SetStatusText('q =%12.5g Intensity =%12.5g d =%9.1f'%(q,ypos,dsp),1) else: if G2frame.SqrtPlot: G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1) G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q =%9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1) else: G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q = %9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q =%9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) if G2frame.itemPicked: Page.canvas.SetToolTipString('%9.5f'%(xpos)) except TypeError: return if 'C' in Parms['Type'][0]: wave = G2mth.getWave(Parms) else: difC = Parms['difC'][1] PickId = G2frame.PickId pick = event.artist if ind.all() != [0] and ObsLine[0].get_label() in str(pick):                                    #picked a data point data = G2frame.PatternTree.GetItemPyData(G2frame.PickId) if 'C' in Parms['Type'][0]: if G2frame.qPlot:                              #qplot - convert back to 2-theta xy[0] = 2.0*asind(xy[0]*wave/(4*math.pi)) elif G2frame.dPlot:                            #dplot - convert back to 2-theta xy[0] = 2.0*asind(wave/(2.*xy[0])) elif 'T' in Parms['Type'][0]: if G2frame.qPlot:                              #qplot - convert back to TOF xy[0] = 2.0*math.pi*difC/xy[0] elif G2frame.dPlot:                            #dplot - convert back to TOF xy[0] *= difC if G2frame.qPlot:                              #qplot - convert back to 2-theta xy[0] = G2lat.Dsp2pos(Parms,2*np.pi/xy[0]) elif G2frame.dPlot:                            #dplot - convert back to 2-theta xy[0] = G2lat.Dsp2pos(Parms,xy[0]) XY = G2mth.setPeakparms(Parms,Parms2,xy[0],xy[1]) data['peaks'].append(XY) LimitId = G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Limits') data = G2frame.PatternTree.GetItemPyData(LimitId) if 'C' in Parms['Type'][0]:                            #CW data - TOF later in an elif if G2frame.qPlot and 'PWDR' in plottype:                              #qplot - convert back to 2-theta xy[0] = 2.0*asind(xy[0]*wave/(4*math.pi)) elif G2frame.dPlot:                            #dplot - convert back to 2-theta xy[0] = 2.0*asind(wave/(2.*xy[0])) elif 'T' in Parms['Type'][0]: if G2frame.qPlot:                              #qplot - convert back to TOF xy[0] = 2.0*math.pi*difC/xy[0] elif G2frame.dPlot:                            #dplot - convert back to TOF xy[0] *= difC if G2frame.qPlot:                              #qplot - convert back to 2-theta xy[0] = G2lat.Dsp2pos(Parms,2*np.pi/xy[0]) elif G2frame.dPlot:                            #dplot - convert back to 2-theta xy[0] = G2lat.Dsp2pos(Parms,xy[0]) if G2frame.ifGetExclude: excl = [0,0] return Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters')) if 'C' in Parms['Type'][0]: wave = G2mth.getWave(Parms) else: difC = Parms['difC'][1] xpos = event.xdata PickId = G2frame.PickId id2 = lineNo%2 if G2frame.qPlot and 'PWDR' in plottype: if 'C' in Parms['Type'][0]: data[id][id2] = 2.0*asind(wave*xpos/(4*math.pi)) else: data[id][id2] = 2*math.pi*Parms['difC'][1]/xpos data[id][id2] = G2lat.Dsp2pos(Parms,2.*np.pi/xpos) elif G2frame.dPlot and 'PWDR' in plottype: if 'C' in Parms['Type'][0]: data[id][id2] = 2.0*asind(wave/(2*xpos)) else: data[id][id2] *= Parms['difC'][1] data[id][id2] = G2lat.Dsp2pos(Parms,xpos) else: data[id][id2] = xpos else: if G2frame.qPlot: if 'C' in Parms['Type'][0]: data['peaks'][lineNo-2][0] = 2.0*asind(wave*xpos/(4*math.pi)) else: data['peaks'][lineNo-2][0] = 2*math.pi*Parms['difC'][1]/xpos data['peaks'][lineNo-2][0] = G2lat.Dsp2pos(Parms,2.*np.pi/xpos) elif G2frame.dPlot: if 'C' in Parms['Type'][0]: data['peaks'][lineNo-2][0] = 2.0*asind(wave/(2*xpos)) else: data['peaks'][lineNo-2][0] *= Parms['difC'][1] data['peaks'][lineNo-2][0] = G2lat.Dsp2pos(Parms,xpos) else: data['peaks'][lineNo-2][0] = xpos if G2frame.qPlot and 'PWDR' in plottype: Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root, Pattern[2]) if 'C' in Parms['Type'][0]: X = 4*np.pi*npsind((xye[0]-Zero)/2.0)/wave else: X = 2*np.pi*Parms['difC'][1]/(xye[0]-Zero) X = 2.*np.pi/G2lat.Pos2dsp(Parms,xye[0]) elif G2frame.dPlot and 'PWDR' in plottype: Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root, Pattern[2]) if 'C' in Parms['Type'][0]: X = wave/(2.*npsind(xye[0]-Zero)/2.0) else: X = (xye[0]-Zero)/Parms['difC'][1] X = G2lat.Pos2dsp(Parms,xye[0]) else: X = xye[0]-Zero X = xye[0] if not lenX: lenX = len(X) if LimitId and ifpicked: limits = np.array(G2frame.PatternTree.GetItemPyData(LimitId)) lims = limits[1] if G2frame.qPlot and 'PWDR' in plottype: if 'C' in Parms['Type'][0]: limits = 4*np.pi*npsind(limits/2.0)/wave else: limits = 2*np.pi*difC/limits lims = 2.*np.pi/G2lat.Pos2dsp(Parms,lims) elif G2frame.dPlot and 'PWDR' in plottype: if 'C' in Parms['Type'][0]: limits = wave/(2*npsind(limits/2.0)) else: limits /= difC Lines.append(Plot.axvline(limits[1][0],color='g',dashes=(5,5),picker=3.)) Lines.append(Plot.axvline(limits[1][1],color='r',dashes=(5,5),picker=3.)) lims = G2lat.Pos2dsp(Parms,lims) Lines.append(Plot.axvline(lims[0],color='g',dashes=(5,5),picker=3.)) Lines.append(Plot.axvline(lims[1],color='r',dashes=(5,5),picker=3.)) for i,item in enumerate(limits[2:]): Lines.append(Plot.axvline(item[0],color='m',dashes=(5,5),picker=3.)) for item in data['peaks']: if G2frame.qPlot: if 'C' in Parms['Type'][0]: Lines.append(Plot.axvline(4*math.pi*sind(item[0]/2.)/wave,color=colors[N%6],picker=2.)) else: Lines.append(Plot.axvline(2*math.pi*difC/item[0],color=colors[N%6],picker=2.)) if G2frame.dPlot: if 'C' in Parms['Type'][0]: Lines.append(Plot.axvline(wave/(2*sind(item[0]/2.)),color=colors[N%6],picker=2.)) else: Lines.append(Plot.axvline(item[0]/difC,color=colors[N%6],picker=2.)) Lines.append(Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,item[0]),color=colors[N%6],picker=2.)) elif G2frame.dPlot: Lines.append(Plot.axvline(G2lat.Pos2dsp(Parms,item[0]),color=colors[N%6],picker=2.)) else: Lines.append(Plot.axvline(item[0],color=colors[N%6],picker=2.)) if PickId and not G2frame.Contour: Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Instrument Parameters')) if 'C' in Parms['Type'][0]: wave = G2mth.getWave(Parms) else: difC = Parms['difC'][1] if G2frame.PatternTree.GetItemText(PickId) in ['Index Peak List','Unit Cells List']: peaks = np.array((G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Index Peak List'))))[0] for peak in peaks: if G2frame.qPlot: if 'C' in Parms['Type'][0]: Plot.axvline(4*np.pi*sind(peak[0]/2.0)/wave,color='b') else: Plot.axvline(2*np.pi*Parms['difC'][1]/peak[0],color='b') Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,peak[0]),color='b') if G2frame.dPlot: if 'C' in Parms['Type'][0]: Plot.axvline(wave/(2*sind(peak[0]/2.0)),color='b') else: Plot.avline(peak[0]/Parms['difC'][1],color='b') Plot.axvline(G2lat.Pos2dsp(Parms,peak[0]),color='b') else: Plot.axvline(peak[0],color='b') for hkl in G2frame.HKL: if G2frame.qPlot: if 'C' in Parms['Type'][0]: Plot.axvline(4*np.pi*sind(hkl[5]/2.0)/wave,color='b') else: Plot.axvline(2*np.pi*Parms['difC'][1]/hkl[5],color='b') Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,hkl[5]),color='r',dashes=(5,5)) if G2frame.dPlot: if 'C' in Parms['Type'][0]: Plot.axvline(wave/(2*sind(hkl[5]/2.0)),color='b') else: Plot.avline(hkl[5]/Parms['difC'][1],color='b') Plot.axvline(G2lat.Pos2dsp(Parms,hkl[5]),color='r',dashes=(5,5)) else: Plot.axvline(hkl[5],color='r',dashes=(5,5))
• ## trunk/GSASIIpwdGUI.py

 r1466 G2indx.IndexPeaks(peaks,G2frame.HKL) for hkl in G2frame.HKL: hkl.append(G2lat.Dsp2pos(Inst,hkl[3])++controls[1]) hkl.append(G2lat.Dsp2pos(Inst,hkl[3])+controls[1]) if 'PKS' in G2frame.PatternTree.GetItemText(G2frame.PatternId): G2plt.PlotPowderLines(G2frame)
• ## trunk/GSASIIstrIO.py

 r1460 Phi.append(phi) elif 'T' in inst['Type'][0]: pos = inst['difC'][1]*d+inst['difA'][1]*d**2+inst['difB'][1]*d**3+Zero pos = inst['difC'][1]*d+inst['difA'][1]*d**2+inst['difB'][1]/d+Zero if limits[0] < pos < limits[1]: wave = inst['difC'][1]*d/(252.816*inst['fltPath'][0])
• ## trunk/GSASIIstrMath.py

 r1474 pos -= const*(parmDict[hfx+'DisplaceX']*cosd(pos)+parmDict[hfx+'DisplaceY']*sind(pos)) elif 'T' in calcControls[hfx+'histType']: pos = parmDict[hfx+'difC']*d+parmDict[hfx+'difA']*d**2+parmDict[hfx+'difB']*d**3+parmDict[hfx+'Zero'] pos = parmDict[hfx+'difC']*d+parmDict[hfx+'difA']*d**2+parmDict[hfx+'difB']/d+parmDict[hfx+'Zero'] #do I need sample position effects - maybe? return pos dpdDC = dsp dpdDA = dsp**2 dpdDB = dsp**3 dpdDB = 1./dsp return dpdA,dpdZ,dpdDC,dpdDA,dpdDB
• ## trunk/help/MCSA in GSAS.htm

 r1474 vondreeleVon Dreele13572145792014-08-19T14:01:00Z2014-08-20T21:24:00Z2014-08-22T13:42:00Z9241713779241813784Argonne National Laboratory11432161641617014.00 letter-spacing:.25pt;} a:link, span.MsoHyperlink {mso-style-priority:99; {mso-style-noshow:yes; mso-style-priority:99; color:blue; text-decoration:underline; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-hansi-font-family:Calibri;

In these exercises you will use GSAS-II to solve the structures of 3-aminoquinoline and α-d-lactose monohydrate from powder diffraction data via Monte Carlo/Simulated Annealing (MC/SA). The data sets were kindly provided by Peter Stephens (SUNY StonyBrook) diffraction data via Monte Carlo/Simulated Annealing (MC/SA). The data sets were kindly provided by Peter Stephens (SUNY StonyBrook) and were originally collected on NSLS beam line X17b. The MC/SA technique is needed in these cases because as you will see the data does not extend very far

src="MCSA%20in%20GSAS_files/image002.gif" v:shapes="_x0000_i1051">

style='font:7.0pt "Times New Roman"'>      Select Sample Parameters and uncheck refinement of Histogram scale factor.

mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Sample Parameters and uncheck refinement of Histogram scale factor.

src="MCSA%20in%20GSAS_files/image004.gif" v:shapes="Picture_x0020_2">

src="MCSA%20in%20GSAS_files/image006.gif" v:shapes="Picture_x0020_3">

src="MCSA%20in%20GSAS_files/image008.gif" v:shapes="Picture_x0020_28">

src="MCSA%20in%20GSAS_files/image010.gif" v:shapes="Picture_x0020_5">

src="MCSA%20in%20GSAS_files/image012.gif" v:shapes="Picture_x0020_6">

src="MCSA%20in%20GSAS_files/image014.gif" v:shapes="Picture_x0020_7">

src="MCSA%20in%20GSAS_files/image016.gif" v:shapes="Picture_x0020_33">

Step 6. Setup for Monte Carlo/Simulated Annealing

The molecular structure of 3-aminoquinoline is two aromatic rings with one N-substituted position and an amino side group

The molecular structure of 3-aminoquinoline is two aromatic rings with one N-substituted position and an amino side group

src="MCSA%20in%20GSAS_files/image018.jpg" v:shapes="Picture_x0020_34">

MC/SA structure solution consists of optimizing the position

src="MCSA%20in%20GSAS_files/image020.gif" v:shapes="Picture_x0020_35">

cropbottom="15961f" cropleft="36898f" cropright="13504f"/>

src="MCSA%20in%20GSAS_files/image022.jpg" v:shapes="Picture_x0020_1">

cropbottom="16027f" cropleft="37724f" cropright="12673f"/>

src="MCSA%20in%20GSAS_files/image024.jpg" v:shapes="Picture_x0020_36">

necessary. You should change the Residue name to something meaningful, I used amino.

mso-hansi-theme-font:minor-latin'>Residue name to something meaningful, I used amino.

Next go to

src="MCSA%20in%20GSAS_files/image026.gif" v:shapes="Picture_x0020_37">

src="MCSA%20in%20GSAS_files/image027.jpg" v:shapes="Picture_x0020_14">

src="MCSA%20in%20GSAS_files/image047.gif" v:shapes="Picture_x0020_16">

src="MCSA%20in%20GSAS_files/image049.gif" v:shapes="Picture_x0020_19">

cropbottom="16530f" cropleft="37715f" cropright="13079f"/>

src="MCSA%20in%20GSAS_files/image051.jpg" v:shapes="Picture_x0020_20">

If you are lucky (like I was!) then the result is clearly a good solution with a very low Residual (~4.8%). This problem typically gives suitable solutions with Residuals of 4-5%. If no good solution appears (e.g. molecules clashing), then you should just rerun MC/SA perhaps using more runs or more trials. Be sure to set the Keep box for any solutions you want to retain; the others will be cleared before the next MC/SA run starts. When you think you have a good one, Select it; the mso-hansi-theme-font:minor-latin'>General tab.

MC/SA refinement of a solution is achieved by narrowing the search ranges and rerunning the MC/SA calculations. This is done by checking the MC/SA Refine box. Using 10% of the ranges reduces the search volume in this case by ~6 orders of magnitude so that the true minimum is much easier to find. Now rerun Compute/MC/SA; be sure to select the best one before starting. The residual should drop to a much lower level. This refinement can be repeated with tighter restriction on the ranges; I used 5% for a final run and got

orders of magnitude so that the true minimum is much easier to find. Now rerun Compute/MC/SA; be sure to select the best one before starting. The residual should drop to a much lower level. This refinement can be repeated with tighter restriction on the ranges; I used 5% for a final run and got

src="MCSA%20in%20GSAS_files/image053.gif" v:shapes="Picture_x0020_22">

cropbottom="16469f" cropleft="37988f" cropright="12498f"/>

src="MCSA%20in%20GSAS_files/image055.jpg" v:shapes="Picture_x0020_23">

cropbottom="21852f" cropleft="3509f" cropright="49103f"/>

src="MCSA%20in%20GSAS_files/image057.jpg" v:shapes="Picture_x0020_24">

as drawn by the Mercury program

mso-hansi-theme-font:minor-latin'>Atoms list do MC/SA/Move Mc/SA solution; the drawing will show the new atom positions

minor-latin;mso-hansi-theme-font:minor-latin'>MC/SA/Move MC/SA solution; the drawing will show the new atom positions

src="MCSA%20in%20GSAS_files/image072.jpg" v:shapes="Picture_x0020_25">

And they will be listed in the Atoms table.

src="MCSA%20in%20GSAS_files/image076.gif" v:shapes="Picture_x0020_26">

It is now ready for Rietveld

After a few simple steps the 3-aminoquinoline structure will be ready for the first Rietveld refinement: 1) Uncheck the General tab uncheck the Do Pawley refinement? box, 2) check the Data window, using the uniaxial mso-hansi-theme-font:minor-latin'>Data window, using the uniaxial model for mustrain, check both RB Models tab; it will be empty. Do Edit/Assign atoms to rigid body; then select amino in the Select rigid body model pulldown (the only choice). The RB Models window will show

minor-latin'>RB Models tab; it will be empty. Do Edit/Assign atoms to rigid body; then select amino in the Select rigid body model pull down (the only choice). The RB Models window will show

src="MCSA%20in%20GSAS_files/image077.gif" v:shapes="Picture_x0020_27">

minor-latin'>Ready when done; the structure will be drawn with yellow bonds indicating that it is now a rigid body and not independent atoms. The RB Models window shows the new rigid body

atoms. The RB Models window shows the new rigid body

src="MCSA%20in%20GSAS_files/image078.gif" v:shapes="Picture_x0020_29">

To refine the rigid body parameters check the Calculate/Refine; after a couple of refinement runs I got an Rwp ~7.9% and the RBModels window shows the new parameters

of refinement runs I got an Rwp ~7.9% and the RBModels window shows the new parameters

src="MCSA%20in%20GSAS_files/image079.gif" v:shapes="Picture_x0020_32">

and the profile shows the fit

src="MCSA%20in%20GSAS_files/image080.gif" v:shapes="Picture_x0020_31">

This completes the structure analysis for 3-aminoquinoline.

• ## trunk/help/MCSA in GSAS_files/filelist.xml

 r1474
• ## trunk/help/MCSA in GSAS_files/props061.xml

 r1474
• ## trunk/help/gsasII.html

 r1347 Von DreeleVon Dreele144399514539972011-11-28T16:49:00Z2014-05-15T15:02:00Z210871619712014-08-22T13:28:00Z281088862064Argonne National Laboratory516517145726977280714.00 href="Charge%20Flipping%20-%20sucrose.htm">sucrose

Monte Carlo/Simulated Annealing structure solution –

MCSA in GSAS-II

Small angle image processing

This is a hierarchical view of the data items in your GSAS-II project (name.gpx). Clicking on any item in the tree opens a window where information in that item can be viewed or edited. For example, the "Sample is a hierarchical view of the data items in your GSAS-II project (name.gpx). Clicking on any item in the tree opens a window where information in that item can be viewed or edited. For example, the "Sample Parameters" item under a ‘PWDR’ entry contains information about how data were collected, such as the sample temperature (see class=SpellE>gpx file (e.g. name.bak3.gpx) to recover a previous version of your project. Remember to Save As… to e.g. name.gpx to overwrite the current version. Otherwise you will get backups of your backup file (e.g. name.bak3.bak0.gpx, etc.).

to e.g. name.gpx to overwrite the current version. Otherwise you will get backups of your backup file (e.g. name.bak3.bak0.gpx, etc.).

, it will be saved there. Otherwise, you will be prompted for a new name in a file dialog (you may change directory as well). If the file exists, you will be asked if it OK to overwrite.

directory as well). If the file exists, you will be asked if it OK to overwrite.

c.       Sum powder data – Form the sum of previously read powder patterns; each with a multiplier. Can be used to accumulate data, subtract background or empty container patterns, etc. Patterns used to form the sum must be of identical range and step size. Result is a new PWDR entry in the GSAS-II data tree.

style='mso-bidi-font-weight:normal'>Sum powder data – Form the sum of previously read powder patterns; each with a multiplier. Can be used to accumulate data, subtract background or empty container patterns, etc. Patterns used to form the sum must be of identical range and step size. Result is a new PWDR entry in the GSAS-II data tree.

General tab is opened for this phase; you should first select the phase type, enter the space group symbol and then lattice parameters. Note that nonstandard space group symbols are permitted; there must be spaces between the axial fields (e.g. use ‘P n a 21’ not ‘Pna21’).

should first select the phase type, enter the space group symbol and then lattice parameters. Note that nonstandard space group symbols are permitted; there must be spaces between the axial fields (e.g. use ‘P n a 21’ not ‘Pna21’).

g.      Rename data – This might be a bad idea!! Don’t use this unless the data to be renamed has not been used anywhere in GSAS-II, e.g. only rename freshly read data.

style='mso-bidi-font-weight:normal'>Rename data – This might be a bad idea!! Don’t use this unless the data to be renamed has not been used anywhere in GSAS-II, e.g. only rename freshly read data.

PDB file - This reads the macromolecular phase information from a Protein Data Base file (name.PDB or name.ENT). The file name is found in a directory dialog; you can change directories as needed. Only .PDB (or .pdb) or .ENT (or .ent) file names are shown. Be careful that the space group symbol on the ‘CRYST1’ record in the PDB file follows the GSAS-II conventions (e.g. with spaces between axial fields). A dialog box is shown with the proposed phase name. You can change it if desired.

name.ENT). The file name is found in a directory dialog; you can change directories as needed. Only .PDB (or .pdb) or .ENT (or .ent) file names are shown. Be careful that the space group symbol on the ‘CRYST1’ record in the PDB file follows the GSAS-II conventions (e.g. with spaces between axial fields). A dialog box is shown with the proposed phase name. You can change it if desired.

2.      from F HKL file This reads structure factors (as F) and sig(F) from a SHELX format .from F HKL file This reads structure factors (as F) and sig(F) from a SHELX format .hkl file. The file names are found in a directory dialog; you can change directories as needed. You must know this is the content of this

This window provides a place for you to enter whatever text commentary you wish. Each time you enter this window, a date/time entry is provided for you. A possibly useful technique is to select a portion of the project.lst window provides a place for you to enter whatever text commentary you wish. Each time you enter this window, a date/time entry is provided for you. A possibly useful technique is to select a portion of the project.lst file after a refinement completes (it will contain refinement results with residuals, new values & esds) and paste it into style='mso-fareast-font-family:"Times New Roman"'>2.      Select ‘Min delta-M/M’ for convergence; the refinement will stop when the change in the minimization function is less than this value. Set Min delta-M/M = 1.0 to force just a single cycle to be performed. A value less than 10-4 (the default) generally gives no better result. The allowed range is 10-9 to 1.0.

style='mso-fareast-font-family:"Times New Roman"'>Select ‘Min delta-M/M’ for convergence; the refinement will stop when the change in the minimization function is less than this value. Set Min delta-M/M = 1.0 to force just a single cycle to be performed. A value less than 10-4 (the default) generally gives no better result. The allowed range is 10-9 to 1.0.

1*P1+M2*P2=0; usually M1=1.0 and M2=-1.0, but can be changed via the ‘Edit’ button. The keyword ‘EQUIV’ marks it as an equivalence. A Delete button can be used to remove it.

M1=1.0 and M2=-1.0, but can be changed via the ‘Edit’ button. The keyword ‘EQUIV’ marks it as an equivalence. A Delete button can be used to remove it.

You can examine the table of restraints and change individual values; grayed out regions cannot be changed. The ‘calc’ values are determined from the atom positions in your structure, ‘obs’ values are the target values for the restraint and ‘esd’ is the uncertainty used to weight the restraint in the refinement (multiplied by the weight factor).

The ‘calc’ values are determined from the atom positions in your structure, ‘obs’ values are the target values for the restraint and ‘esd’ is the uncertainty used to weight the restraint in the refinement (multiplied by the weight factor).

Change value – this changes the ‘obsd’ value for selected restraints; a dialog box will appear asking for the new value.

changes the ‘obsd’ value for selected restraints; a dialog box will appear asking for the new value.

– this will create a text file of selected columns with values and corresponding esds. A file dialog box will appear; give a suitable file name; you may change directory if columns with values and corresponding esds. A file dialog box will appear; give a suitable file name; you may change directory if desired.

This window shows the limits in position to be used in any fitting for this powder pattern. The ‘original’ values are obtained from the minimum & maximum values in the powder pattern. You can modify ‘changed’ as needed.

pattern. The ‘original’ values are obtained from the minimum & maximum values in the powder pattern. You can modify ‘changed’ as needed.

What can I do here?
style='mso-fareast-font-family:"Times New Roman";color:windowtext'>Save – this saves the sample parameters to a file with the extension ’.samprm’. A file dialog box color:windowtext;font-weight:normal;mso-bidi-font-weight:bold'> – this saves the sample parameters to a file with the extension ’.samprm’. A file dialog box will appear to ask for the file name.Menu ‘Operations’ – Load/Reload – loads the peak positions & intensities from the Peak List to make them available for the indexing routine. The d-obs is obtained from Bragg’s Law after applying the Zero correction shown on the Load/Reload – loads the peak positions & intensities from the Peak List to make them available for the indexing routine. The d-obs is obtained from Bragg’s Law after applying the Zero correction shown on the Instrument style='mso-list:Ignore'>4.      Menu ‘Cell Index/Refine’

"Times New Roman"'>Menu ‘Cell Index/Refine’

Select the zone – select between 100, 010 or 001; plot axes will be labeled accordingly.

the zone – select between 100, 010 or 001; plot axes will be labeled accordingly.

Search maps – search the computed Fourier map. Peaks that are above ‘Peak cutoff’ % of the maximum will be found in this procedure; they will be printed on the console and will be shown in the ‘Map peaks– This performs a charge flipping ab initio structure solution using the method of Oszlanyi & Suto (Acta Cryst. A60, 134-141, 2004). You will need to select a source for the reflection set and perhaps select an element for normalization by its form factor, a resolution limit (usually 0.5A) and a charge flip threshold (usually 0.1); these are found at the bottom of the General window. A progress bar showing the charge flip residual is shown while the charge flip is in operation. When the residual is no longer decreasing (be patient – it doesn’t necessarily fall continuously), press the Cancel using the method of Oszlanyi & Suto (Acta Cryst. A60, 134-141, 2004). You will need to select a source for the reflection set and perhaps select an element for normalization by its form factor, a resolution limit (usually 0.5A) and a charge flip threshold (usually 0.1); these are found at the bottom of the General window. A progress bar showing the charge flip residual is shown while the charge flip is in operation. When the residual is no longer decreasing (be patient – it doesn’t necessarily fall continuously), press the Cancel button to stop the charge flipping. The resulting map will be positioned to properly place symmetry operators (NB: depends on the quality of the resulting Phase type – this can only be set when there are no atoms in the Atoms page for this phase. Select it when the phase is initialized.

style='mso-fareast-font-family:"Times New Roman"'>this can only be set when there are no atoms in the Atoms page for this phase. Select it when the phase is initialized.

Reflection set from – This is the source of structure factors to be used in a charge flip calculation. These may be either a single crystal data set, or structure factors extracted from a powder pattern via a Pawley refinement or a Rietveld refinement. – This is the source of structure factors to be used in a charge flip calculation. These may be either a single crystal data set, or structure factors extracted from a powder pattern via a Pawley refinement or a Rietveld refinement.

Normalizing element – This is an element form factor chosen to normalize the structure factors before charge flipping. – This is an element form factor chosen to normalize the structure factors before charge flipping. None (the default) can be selected from the lower right of the Periodic Table display shown when this is selected.7.      Monte Carlo/Simulated Annealing controls are at the bottom of the window. (Future capability & under development).

style='mso-fareast-font-family:"Times New Roman"'>Monte Carlo/Simulated Annealing controls are at the bottom of the window. (Future capability & under development).

– This is the source of structure factors to be used in a charge flip calculation. These may be either a single crystal data set, or structure factors extracted from a powder pattern via a Pawley refinement or a Rietveld calculation. These may be either a single crystal data set, or structure factors extracted from a powder pattern via a Pawley refinement or a Rietveld refinement.

text-underline:none'>

This is the table of parameters for the atoms in this crystal structure model. The menu controls allow manipulation of the values, refinement flags as well as initiate calculations of geometrical values (distances & angles) among the atoms.

This is the table of parameters for the atoms in this crystal structure model. The menu controls allow manipulation of the values, refinement flags as well as initiate calculations of geometrical values (distances & angles) among the atoms.

What can I do here?Ctrl LMB – on a row number selects/deselects the atom.

style='mso-fareast-font-family:"Times New Roman"'> – on a row number selects/deselects the atom.

2.      Double left click a Type column heading: a dialog box is shown that allows you to select all atoms with that type.

left click a Type column heading
: a dialog box is shown that allows you to select all atoms with that type.

Uiso and frac will give popup for new value to be used for all selected atoms.

style='mso-bidi-font-weight:normal'>frac will give popup for new value to be used for all selected atoms.

Distances & Angles – compute distances and angles with esds (if possible) for selected atoms. A popup dialog box will appear with distance angle controls. NB: if atoms have been added or their type changed, you may need to do a Reset box will appear with distance angle controls. NB: if atoms have been added or their type changed, you may need to do a Reset of this dialog box before proceeding.

This gives a list of the atoms and bonds that are to be rendered as lines, van der Waals radii balls, sticks, balls & sticks, ellipsoids & sticks or polyhedra. There are two menus for this tab; Edit allows modification of the list of atoms to be rendered and Compute gives some options for geometric characterization of selected atoms.

rendered as lines, van der Waals radii balls, sticks, balls & sticks, ellipsoids & sticks or polyhedra. There are two menus for this tab; Edit allows modification of the list of atoms to be rendered and Compute gives some options for geometric characterization of selected atoms.

What can I do here?NB: beware of atoms that are hiding behind the one you are trying to select, they may be selected inadvertently. You can rotate the structure anytime during the selection process.

selected inadvertently. You can rotate the structure anytime during the selection process.

h.      Fill CN-sphere – using the atoms currently in the draw atom table, find all atoms that belong in the coordination sphere around the selected atoms via unit cell translations. NB: symmetry operations are not used in this search.

style='mso-bidi-font-weight:normal'>Fill CN-sphere – using the atoms currently in the draw atom table, find all atoms that belong in the coordination sphere around the selected atoms via unit cell translations. NB: symmetry operations are not used in this search.

c.       Best plane – when 4 or more atoms are selected, a best plane is determined for them. The result is shown on the console window; it may be cut & pasted to another application (e.g. Microsoft Word). Shown are the atom coordinates transformed to Cartesian best plane coordinates where the largest range is over the X-axis and the smallest is over the Z-axis with the origin at the unweighted center of the selection. Root mean square displacements along each axis for the best plane are also listed. The Z-axis RMS value indicates the flatness of the proposed plane. NB: if you select (e.g. all) atoms then Best plane will give Cartesian coordinates for these atoms with respect to a coordinate system where the X-axis is along the longest axis of the atom grouping and the Z-axis is along the shortest distance. The origin is at the unweighted center of the selected atoms.

style='mso-bidi-font-weight:normal'>Best plane – when 4 or more atoms are selected, a best plane is determined for them. The result is shown on the console window; it may be cut & pasted to another application (e.g. Microsoft Word). Shown are the atom coordinates transformed to Cartesian best plane coordinates where the largest range is over the X-axis and the smallest is over the Z-axis with the origin at the unweighted center of the selection. Root mean square displacements along each axis for the best plane are also listed. The Z-axis RMS value indicates the flatness of the proposed plane. NB: if you select (e.g. all) atoms then Best plane will give Cartesian coordinates for these atoms with respect to a coordinate system where the X-axis is along the longest axis of the atom grouping and the Z-axis is along the shortest distance. The origin is at the unweighted center of the selected atoms.

RB Models

style='mso-bookmark:Pawley'>2.      You can change the refine flags either by clicking on the box or by selecting one and then selecting the column (a single click on the column heading). Then type ‘y’ to set the refine flags or ‘n’ to clear the flags. You should deselect those reflections that fall below the lower limit or above the upper limit of the powder pattern otherwise you may have a singular matrix error in your Pawley refinement.

You can change the refine flags either by clicking on the box or by selecting one and then selecting the column (a single click on the column heading). Then type ‘y’ to set the refine flags or ‘n’ to clear the flags. You should deselect those reflections that fall below the lower limit or above the upper limit of the powder pattern otherwise you may have a singular matrix error in your Pawley refinement.

: contour off/on – this turns off contouring and returns to a waterfall plot with any offsets applied.

style='mso-fareast-font-family:"Times New Roman"'> – this turns off contouring and returns to a waterfall plot with any offsets applied.

The variance-covariance matrix as a color coded array is shown on this page. The color bar to the right shows the range of covariances (-1 to 1) and corresponding colors. The parameter names are to the right and the parameter numbers are below the plot.

Move the mouse cursor across the plot. If on a diagonal cell, the parameter name, value and esd is shown both as a tool tip and in the right hand portion of the status bar. If the cursor is off the diagonal, the two parameter names and their covariance are shown in the tool tip and the status bar.

and in the right hand portion of the status bar. If the cursor is off the diagonal, the two parameter names and their covariance are shown in the tool tip and the status bar.

p/d) from the Gaussian and Lorentzian parts of the profile function. The computed curves are based on the values of U, V, W, X and Y shown in the Instrument Parameters window in parentheses. These are the values for the instrument contribution that were set when the powder pattern was first read in to GSAS-II. If individual peak fitting has been performed, the values of ‘sig’ & ‘gam’ for the peaks are plotted as ‘+’; these are computed from the fitted values of U, V, W, X and Y as well as any sig or gam individually refined.

from the Gaussian and Lorentzian parts of the profile function. The computed curves are based on the values of U, V, W, X and Y shown in the Instrument Parameters window in parentheses. These are the values for the instrument contribution that were set when the powder pattern was first read in to GSAS-II. If individual peak fitting has been performed, the values of ‘sig’ & ‘gam’ for the peaks are plotted as ‘+’; these are computed from the fitted values of U, V, W, X and Y as well as any sig or gam individually refined.

Note: See TracChangeset for help on using the changeset viewer.