Q ordering vectors

Hello Burnman Community,

I had a question regarding the transformation of a complete set of independent endmembers defined in speciation space (using site fractions) to a set of compositional endmembers (defined by bulk paramters, total apfu without designation to an site) and a set of Q ordering vectors that partitions the bulk paramters as defined in atoms per formula unit between different sites. I have seen the example given in MyHill & Connolly (2021). Unfortunately, when I was looking in the Burnman files I saw that Table 9 which deals with this problem is not reproduced in the Burnman files associated with the paper. I therefore tried it myself in Mathematica using the text of the paper.

  1. I first make a stochiometry matrix using bulk parameters in atoms per formula units (apfu) (Sind)

(* 13 bulk components: {na, ca, vac, fe, mg, al, fef, Ti, Si, B, OH, F, O} *) (stochiometry matrix)
shrlB = {1, 0, 0, 3, 0, 6, 0, 0, 6, 3, 4, 0, 0};
dravB = {1, 0, 0, 0, 3, 6, 0, 0, 6, 3, 4, 0, 0};
uvitB = {0, 1, 0, 0, 4, 5, 0, 0, 6, 3, 4, 0, 0};
fuvitB = {0, 1, 0, 4, 0, 5, 0, 0, 6, 3, 4, 0, 0};
ffoitB = {0, 0, 1, 2, 0, 7, 0, 0, 6, 3, 4, 0, 0};
olenB = {1, 0, 0, 0, 0, 9, 0 , 0, 6, 3, 1, 0, 3};
dravdisB = {1, 0, 0, 0, 3, 6, 0, 0, 6, 3, 4, 0, 0}; (same bulk as drav)
oxydravB = {1, 0, 0, 0, 2, 7, 0, 0, 6, 3, 3, 0, 1};
FuvitB = {0, 1, 0, 0, 4, 5, 0, 0, 6, 3, 3, 1, 0};
FbuergB = {1, 0, 0, 0, 0, 6, 3, 0, 6, 3, 0, 1, 3};
Tidravite = {1, 0, 0, 0, 1, 6, 0, 2, 6, 3, 0, 0, 4};
BolenB = {1, 0, 0, 0, 0, 9, 0 , 0, 3, 6, 4, 0, 0};
AORB = {0, 0, 1, 0, 0, 10, 0 , 0, 5, 3, 3, 0, 1};
PovB = {1, 0, 0, 0, 2, 0, 7, 0, 6, 3, 3, 0, 1};

sind = {shrlB, dravB, uvitB, fuvitB, ffoitB, olenB, dravdisB,
oxydravB, FuvitB, FbuergB, Tidravite, BolenB, AORB, PovB};
sindT = Transpose[sind];

  1. I take the Nullspace of this matrix to obtain the reactions between independent endmembers (in speciation space) which in composition space defined by bulk parameters become linear dependent. in my case, this gives me 4 reaction factors

