'Template for small box PDF fit 'Save this file as "pdf_fit_01.inp" or similar 'Then replace any arrowed text in purple with suitable values for your refinement 'You'll need to have Phil Chater's PDF.inc file in your TOPAS directory or to add #include PDF.inc to the top of this file if it's in this directory '#include PDF.inc 'if file not already loaded by local.inc '#include ROOT##PDF-adps.inc 'you may need this line for ADP_5 work r_wp 18.733028 r_exp 63.9556833 r_p 18.4896568 gof 0.292906386 iters 10000 chi2_convergence_criteria 0.001 'continue_after_convergence 'do_errors 'Information on the datafile, typically in xy or xye format 'For PDFgetX3 you can just comment out any metadata with /*....*/ xdd SnO2_2MoO3_dofr.xye 'from 2/6/2017 pdf_data 'neutron_data 'uncomment this line for neutron data start_X 0.5 finish_X 50.0 'rebin_with_dx_of 0.02 ' rebin data if you need weighting = If(X < 1.5, 0, 1); 'calculate distances <1.5 A, but have them at zero weight in refinement dQ_damping(!dQ, 0.08) convolute_SoperLorch(!d_zero, 0.08) 'composition calculations 'Matt weighed out 0.070 g SnO2 and 0.131 g MoO3 prm !mass_perc_expected_sno2 = 100*0.070/(0.070+0.131);:34.8258706 prm !mass_perc_expected_moo3 = 100*0.131/(0.070+0.131);:65.1741294 prm frac 0.323979781` min 0 max 1 prm massTotal = massSnO2 + massMoO3; : 146.130991` '{{{SnO2 phase coordinates from Baur str phase_name SnO2 scale =frac; : 0.323979781` prm massSnO2 = Get(scale) (118.711 + 15.999 2); : 48.8266688` prm weight_percent_SnO2 = 100 massSnO2 / massTotal; : 33.4129457` a lpa 4.740575` min 4.7 max 4.8 'Baur value 4.7380 b lpa 4.740575` min 4.7 max 4.8 'Baur value 4.7380 c lpc 3.187914` min 3.1 max 3.2 'Baur value 3.1865 space_group "P42/mnm" site Sn1 num_posns 2 x 0. y 0. z 0. occ Sn 1. beq_rcut_rlo_spherical(!rcut1,2.5, beqcutsn1, 0.684974523`,!rlo1,2.0,beqlosn1, 0.00113260364`_LIMIT_MIN_0.001,beqhisn1, 0.175552894`,radius1, 5.04879002`) site O1 num_posns 4 x xo1 0.30517` y =Get(x); z 0. occ O 1. beq_rcut_rlo_spherical(!rcut1,2.5, beqcutox1, 0.494429389`,!rlo1,2.0,beqloox1, 4.85844084`,beqhiox1, 2.262931`,radius1, 5.04879002`) pdf_zero -0.01 '}}} '{{{ MoO3 phase coordinates from Kihlborg L (1963) Arkiv fuer Kemi 21: 357-364 str phase_name MoO3 prm massMoO3 = Get(scale) (95.94 + 15.999 3); : 97.3043223` prm weight_percent_MoO3 = 100 massMoO3 / massTotal; : 66.5870543` scale =(1-frac); : 0.676020219` a lpa4 3.965566` min 3.9 max 4.3 '3.962 b lpb4 13.858724` min 13.7 max 14.5 '13.855 c lpc4 3.699532` min 3.65 max 3.8 '3.701 al 90. be 90. ga 90. volume 203.318` space_group "Pbnm" macro C1(param,val,val2) {x param val min = val2 - 0.05; max = val2 + 0.05; val_on_continue = val2;} macro C2(param,val,val2) {y param val min = val2 - 0.05; max = val2 + 0.05; val_on_continue = val2;} macro C3(param,val,val2) {z param val min = val2 - 0.05; max = val2 + 0.05; val_on_continue = val2;} site Mo1 num_posns 4 C1(MxMo1, 0.08610` , 0.08669) C2(MyMo1, 0.10197` , 0.10164) C3(!MzMo1, 0.25000 , 0.25000) occ Mo 1.0 beq_rcut_rlo_spherical(!rcut2,2.5, beqcutmo2, 4.30881003`,!rlo2,2.0,beqlomo2, 9.92509841`_LIMIT_MAX_10,beqhimo2, 0.462560503`,radius2, 1.5435005`) site O1 num_posns 4 C1( MxO1, 0.50037` , 0.49940) C2( MyO1, 0.43403` , 0.43513) C3( !MzO1, 0.25000 , 0.25000) occ O 1.0 beq_rcut_rlo_spherical(!rcut2,2.5, beqcutox2, 0.0192215508`_LIMIT_MIN_0.001,!rlo2,2.0,beqloox2, 0.130802482`,beqhiox2, 2.00051579`,radius2, 1.5435005`) site O2 num_posns 4 C1( MxO2, 0.51427` , 0.52120) C2( MyO2, 0.09054` , 0.08657) C3( !MzO2, 0.25000 , 0.25000) occ O 1.0 beq_rcut_rlo_spherical(!rcut2,2.5, beqcutox2, 0.0192215508`,!rlo2,2.0,beqloox2, 0.130802482`,beqhiox2, 2.00051579`,radius2, 1.5435005`) site O3 num_posns 4 C1( MxO3, 0.01505` , 0.03730) C2( MyO3, 0.22702` , 0.22140) C3( !MzO3, 0.25000 , 0.25000) occ O 1.0 beq_rcut_rlo_spherical(!rcut2,2.5, beqcutox2, 0.0192215508`,!rlo2,2.0,beqloox2, 0.130802482`_LIMIT_MIN_0.001,beqhiox2, 2.00051579`,radius2, 1.5435005`) pdf_zero -0.01 '}}}