I want to simulate some diffraction patterns for given weight fractions, so I'm using Known_Weight_Percent. I've got several structures with this macro, with the last structure having a scale factor that can refine.
The diffraction data I'm putting in consists of just 1s over a range of 5-90 °2T, and I'm only interested in the model output. The only refineable parameter is the scale factor of one structure.
With one set of known weight percents, and allowing the last scale factor to refine, Topas does one iteration, and gives me back the weight percents that I asked it to give. The refined scale factor doesn't move. I get a maximum peak intensity depending on the scale factor I choose, but I choose it to be ~10000.
If I use the same weight percent values and fix the last scale factor I get wrong values.
If I use another set of weight fractions, and allow the last scale factor to refine, then Topas does about 50 iterations, and refines the scale factor such that the peak intensity is about 1.
What is going on? Why is the behaviour so different with the second set of weight percents?
.
Input file:
#define IT_WORKS
#ifdef IT_WORKS
macro NaAlH4_wt { 57.2 }
macro NaH_wt { 0.21 }
macro Na3AlH6_wt { 27.70 }
'Al should be ~14.9
#else 'IT_DOESNT_WORK
macro NaAlH4_wt { 1.71 }
macro NaH_wt { 29.22 }
macro Na3AlH6_wt { 23.52 }
'Al should be ~45.55
#endif
xdd test.xy
x_calculation_step = Yobs_dx_at(Xo); convolution_step 4
bkg 1
LP_Factor(0)
CuKa1(0.0001)
str
phase_name "Al"
scale @ 0.0035`
CS_L(, 100)
MVW( 107.926, 66.430, 14.911`)
space_group Fm-3m
Cubic( 4.050)
site Al1 num_posns 4 x 0 y 0 z 0 occ Al 1 beq 0.6
str
phase_name "NaAlH4"
Known_Weight_Percent(NaAlH4_wt)
MVW( 216.012, 286.252, 57.179`)
CS_L(, 100)
space_group I41/a
Tetragonal( 5.022, 11.35)
site Al1 num_posns 4 x 0 y 0 z 0 occ Al+3 1 beq 1.78
site Na1 num_posns 4 x 0 y 0 z 0.5 occ Na+1 1 beq 3.20
site H1 num_posns 16 x 0.228 y 0.117 z 0.838 occ H-1 1 beq 2.45
str
phase_name "NaH"
Known_Weight_Percent(NaH_wt)
MVW( 95.991, 116.930, 0.210`)
CS_L(, 100)
space_group Fm-3m
Cubic( 4.89)
site Na1 num_posns 4 x 0 y 0 z 0 occ Na+1 1 beq 1
site H1 num_posns 4 x 0.5 y 0.5 z 0.5 occ H-1 1 beq 1
str
phase_name "Na3AlH6"
Known_Weight_Percent(Na3AlH6_wt)
MVW( 203.997, 232.309, 27.700`)
CS_L(, 100)
space_group P21/n
be 89.86
a 5.412
b 5.533
c 7.758
site Al1 num_posns 2 x 0 y 0 z 0 occ Al+3 1 beq 1.16
site Na1 num_posns 2 x 0 y 0 z 0.5 occ Na+1 1 beq 2.49
site Na2 num_posns 4 x -0.006 y 0.461 z 0.252 occ Na+1 1 beq 2.49
site H1 num_posns 4 x 0.091 y 0.041 z 0.2153 occ H-1 1 beq 3.1
site H2 num_posns 4 x 0.234 y 0.328 z 0.544 occ H-1 1 beq 3.1
site H3 num_posns 4 x 0.165 y 0.2671 z 0.944 occ H-1 1 beq 3.1