R1 = NullSpace[sindT]((isochemical reactions with indep endmembers))
{{0, -2, -7, 0, 0, 6, 0, 0, 7, -7, 0, 0, 0, 3}, {0, -2, 0, 0, 0, -1,
0, 3, 0, 0, 0, 0, 0, 0}, {0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0}, {-4, 4, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

{-2 “drav” - 7 “Fbuergerite” + 7 “Fuvit” + 6 “olen” + 3 “Pov” - 7 uvit",
-2 “drav” - “olen” + 3 “oxydrav”,
-“drav” + “dravdis”,
4 “drav” + 3 “fuvit” - 4 “shrl” - 3 “uvit”}

  1. I take the dot product between these reaction vectors in terms of endmembers with the stoichiometry matrix in terms of site fractions. This gives me 4 reaction vectors in terms of site fractions, e.g. my Q ordering vectors.

(* 20 old components: {xnax, xcax, xvx, xfey, xmgy, xaly, xfefy, xTiy, xalz, xmgz, xfez, xfefz, xsit, xalt, xbt, xOHv, xOv, xOHw, xOw, xFw} *)
shrl = {1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0};
drav = {1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0};
uvit = {0, 1, 0, 0, 1, 0, 0, 0, (5/6), (1/6), 0, 0, 1, 0, 0, 1, 0, 1, 0, 0};
fuvit = {0, 1, 0, 1, 0, 0, 0, 0, (5/6), 0, (1/6), 0, 1, 0, 0, 1, 0, 1, 0, 0};
ffoit = {0, 0, 1, (2/3), 0, (1/3), 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0};
olen = {1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0};
dravdis = {1, 0, 0, 0, (2/3), (1/3), 0, 0, (5/6), (1/6), 0, 0, 1, 0, 0, 1, 0, 1, 0, 0};
oxydrav = {1, 0, 0, 0, (1/3), (2/3), 0, 0, (5/6), (1/6), 0, 0, 1, 0, 0, 1, 0, 0, 1, 0};
Fuvit = {0, 1, 0, 0, 1, 0, 0, 0, (5/6), (1/6), 0, 0, 1, 0, 0, 1, 0, 0,0, 1};
Fbuergerite = {1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1};
Tidravite = {1, 0, 0, 0, (1/3), 0, 0, (2/3), 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0};
Bolen = {1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, (1/2), 0, (1/2), 1, 0, 1, 0, 0};
AOR = {0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, (5/6), (1/6), 0, 1, 0, 0, 1, 0};
Pov = {1, 0, 0, 0, 0, 0, 1, 0, 0, (2/6), 0, (4/6), 1, 0, 0, 1, 0, 0, 1, 0};

Reaction = Dot[R1, c] (crystallographic reaction)

{{0, 0, 0, 0, -2, 6, -4, 0, -3, 1, 0, 2, 0, 0, 0, 1, -1, -3, 3,
0}, {0, 0, 0, 0, -1, 1, 0, 0, -(1/2), 1/2, 0, 0, 0, 0, 0, 1, -1, -3,
3, 0}, {0, 0, 0, 0, -(1/3), 1/3, 0, 0, -(1/6), 1/6, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0}, {0, 0, 0, -1, 1, 0, 0, 0, 0, -(1/2), 1/2, 0, 0, 0,
0, 0, 0, 0, 0, 0}}

The Q vectors seem legitimate to me in the sense that they describe the partitioning of bulk parameters among the sites to reproduce the respective independent endmembers (which are dependent when expressed in bulk parameters). However as the endmember reaction show above some isochemical reaction are between 2 endmembers only, like -“drav” + “dravdis” (rxn 3), and some are between multiple endmembers, e.g. 4 “drav” + 3 “fuvit” - 4 “shrl” - 3 “uvit” (rxn 4).

{6 “xaly” - 3 “xalz” - 4 “xfefy” + 2 “xfefz” - 2 “xmgy” + “xmgz” +
“xOHv” - 3 “xOHw” - “xOv” + 3 “xOw”,

“xaly” - (“xalz”)/2 - “xmgy” + (“xmgz”)/2 + “xOHv” - 3 “xOHw” -
“xOv” + 3 “xOw”,
(“xaly”)/3 - (“xalz”)/6 - (“xmgy”)/3 + (“xmgz”)/6,
-“xfey” + (“xfez”)/2 + “xmgy” - (“xmgz”)/2}

however when I use the Q vectors and the set of composition-independent endmembers to describe a natural mineral formula I obtain relative random numbers sometimes outside the range of [-1 (anti-ordered) and 1 (ordered)]

|Q1|Q2|Q3|Q4|
-4.683868333 -1.020224167 -0.075691389 0.022023333

My question is if this is correct or if the ordering vectors should give values between [-1 and 1]? Do i need to normalize it somewhere? should I only use relationship betwene two endmembers, e.g. like -“drav” + “dravdis”?

Dear Stan,

Some comments below. If you want to do this in python/BurnMan, prepare the initial matrices in a file and I can give you the additional commands.

Best wishes,
Bob

# 1) This is the chemical vector given in the original message
old_bulk_components = ['Na', 'Ca', 'vac', 'fe', 'mg', 'al', 'fef', 'Ti', 'Si', 'B', 'OH', 'F', 'O']
# Some comments:
# - 'vac' is a null vector in compositional space (ignore it).
# - 'fef', 'O', 'fe' are not independent compositional components.
# - If you replaced 'OH' with 'H' you would have a true element matrix.

# I would recommend creating a stoichiometric matrix from the 
# elemental formulae for each endmember with the following components:
bulk_components = ['Na', 'Ca', 'Fe', 'Mg', 'Al', 'Ti', 'Si', 'B', 'F', 'O', 'H']

# 2) One of the nullspaces of this stoichiometric matrix 
# (depending on whether elements are rows or columns) will give the 
# isochemical endmember reactions (in COMPOSITION space). 
# You have given no information about site species distributions, 
# so you can't obtain any information about speciation.

# 3) Your theory is correct, but you should correct the first step
# to give Q ordering vectors.

# 4) Q vectors do not need to be bounded by -1 and 1. 
# Indeed, bounding values usually vary with bulk composition anyway.
# Nevertheless, for computational reasons, 
# you may decide to scale the ordering vectors so that the locus of values
# is bounded by -1 and 1.

# 4b) 1 drav - 1 dravdis is an obvious choice for an ordering vector, and sympy might find that one for you  automagically (it is often good at finding sparse nullspaces), but again, there's no mathematical reason to choose this.