#
 ====================================================================
The 'metapelite set' of x-eos in MnNCKFMASHTO

checked and uploaded 23-01-2022 by ecrg

Use with:
- tc-ds62.txt
- tc350 and above

File history:
- First provided as tc-6axmn (Mainz website download, 2014).
- delG(tran) for mat end-member in muscovite was routinely
changed to 5.0 kJ from 6.5 kJ from around 2015; this change
is formalised here.
- Re-formatted for tc350 by ecrg 10-12-19:
- renamed ilm (FMMnTO) as ilmm for consistency
with metabasite models
- added ilm (FTO)
- hem and mt are now made by samecoding
- Cbar1 plag now called plc for consistency; rename via
samecoding for convenience
- Updates 01-22:
- added pl4tr, k4tr
- corrected headers to mt1 and sp


Please read the README file in this distribution before using
these a-x relations.


Solution phases: g liq pl4tr k4tr plc ksp ep ma mu bi opx sa cd st
chl ctd sp ilmm ilm mt1
 =================================================================
#
#
 =================================================================
 Garnet: CFMMnASO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.

 coded by axe attack on 24 March 2011

 E-m    Formula                   Mixing sites
                       X                         Y
                       Mg    Fe    Mn    Ca      Al    Fe3
 py     Mg3Al2Si3O12   3     0     0     0       2     0
 alm    Fe3Al2Si3O12   0     3     0     0       2     0
 spss   Mn3Al2Si3O12   0     0     3     0       2     0
 gr     Ca3Al2Si3O12   0     0     0     3       2     0
 kho    Mg3Fe2Si3O12   3     0     0     0       0     2

 x -> xFeX/(xFeX + xMgX)
 z -> xCaX
 m -> xMnX
 f -> xFe3Y
 --------------------------------------------------------------------
#

 starting guesses
  x(g) = 0.90000  range 0 <> 1
  z(g) = 0.10000  range 0 <> 1
  m(g) = 0.060000  range 0 <> 1
  f(g) = 0.010000  range 0 <> 1
  
 labels (assign first label for which condition is true)
  garnet : g : true
  
 site fractions
   xMgX = 1 - m - x - z + m*x + x*z
   xFeX = x + (-m)*x + (-x)*z
   xMnX = m
   xCaX = z
   xAlY = 1 - f
   xFe3Y = f

 proportions
   py = 1 - f - m - x - z + m*x + x*z
   alm = x + (-m)*x + (-x)*z
   spss = m
   gr = z
   kho = f

 ideal mixing activities
  py = xMgX**3*xAlY**2
  alm = xFeX**3*xAlY**2
  spss = xMnX**3*xAlY**2
  gr = xCaX**3*xAlY**2
  kho = xMgX**3*xFe3Y**2

 non-ideality by van laar
  W(py,alm) = 2.5
  W(py,spss) = 2
  W(py,gr) = 31
  W(py,kho) = 5.4
  W(alm,spss) = 2
  W(alm,gr) = 5
  W(alm,kho) = 22.6
  W(spss,gr) = 0
  W(spss,kho) = 29.4
  W(gr,kho) = -15.3

  v(py) = 1
  v(alm) = 1
  v(spss) = 1
  v(gr) = 2.7
  v(kho) = 1

 "make" end-members
  kho = py - gr + andr + 27  (make)

#
 ====================================================================
 Granitic 'metapelite' melt: NCKFMASH

 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

  E-m    Formula                     Mixing sites
	               M*         V         molecular mixing
	               Mg4 Fe4    v2 H2   Si4O8 NaAlSi3O8 KAlSi3O8 CaAl2Si2O8 8/5*(Al2SiO5) Si2O8
  q4L	  Si4O8	                  1   0       1       0       0        0          0          0
  abL    NaAlSi3O8               1   0       0       1       0        0          0          0
  kspL   KAlSi3O8                1   0       0       0       1        0          0          0
  anL    CaAl2Si2O8              1   0       0       0       0        1          0          0
  slL    8/5*(Al2SiO5)           1   0       0       0       0        0          1          0
  fo2L   Mg4Si2O8      1   0     1   0       0       0       0        0          0          1
  fa2L   Fe4Si2O8      0   1     1   0       0       0       0        0          0          1
  h2oL   H2O                     0   1
              *use 5-fold entropy of mixing from M site

  q -> Si4O8 / denom
  fsp -> (NaAlSi3O8 + KAlSi3O8) / denom
  na -> NaAlSi3O8 / (NaAlSi3O8 + KAlSi3O8)
  an -> CaSiO3 / denom
  ol -> Si2O8 / denom
  x -> Fe/(Fe + Mg)
  h2o -> H2O / denom

  where denom = Si4O8 + NaAlSi3O8 + KAlSi3O8 + CaAl2Si2O8 + 8/5*(Al2SiO5) + Si2O8 + H2O

 --------------------------------------------------------------------
#

 starting guesses
  q(L) = 0.18140  range 0 <> 1
  fsp(L) = 0.34900  range 0 <> 1
  na(L) = 0.58400  range 0 <> 1
  an(L) = 0.011040  range 0 <> 1
  ol(L) = 0.013730  range 0 <> 1
  x(L) = 0.73330  range 0 <> 1
  h2o(L) = 0.42760  range 0 <> 1
  
 labels (assign first label for which condition is true)
  silicate melt : liq : true
  
 site fractions
   fac = 1 - h2o
   pq = q
   xab = fsp*na
   xksp = fsp*(1 - na)
   pan = an
   psil = 1 - q - fsp - an - ol - h2o
   pol = ol
   xFe = x
   xMg = 1 - x
   ph2o = h2o

 proportions
   q4L = q
   abL = fsp*na
   kspL = fsp*(1 - na)
   anL = an
   slL = 1 - q - fsp - an - ol - h2o
   fo2L = ol*(1 - x)
   fa2L = ol*x
   h2oL = h2o

 ideal mixing activities
  q4L = fac*pq
  abL = fac*xab
  kspL = fac*xksp
  anL = fac*pan
  slL = fac*psil
  fo2L = fac*pol*xMg**5
  fa2L = fac*pol*xFe**5
  h2oL = ph2o**2

 non-ideality by symmetric formalism
  W(q4L,abL) = 12 - 0.4*P
  W(q4L,kspL) = -2 - 0.5*P
  W(q4L,anL) = 5
  W(q4L,slL) = 12
  W(q4L,fo2L) = 12 - 0.4*P
  W(q4L,fa2L) = 14
  W(q4L,h2oL) = 17 - 0.5*P
  W(abL,kspL) = -6 + 3*P
  W(abL,anL) = 0
  W(abL,slL) = 12
  W(abL,fo2L) = 10
  W(abL,fa2L) = 2
  W(abL,h2oL) = -1.5 - 0.3*P
  W(kspL,anL) = 0 - 1*P
  W(kspL,slL) = 12
  W(kspL,fo2L) = 12
  W(kspL,fa2L) = 12
  W(kspL,h2oL) = 9.5 - 0.3*P
  W(anL,slL) = 0
  W(anL,fo2L) = 0
  W(anL,fa2L) = 0
  W(anL,h2oL) = 7.5 - 0.5*P
  W(slL,fo2L) = 12
  W(slL,fa2L) = 12
  W(slL,h2oL) = 11
  W(fo2L,fa2L) = 18
  W(fo2L,h2oL) = 11 - 0.5*P
  W(fa2L,h2oL) = 12

 "make" end-members
  q4L = 4 qL
  slL = 8/5 silL - 23  (mod)
  fo2L = 2 foL - 10  (mod)
  fa2L = 2 faL - 9 - 1.3*P  (mod)

#
 =================================================================
 ternary feldspar, 4TR model, with plagioclase-friendly
         parameterisation.

 Holland, TJB, Green, ECR & Powell, R (2021). A thermodynamic model
 for feldspars in KAlSi3O8-NaAlSi3O8-CaAl2Si2O8 for mineral
 equilibrium calculations. Journal of Metamorphic Geology, 1-14.
 Published online as DOI 10.1111/jmg.12639

 E-m   Formula        Mixing sites
                      A                   TB*
                      Na    Ca    K       Al    Si
 ab    NaAlSi3O8      1     0     0       1     3
 san   KAlSi3O8       0     0     1       1     3
 an    CaAl2Si2O8     0     1     0       2     2
 *use 1/4 entropy of mixing from TB-sites

 ca -> xCaA
 k -> xKA
 -------------------------------------------------
#

 starting guesses
  ca(pl4tr) = 0.80000  range 0 <> 1
  k(pl4tr) = 0.030000  range 0 <> 1

 labels (assign first label for which condition is true)
  feldspar : fsp : true
  
 site fractions
   xNaA = 1 - ca - k
   xCaA = ca
   xKA = k
   xAlTB = 1/4 + 1/4*ca
   xSiTB = 3/4 - 1/4*ca

 proportions
   ab = 1 - k - ca
   an = ca
   san = k

 ideal mixing activities
  ab = 1.7548*xNaA*xAlTB**(1/4)*xSiTB**(3/4)
  an = 2*xCaA*xAlTB**(1/2)*xSiTB**(1/2)
  san = 1.7548*xKA*xAlTB**(1/4)*xSiTB**(3/4)

 non-ideality by van laar
  W(ab,an) = 14.6 - 0.00935*T - 0.04*P
  W(ab,san) = 24.1 - 0.00957*T + 0.338*P
  W(an,san) = 48.5 - 0.13*P

  v(ab) = 0.674
  v(an) = 0.55
  v(san) = 1

#
 =================================================================
 ternary feldspar, 4TR model, with K-feldspar-friendly
         parameterisation.

 Holland, TJB, Green, ECR & Powell, R (2021). A thermodynamic model
 for feldspars in KAlSi3O8-NaAlSi3O8-CaAl2Si2O8 for mineral
 equilibrium calculations. Journal of Metamorphic Geology, 1-14.
 Published online as DOI 10.1111/jmg.12639

 E-m   Formula        Mixing sites
                      A                   TB*
                      Na    Ca    K       Al    Si
 ab    NaAlSi3O8      1     0     0       1     3
 san   KAlSi3O8       0     0     1       1     3
 an    CaAl2Si2O8     0     1     0       2     2
 *use 1/4 entropy of mixing from TB-sites

 na -> xNaA
 ca -> xCaA
 -------------------------------------------------
#

 starting guesses
  na(k4tr) = 0.030000  range 0 <> 1
  ca(k4tr) = 0.80000  range 0 <> 1

 labels (assign first label for which condition is true)
  feldspar : fsp : true
  
 site fractions
   xNaA = na
   xCaA = ca
   xKA = 1 - na - ca
   xAlTB = 1/4 + 1/4*ca
   xSiTB = 3/4 - 1/4*ca

 proportions
   ab = na
   an = ca
   san = 1 - na - ca

 ideal mixing activities
  ab = 1.7548*xNaA*xAlTB**(1/4)*xSiTB**(3/4)
  an = 2*xCaA*xAlTB**(1/2)*xSiTB**(1/2)
  san = 1.7548*xKA*xAlTB**(1/4)*xSiTB**(3/4)

 non-ideality by van laar
  W(ab,an) = 14.6 - 0.00935*T - 0.04*P
  W(ab,san) = 24.1 - 0.00957*T + 0.338*P
  W(an,san) = 48.5 - 0.13*P

  v(ab) = 0.674
  v(an) = 0.55
  v(san) = 1

#
 =================================================================
 ternary plagioclase (Cbar1 ASF): NCKAS

 REPLACED BY PL4TR

 Holland, TJB & Powell, R (2003) Activity-composition relations for phases in
 petrological calculations: an asymmetric multicomponent formulation. Contributions
 to Mineralogy and Petrology, 145, 492-501.

  E-m    Formula        Mixing site
                       K     Na    Ca
  san    KAlSi3O8      1     0     0
  abh    NaAlSi3O8     0     1     0
  anC    CaAl2Si2O8    0     0     1

 ca -> xCa
 k -> xK
 --------------------------------------------------
#

 starting guesses
  ca(plc) = 0.20000  range 0 <> 1
  k(plc) = 0.030000  range 0 <> 1

 labels (assign first label for which condition is true)
  plagioclase : pl : true
  
 site fractions
   x(K) = k
   x(Na) = 1 - k - ca
   x(Ca) = ca

 proportions
   abh = 1 - k - ca
   anC = ca
   san = k

 ideal mixing activities
  abh = x(Na)
  anC = x(Ca)
  san = x(K)

 non-ideality by van laar
  W(abh,anC) = 3.1
  W(abh,san) = 25.1 - 0.0108*T + 0.338*P
  W(anC,san) = 40

  v(abh) = 0.643
  v(anC) = 1
  v(san) = 1

 "make" end-members
  anC = e-an + 7.03 - 0.00466*T  (tran)

#
 =================================================================
 ternary ksp (Cbar1 ASF): NCKAS

 REPLACED BY K4TR

 Holland, TJB & Powell, R (2003) Activity-composition relations for phases in
 petrological calculations: an asymmetric multicomponent formulation. Contributions
 to Mineralogy and Petrology, 145, 492-501.

 coded by axe attack on 14 August 2013

  E-m    Formula        Mixing site
                       K     Na    Ca
  san    KAlSi3O8      1     0     0
  abh    NaAlSi3O8     0     1     0
  anC    CaAl2Si2O8    0     0     1

 na -> xNa
 ca -> xCa
 --------------------------------------------------
#

 starting guesses
  na(ksp) = 0.10000  range 0 <> 1
  ca(ksp) = 0.0040000  range 0 <> 1

 labels (assign first label for which condition is true)
  k-feldspar : ksp : true
  
 site fractions
   xK = 1 - ca - na
   xNa = na
   xCa = ca

 proportions
   san = 1 - ca - na
   abh = na
   anC = ca

 ideal mixing activities
  san = xK
  abh = xNa
  anC = xCa

 non-ideality by van laar
  W(san,abh) = 25.1 - 0.0108*T + 0.338*P
  W(san,anC) = 40
  W(abh,anC) = 3.1

  v(san) = 1
  v(abh) = 0.643
  v(anC) = 1

 "make" end-members
  anC = e-an + 7.03 - 0.00466*T  (tran)

#
 ===================================================================
 epidote: CFASHO

 Holland, TJB & Powell, R (2011). An improved and
 extended internally consistent thermodynamic dataset
 for phases of petrological interest, involving a
 new equation of state for solids.
 Journal of Metamorphic Geology, 29, 333-383.

 E-m   Formula                Mixing sites
                             M1       M3
                             Al Fe3   Al Fe3
 cz    Ca2Al3Si3O12(OH)      1   0    1   0
 ep    Ca2FeAl2Si3O12(OH)    1   0    0   1  - ordered end-member
 fep   Ca2Fe2AlSi3O12(OH)    0   1    0   1

 f -> (xFe3M1+xFe3M3)/2
 Q ->  f - xFe3M1   - order variable
 --------------------------------------------------
#

 starting guesses
  f(ep) = 0.10000  range 0 <> 1
  Q(ep) = 0.20000  range 0 <> 0.5  order variable

 labels (assign first label for which condition is true)
  epidote : ep : true
  
 site fractions
   xFeM1 = f - Q
   xAlM1 = 1 - f + Q
   xFeM3 = f + Q
   xAlM3 = 1 - f - Q

 proportions
   cz = 1 - f - Q
   ep = 2Q
   fep = f - Q

 ideal mixing activities
  cz = xAlM1*xAlM3
  ep = xAlM1*xFeM3
  fep = xFeM1*xFeM3

 non-ideality by symmetric formalism
  W(cz,ep) = 1
  W(cz,fep) = 3
  W(ep,fep) = 1

#
 =================================================================
 margarite: CNKFMASHO

 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

  E-m    Formula                                    Mixing sites
                             A                   M2A                 M2B           T1
                             K     Na    Ca      Mg    Fe    Al      Al    Fe3     Si    Al
  mut   KAl3Si3O12(OH)2      1     0     0       0     0     1       1     0       1     1
  celt  KMgAlSi4O10(OH)2     1     0     0       1     0     0       1     0       2     0
  fcelt KFeAlSi4O10(OH)2     1     0     0       0     1     0       1     0       2     0
  pat   NaAl3Si3O10(OH)2     0     1     0       0     0     1       1     0       1     1
  ma    CaAl4Si2O10(OH)2     0     0     1       0     0     1       1     0       0     2
  fmu   KAl2FeSi3O12(OH)2    1     0     0       0     0     1       0     1       1     1

 x -> xFeM2A/(xFeM2A + xMgM2A)
 y -> xAlM2A
 f -> xFe3M2B
 n -> xNaA
 c -> xCaA
 --------------------------------------------------
#

 starting guesses
  x(ma) = 0.60000  range 0 <> 1
  y(ma) = 0.96000  range 0 <> 1
  f(ma) = 0.0010000  range 0 <> 1
  n(ma) = 0.050000  range 0 <> 1
  c(ma) = 0.94000  range 0 <> 1

 labels (assign first label for which condition is true)
  margarite : ma : true
  
 site fractions
   xKA = 1 - c - n
   xNaA = n
   xCaA = c
   xMgM2A = 1 - x - y + x*y
   xFeM2A = x + (-x)*y
   xAlM2A = y
   xAlM2B = 1 - f
   xFe3M2B = f
   xSiT1 = 1 - 1/2*c - 1/2*y
   xAlT1 = 1/2*c + 1/2*y

 proportions
   mut = -c - f - n + y
   celt = 1 - x - y + x*y
   fcelt = x + (-x)*y
   pat = n
   ma = c
   fmu = f

 ideal mixing activities
  mut = 4*xKA*xAlM2A*xAlM2B*xSiT1*xAlT1
  celt = xKA*xMgM2A*xAlM2B*xSiT1**2
  fcelt = xKA*xFeM2A*xAlM2B*xSiT1**2
  pat = 4*xNaA*xAlM2A*xAlM2B*xSiT1*xAlT1
  ma = xCaA*xAlM2A*xAlM2B*xAlT1**2
  fmu = 4*xKA*xAlM2A*xFe3M2B*xSiT1*xAlT1

 non-ideality by van laar
  W(mut,celt) = 0 + 0.2*P
  W(mut,fcelt) = 0 + 0.2*P
  W(mut,pat) = 10.12 + 0.0034*T + 0.353*P
  W(mut,ma) = 34
  W(mut,fmu) = 0
  W(celt,fcelt) = 0
  W(celt,pat) = 45 + 0.25*P
  W(celt,ma) = 50
  W(celt,fmu) = 0
  W(fcelt,pat) = 45 + 0.25*P
  W(fcelt,ma) = 50
  W(fcelt,fmu) = 0
  W(pat,ma) = 18
  W(pat,fmu) = 30
  W(ma,fmu) = 35

  v(mut) = 0.63
  v(celt) = 0.63
  v(fcelt) = 0.63
  v(pat) = 0.37
  v(ma) = 0.63
  v(fmu) = 0.63

 "make" end-members
  mut = mu + 1  (tran)
  celt = cel + 5  (tran)
  fcelt = fcel + 5  (tran)
  pat = pa + 4  (tran)
  fmu = mu - 1/2 gr + 1/2 andr + 25  (make)

#
 =================================================================
 muscovite: NCKFMASHO

 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 !!!! delG(tran) for mat end-member changed from 6.5 to 5.0 since publication !!!!


 coded by axe attack on 14 August 2013

  E-m    Formula                                    Mixing sites
                             A                   M2A                 M2B           T1
                             K     Na    Ca      Mg    Fe    Al      Al    Fe3     Si    Al
  mu    KAl3Si3O12(OH)2      1     0     0       0     0     1       1     0       1     1
  cel   KMgAlSi4O10(OH)2     1     0     0       1     0     0       1     0       2     0
  fcel  KFeAlSi4O10(OH)2     1     0     0       0     1     0       1     0       2     0
  pa    NaAl3Si3O10(OH)2     0     1     0       0     0     1       1     0       1     1
  mat   CaAl4Si2O10(OH)2     0     0     1       0     0     1       1     0       0     2
  fmu   KAl2FeSi3O12(OH)2    1     0     0       0     0     1       0     1       1     1

 x -> xFeM2A/(xFeM2A + xMgM2A)
 y -> xAlM2A
 f -> xFe3M2B
 n -> xNaA
 c -> xCaA
 --------------------------------------------------
#

 starting guesses
  x(mu) = 0.25000  range 0 <> 1
  y(mu) = 0.60000  range 0 <> 1
  f(mu) = 0.17000  range 0 <> 1
  n(mu) = 0.060000  range 0 <> 1
  c(mu) = 0.0040000  range 0 <> 1

 labels (assign first label for which condition is true)
  muscovite : mu : true
  
 site fractions
   xKA = 1 - c - n
   xNaA = n
   xCaA = c
   xMgM2A = 1 - x - y + x*y
   xFeM2A = x + (-x)*y
   xAlM2A = y
   xAlM2B = 1 - f
   xFe3M2B = f
   xSiT1 = 1 - 1/2*c - 1/2*y
   xAlT1 = 1/2*c + 1/2*y

 proportions
   mu = -c - f - n + y
   cel = 1 - x - y + x*y
   fcel = x + (-x)*y
   pa = n
   mat = c
   fmu = f

 ideal mixing activities
  mu = 4*xKA*xAlM2A*xAlM2B*xSiT1*xAlT1
  cel = xKA*xMgM2A*xAlM2B*xSiT1**2
  fcel = xKA*xFeM2A*xAlM2B*xSiT1**2
  pa = 4*xNaA*xAlM2A*xAlM2B*xSiT1*xAlT1
  mat = xCaA*xAlM2A*xAlM2B*xAlT1**2
  fmu = 4*xKA*xAlM2A*xFe3M2B*xSiT1*xAlT1

 non-ideality by van laar
  W(mu,cel) = 0 + 0.2*P
  W(mu,fcel) = 0 + 0.2*P
  W(mu,pa) = 10.12 + 0.0034*T + 0.353*P
  W(mu,mat) = 35
  W(mu,fmu) = 0
  W(cel,fcel) = 0
  W(cel,pa) = 45 + 0.25*P
  W(cel,mat) = 50
  W(cel,fmu) = 0
  W(fcel,pa) = 45 + 0.25*P
  W(fcel,mat) = 50
  W(fcel,fmu) = 0
  W(pa,mat) = 15
  W(pa,fmu) = 30
  W(mat,fmu) = 35

  v(mu) = 0.63
  v(cel) = 0.63
  v(fcel) = 0.63
  v(pa) = 0.37
  v(mat) = 0.63
  v(fmu) = 0.63

 "make" end-members
  mat = ma + 5  (tran)
  fmu = 1/2 andr - 1/2 gr + mu + 25  (make)

#
 ====================================================================
 biotite: KFMMnASHTO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.

 coded by axe attack on 05 March 2011

 E-m    Formula                             Mixing sites
                            M3                        M12           T         V
                            Mg  Mn  Fe  Fe3 Ti  Al    Mg  Mn  Fe    Si  Al    OH  O
 phl   KMg3AlSi3O10(OH)2    1   0   0   0   0   0     2   0   0     1   1     2   0
 annm  KFe3AlSi3O10(OH)2    0   0   1   0   0   0     0   0   2     1   1     2   0
 obi   KMg2Fe1AlSi3O10(OH)2 0   0   1   0   0   0     2   0   0     1   1     2   0  - ordered intermediate
 east  KMg2Al3Si2O10(OH)2   0   0   0   0   0   1     2   0   0     0   2     2   0
 tbi   KMg2AlSi3TiO12       0   0   0   0   1   0     2   0   0     1   1     0   2
 fbi   KMg2Al2FeSi2O10(OH)2 0   0   0   1   0   0     2   0   0     0   2     2   0
 mmbi  KMn3AlSi3O10(OH)2    0   1   0   0   0   0     0   2   0     1   1     2   0

 x -> (2 xFeM12 + xFeM3)/(2 xFeM12 + xFeM3 + 2 xMgM12 + xMgM3)
 m -> xMnM3 = xMnM12 (equidistribution)
 y -> xAlM3
 f -> xFe3M3
 t -> xTiM3
 Q -> 3 (x - xFeM12)  - order variable
 -------------------------------------------------
#

 starting guesses
  x(bi) = 0.35000  range 0 <> 1
  m(bi) = 0.030000  range 0 <> 1
  y(bi) = 0.25000  range 0 <> 1
  f(bi) = 0.040000  range 0 <> 1
  t(bi) = 0.17000  range 0 <> 1
  Q(bi) = 0.25000  range 0 <> 1

 labels (assign first label for which condition is true)
  biotite : bi : true
  
 site fractions
   xMgM3 = 1 - f - m - t - x - y - 2/3*Q + f*x + 3m*x + t*x + x*y
   xMnM3 = m
   xFeM3 = x + 2/3*Q + (-f)*x + (-3m)*x + (-t)*x + (-x)*y
   xFe3M3 = f
   xTiM3 = t
   xAlM3 = y
   xMgM12 = 1 + 1/3*Q - m - x
   xMnM12 = m
   xFeM12 = -1/3*Q + x
   xSiT = 1/2 - 1/2*f - 1/2*y
   xAlT = 1/2 + 1/2*f + 1/2*y
   xOHV = 1 - t

 proportions
   phl = 1 - f - m - t - x - y - 2/3*Q + f*x + 3m*x + t*x + x*y
   annm = -1/3*Q + x
   obi = Q + (-f)*x + (-3m)*x + (-t)*x + (-x)*y
   east = y
   tbi = t
   fbi = f
   mmbi = m

 ideal mixing activities
  phl = 4*xMgM3*xMgM12**2*xSiT*xAlT*xOHV**2
  annm = 4*xFeM3*xFeM12**2*xSiT*xAlT*xOHV**2
  obi = 4*xFeM3*xMgM12**2*xSiT*xAlT*xOHV**2
  east = xAlM3*xMgM12**2*xAlT**2*xOHV**2
  tbi = 4*xTiM3*xMgM12**2*xSiT*xAlT*xTiM3**2
  fbi = xFe3M3*xMgM12**2*xAlT**2*xOHV**2
  mmbi = 4*xMnM3*xMnM12**2*xSiT*xAlT*xOHV**2

 non-ideality by symmetric formalism
  W(phl,annm) = 12
  W(phl,obi) = 4
  W(phl,east) = 10
  W(phl,tbi) = 30
  W(phl,fbi) = 8
  W(phl,mmbi) = 9
  W(annm,obi) = 8
  W(annm,east) = 15
  W(annm,tbi) = 32
  W(annm,fbi) = 13.6
  W(annm,mmbi) = 6.3
  W(obi,east) = 7
  W(obi,tbi) = 24
  W(obi,fbi) = 5.6
  W(obi,mmbi) = 8.1
  W(east,tbi) = 40
  W(east,fbi) = 1
  W(east,mmbi) = 13
  W(tbi,fbi) = 40
  W(tbi,mmbi) = 30
  W(fbi,mmbi) = 11.6

 "make" end-members
  annm = ann - 3  (mod)
  obi = 1/3 ann + 2/3 phl - 3  (od)
  tbi = phl - br + ru + 55  (make)
  fbi = east - 1/2 gr + 1/2 andr - 3  (make)
  mmbi = mnbi - 7.89  (rcal)

#
 =================================================================
 orthopyroxene: CFMMnASO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.

 coded by axe attack on 07 March 2011 (W from 15-4-11)

 E-m   Formula                             Mixing sites
                   M1                    M2                T*
                   Mg  Fe  Mn  Fe3 Al    Mg  Fe  Mn  Ca    Si  Al
 en     Mg2Si2O6   1   0   0   0   0     1   0   0   0     2   0
 fs     Fe2Si2O6   0   1   0   0   0     0   1   0   0     2   0
 fm     MgFeSi2O6  1   0   0   0   0     0   1   0   0     2   0     - ordered intermediate
 mgts   MgAl2SiO6  0   0   0   0   1     1   0   0   0     1   1
 fopx   MgFe2SiO6  0   0   0   1   0     1   0   0   0     1   1
 mnopx  Mn2Si2O6   0   0   1   0   0     0   0   1   0     2   0
 odi    CaMgSi2O6  1   0   0   0   0     0   0   0   1     2   0
 *use 1/4 entropy of mixing from T-site

 x -> (xFeM1 + xFeM2)/(xFeM1 + xFeM2 + xMgM1 + xMgM2)
 m -> xMnM1
 y -> xAlM1
 f -> xFe3M1
 c -> xCaM2
 Q -> 2 xFeM2/(xFeM2 + xMgM2) - 2 x        - order variable
 -------------------------------------------------
#

 starting guesses
  x(opx) = 0.30000  range 0 <> 1
  m(opx) = 0.020000  range 0 <> 1
  y(opx) = 0.10000  range 0 <> 1
  f(opx) = 0.030000  range 0 <> 1
  c(opx) = 0.050000  range 0 <> 1
  Q(opx) = 0.40000  range 0 <> 1

 labels (assign first label for which condition is true)
  orthopyroxene : opx : true
  
 site fractions
   xMgM1 = 1 + 1/2*Q - f - m - x - y + (-1/2*c)*Q + (-1/2*m)*Q + f*x + m*x + x*y
   xFeM1 = -1/2*Q + x + 1/2*c*Q + 1/2*m*Q + (-f)*x + (-m)*x + (-x)*y
   xMnM1 = m
   xFe3M1 = f
   xAlM1 = y
   xMgM2 = 1 - 1/2*Q - c - m - x + 1/2*c*Q + 1/2*m*Q + c*x + m*x
   xFeM2 = 1/2*Q + x + (-1/2*c)*Q + (-1/2*m)*Q + (-c)*x + (-m)*x
   xCaM2 = c
   xSiT = 1 - 1/2*f - 1/2*y
   xAlT = 1/2*f + 1/2*y

 proportions
   en = 1 - 1/2*Q - c - f - m - x - y + 1/2*c*Q + 1/2*m*Q + c*x + m*x
   fs = -1/2*Q + x + 1/2*c*Q + 1/2*m*Q + (-f)*x + (-m)*x + (-x)*y
   fm = Q + (-c)*Q + (-m)*Q + (-c)*x + f*x + x*y
   mgts = y
   fopx = f
   mnopx = m
   odi = c

 ideal mixing activities
  en = xMgM1*xMgM2*xSiT**(1/2)
  fs = xFeM1*xFeM2*xSiT**(1/2)
  fm = xMgM1*xFeM2*xSiT**(1/2)
  mgts = 1.4142*xAlM1*xMgM2*xSiT**(1/4)*xAlT**(1/4)
  fopx = 1.4142*xFe3M1*xMgM2*xSiT**(1/4)*xAlT**(1/4)
  mnopx = xMnM1*xMnM1*xSiT**(1/2)
  odi = xMgM1*xCaM2*xSiT**(1/2)

 non-ideality by van laar
  W(en,fs) = 7
  W(en,fm) = 4
  W(en,mgts) = 13 - 0.15*P
  W(en,fopx) = 11 - 0.15*P
  W(en,mnopx) = 5
  W(en,odi) = 32.2 + 0.12*P
  W(fs,fm) = 4
  W(fs,mgts) = 13 - 0.15*P
  W(fs,fopx) = 11.6 - 0.15*P
  W(fs,mnopx) = 4.2
  W(fs,odi) = 25.54 + 0.084*P
  W(fm,mgts) = 17 - 0.15*P
  W(fm,fopx) = 15 - 0.15*P
  W(fm,mnopx) = 5.1
  W(fm,odi) = 22.54 + 0.084*P
  W(mgts,fopx) = 1
  W(mgts,mnopx) = 12 - 0.15*P
  W(mgts,odi) = 75.4 - 0.94*P
  W(fopx,mnopx) = 10.6 - 0.15*P
  W(fopx,odi) = 73.4 - 0.94*P
  W(mnopx,odi) = 24.54 + 0.084*P

  v(en) = 1
  v(fs) = 1
  v(fm) = 1
  v(mgts) = 1
  v(fopx) = 1
  v(mnopx) = 1
  v(odi) = 1.2

 "make" end-members
  fm = 1/2 en + 1/2 fs - 6.6  (od)
  fopx = mgts - 1/2 gr + 1/2 andr + 2  (make)
  mnopx = 2 pxmn + 6.68  (rcal)
  odi = di - 0.1 + 0.000211*T + 0.005*P  (tran)

#
 =================================================================
 sapphirine: FMASO

 Wheller, CJ & Powell, R (2014). A new thermodynamic model for
 sapphirine: calculated phase equilibria in K2O-FeO-MgO-Al2O3-
 SiO2-H2O-TiO2-Fe2O3. Journal of Metamorphic Geology, 32, 287-299.

 coded by axe attack on 14 August 2013

 E-m   Formula                         Mixing sites
                       M3                        M456          T
                       Mg    Fe    Fe3   Al      Mg    Fe      Si    Al
 spr4  Mg4Al8Si2O20    1     0     0     0       3     0       1     0
 spr5  Mg3Al10SiO20    0     0     0     1       3     0       0     1
 fspm  Fe4Al8Si2O20    0     1     0     0       0     3       1     0
 spro  Fe3MgAl8Si2O20  1     0     0     0       0     3       1     0    - ordered intermediate
 ospr  Mg3FeAl9SiO20   0     0     1     0       3     0       0     1

 x -> (xFeM3 + 3 xFeM456)/(xFeM3 + 3 xFeM456 + xMgM3 + 3 xMgM456)
 y -> xAlM3
 f -> xFe3M3
 Q -> 4 (-x + xFeM456)      - order variable
 -------------------------------------------------
#

 starting guesses
  x(sa) = 0.10000  range 0 <> 1
  y(sa) = 0.30000  range 0 <> 1
  f(sa) = 0.050000  range 0 <> 1
  Q(sa) = 0.050000  range -1 <> 1

 labels (assign first label for which condition is true)
  sapphirine : sa : true
  
 site fractions
   xMgM3 = 1 - f - x - y + 3/4*Q + f*x + x*y
   xFeM3 = x - 3/4*Q + (-f)*x + (-x)*y
   xFe3M3 = f
   xAlM3 = y
   xMgM456 = 1 - 1/4*Q - x
   xFeM456 = 1/4*Q + x
   xSiT = 1 - f - y
   xAlT = f + y

 proportions
   spr4 = 1 - 1/4*Q - f - x - y
   spr5 = y
   fspm = x - 3/4*Q + (-f)*x + (-x)*y
   spro = Q + f*x + x*y
   ospr = f

 ideal mixing activities
  spr4 = xMgM3*xMgM456**3*xSiT
  spr5 = xAlM3*xMgM456**3*xAlT
  fspm = xFeM3*xFeM456**3*xSiT
  spro = xMgM3*xFeM456**3*xSiT
  ospr = xFe3M3*xMgM456**3*xAlT

 non-ideality by symmetric formalism
  W(spr4,spr5) = 10 - 0.02*P
  W(spr4,fspm) = 16
  W(spr4,spro) = 12
  W(spr4,ospr) = 8 - 0.02*P
  W(spr5,fspm) = 19 - 0.02*P
  W(spr5,spro) = 22 - 0.02*P
  W(spr5,ospr) = 1
  W(fspm,spro) = 4
  W(fspm,ospr) = 17.6 - 0.02*P
  W(spro,ospr) = 20 - 0.02*P

 "make" end-members
  fspm = fspr - 2  (mod)
  spro = 3/4 fspr + 1/4 spr4 - 3.5  (od)
  ospr = 1/2 andr - 1/2 gr + spr5 - 16  (make)

#
 =================================================================
 Cordierite: MnFMASH

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.

 coded by axe attack on 11 October 2011

 E-m   Formula                      Mixing sites
                              X                   H
                              Fe    Mg    Mn      H2O   v
 crd   Mg2Al4Si5O18           0     2     0       0     1
 fcrd  Fe2Al4Si5O18           2     0     0       0     1
 hcrd  Mg2Al4Si5O17(OH)2      0     2     0       1     0
 mncd Mg2Al4Si5O18            0     0     2       0     1

 x -> xFeX/(xFeX + xMgX)
 m -> xMnX
 h -> xH2OH
 -------------------------------------------------
#

 starting guesses
  x(cd) = 0.30000  range 0 <> 1
  m(cd) = 0.020000  range 0 <> 1
  h(cd) = 0.70000  range 0 <> 1

 labels (assign first label for which condition is true)
  cordierite : cd : true
  
 site fractions
   xFeX = x + (-m)*x
   xMgX = 1 - m - x + m*x
   xMnX = m
   xH2OH = h
   xvH = 1 - h

 proportions
   crd = 1 - h - m - x + m*x
   fcrd = x + (-m)*x
   hcrd = h
   mncd = m

 ideal mixing activities
  crd = xMgX**2*xvH
  fcrd = xFeX**2*xvH
  hcrd = xMgX**2*xH2OH
  mncd = xMnX**2*xvH

 non-ideality by symmetric formalism
  W(crd,fcrd) = 8
  W(crd,hcrd) = 0
  W(crd,mncd) = 6
  W(fcrd,hcrd) = 9
  W(fcrd,mncd) = 4
  W(hcrd,mncd) = 6

 "make" end-members
  mncd = e-mncrd - 4.21  (rcal)

#
 =================================================================
 staurolite: FMMnASHTO

 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 coded by axe attack on 13 July 2011


  E-m    Formula                                 Mixing sites
                                    X                   Y
                                    Mg    Fe    Mn      Al    Fe3   Ti    v
  mstm   Mg4Al18Si7.5O44(OH)4       4     0     0       2     0     0     0
  fst    Fe4Al18Si7.5O44(OH)4       0     4     0       2     0     0     0
  mnstm  Mn4Al18Si7.5O44(OH)4       0     0     4       2     0     0     0
  msto   Mg4Fe2Al16Si7.5O44(OH)4    4     0     0       0     2     0     0
  mstt   Mg4Ti1.5Al16Si7.5O44(OH)4  4     0     0       0     0     3/2   1/2

 x -> xFeX/(xFeX + xMgX)
 m -> xMnX
 f -> xFe3Y
 t -> xTiY
 -------------------------------------------------
#

 starting guesses
  x(st) = 0.88000  range 0 <> 1
  m(st) = 0.020000  range 0 <> 1
  f(st) = 0.050000  range 0 <> 1
  t(st) = 0.040000  range 0 <> 1

 labels (assign first label for which condition is true)
  staurolite : st : true
  
 site fractions
   xMgX = 1 - m - x + m*x
   xFeX = x + (-m)*x
   xMnX = m
   xAlY = 1 - f - 4/3*t
   xFe3Y = f
   xTiY = t
   xvY = 1/3*t

 proportions
   mstm = 1 - f - m - x - 4/3*t + m*x
   fst = x + (-m)*x
   mnstm = m
   msto = f
   mstt = 4/3*t

 ideal mixing activities
  mstm = xMgX**4*xAlY**2
  fst = xFeX**4*xAlY**2
  mnstm = xMnX**4*xAlY**2
  msto = xMgX**4*xFe3Y**2
  mstt = 3.0792*xMgX**4*xTiY**(3/2)*xvY**(1/2)

 non-ideality by symmetric formalism
  W(mstm,fst) = 16
  W(mstm,mnstm) = 12
  W(mstm,msto) = 2
  W(mstm,mstt) = 20
  W(fst,mnstm) = 8
  W(fst,msto) = 18
  W(fst,mstt) = 36
  W(mnstm,msto) = 14
  W(mnstm,mstt) = 32
  W(msto,mstt) = 30

 "make" end-members
  mstm = mst - 8  (tran)
  mnstm = mnst - 0.19  (rcal)
  msto = mst - gr + andr + 9  (make)
  mstt = mst - cor + 3/2 ru + 13  (make)

#
 =================================================================
 chlorite: FMMnASHO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.


 coded by axe attack on 08 March 2011

 E-m     Formula                                    Mixing sites
                             M1                M23           M4                  T2
                             Mg  Mn  Fe  Al    Mg  Mn  Fe    Mg  Fe  Fe3 Al    Si  Al
 clin    Mg5Al2Si3O10(OH)8   1   0   0   0     4   0   0     0   0   0   1     1   1
 afchl   Mg6Si4O10(OH)8      1   0   0   0     4   0   0     1   0   0   0     2   0
 ames    Mg4Al4Si2O10(OH)8   0   0   0   1     4   0   0     0   0   0   1     0   2
 daph    Fe5Al2Si3O10(OH)8   0   0   1   0     0   0   4     0   0   0   1     1   1
 ochl1   Fe5MgSi4O10(OH)8    1   0   0   0     0   0   4     0   1   0   0     2   0    - ordered intermediate
 ochl4   FeMg5Si4O10(OH)8    0   0   1   0     4   0   0     1   0   0   0     2   0    - ordered intermediate
 f3clin  Mg5AlFeSi3O10(OH)8  1   0   0   0     4   0   0     0   0   1   0     1   1
 mmchl   Mn5Al2Si3O10(OH)8   0   1   0   0     0   4   0     0   0   0   1     1   1

 x -> (xFeM1 + 4 xFeM23 + xFeM4)/(xFeM1 + 4 xFeM23 + xFeM4 + xMgM1 + 4 xMgM23 + xMgM4)
 y -> (xAlM1 + xAlM4)/2
 f -> xFe3M4
 m -> xMnM23
 QAl -> (xAlM4 - xAlM1)/2                 - order variable
 Q1 -> x - xFeM1/(xFeM1 + xMgM1)          - order variable
 Q4 -> x - xFeM4/(xFeM4 + xMgM4)          - order variable
 -------------------------------------------------
#

 starting guesses
  x(chl) = 0.30000  range 0 <> 1
  y(chl) = 0.55000  range 0 <> 1
  f(chl) = 0.050000  range 0 <> 1
  m(chl) = 0.030000  range 0 <> 1
  QAl(chl) = 0.42000  range -1 <> 1
  Q1(chl) = -0.18000  range -1 <> 1
  Q4(chl) = -0.26000  range -1 <> 1
  
 labels (assign first label for which condition is true)
  chlorite : chl : true
  
 site fractions
   xMgM1 = 1 - m + Q1 + QAl - x - y + (-m)*Q1 + Q1*QAl + m*x + (-QAl)*x + (-Q1)*y + x*y
   xMnM1 = m
   xFeM1 = -Q1 + x + m*Q1 + (-Q1)*QAl + (-m)*x + QAl*x + Q1*y + (-x)*y
   xAlM1 = -QAl + y
   xMgM23 = 1 - 1/4*Q1 - 1/4*Q4 - m - x + 1/4*m*Q1 + 1/4*f*Q4 + (-1/4*Q1)*QAl + 1/4*Q4*QAl + m*x + 1/4*Q1*y + 1/4*Q4*y
   xFeM23 = 1/4*Q1 + 1/4*Q4 + x + (-1/4*m)*Q1 + (-1/4*f)*Q4 + 1/4*Q1*QAl + (-1/4*Q4)*QAl + (-m)*x + (-1/4*Q1)*y + (-1/4*Q4)*y
   xMgM4 = 1 - f + Q4 - QAl - x - y + (-f)*Q4 + (-Q4)*QAl + f*x + QAl*x + (-Q4)*y + x*y
   xFeM4 = -Q4 + x + f*Q4 + Q4*QAl + (-f)*x + (-QAl)*x + Q4*y + (-x)*y
   xFe3M4 = f
   xAlM4 = QAl + y
   xSiT2 = 1 - 1/2*f - y
   xAlT2 = 1/2*f + y

 proportions
   clin = -1/4*Q1 - m + 2QAl - 5/4*Q4 + 1/4*m*Q1 + 5/4*f*Q4 + (-1/4*Q1)*QAl + 5/4*Q4*QAl + (-f)*x + m*x + (-QAl)*x + 1/4*Q1*y + 5/4*Q4*y + (-x)*y
   afchl = 1 - f - QAl - y - 2x + 5/4*Q1 + 9/4*Q4 + (-5/4*m)*Q1 + (-9/4*f)*Q4 + 5/4*Q1*QAl + (-9/4*Q4)*QAl + 2f*x + QAl*x + (-5/4*Q1)*y + (-9/4*Q4)*y + 3x*y
   ames = -QAl + y
   daph = 1/4*Q1 + 5/4*Q4 + (-1/4*m)*Q1 + (-5/4*f)*Q4 + 1/4*Q1*QAl + (-5/4*Q4)*QAl + f*x + (-m)*x + QAl*x + (-1/4*Q1)*y + (-5/4*Q4)*y + x*y
   ochl1 = -Q4 + x + f*Q4 + Q4*QAl + (-f)*x + (-QAl)*x + Q4*y + (-x)*y
   ochl4 = x - 5/4*Q1 - 5/4*Q4 + 5/4*m*Q1 + 5/4*f*Q4 + (-5/4*Q1)*QAl + 5/4*Q4*QAl + (-f)*x + 5/4*Q1*y + 5/4*Q4*y + (-2x)*y
   f3clin = f
   mmchl = m

 ideal mixing activities
  clin = 4*xMgM1*xMgM23**4*xAlM4*xSiT2*xAlT2
  afchl = xMgM1*xMgM23**4*xMgM4*xSiT2**2
  ames = xAlM1*xMgM23**4*xAlM4*xAlT2**2
  daph = 4*xFeM1*xFeM23**4*xAlM4*xSiT2*xAlT2
  ochl1 = xMgM1*xFeM23**4*xFeM4*xSiT2**2
  ochl4 = xFeM1*xMgM23**4*xMgM4*xSiT2**2
  f3clin = 4*xMgM1*xMgM23**4*xFe3M4*xSiT2*xAlT2
  mmchl = 4*xMnM1*xMnM1**4*xAlM4*xSiT2*xAlT2

 non-ideality by symmetric formalism
  W(clin,afchl) = 17
  W(clin,ames) = 17
  W(clin,daph) = 20
  W(clin,ochl1) = 30
  W(clin,ochl4) = 21
  W(clin,f3clin) = 2
  W(clin,mmchl) = 6
  W(afchl,ames) = 16
  W(afchl,daph) = 37
  W(afchl,ochl1) = 20
  W(afchl,ochl4) = 4
  W(afchl,f3clin) = 15
  W(afchl,mmchl) = 23
  W(ames,daph) = 30
  W(ames,ochl1) = 29
  W(ames,ochl4) = 13
  W(ames,f3clin) = 19
  W(ames,mmchl) = 17
  W(daph,ochl1) = 18
  W(daph,ochl4) = 33
  W(daph,f3clin) = 22
  W(daph,mmchl) = 4
  W(ochl1,ochl4) = 24
  W(ochl1,f3clin) = 28.6
  W(ochl1,mmchl) = 19
  W(ochl4,f3clin) = 19
  W(ochl4,mmchl) = 22
  W(f3clin,mmchl) = 8

 "make" end-members
  ochl1 = afchl - clin + daph + 3  (od)
  ochl4 = afchl - 1/5 clin + 1/5 daph + 2.4  (od)
  f3clin = clin - 1/2 gr + 1/2 andr + 2  (make)
  mmchl = mnchl - 5.67  (rcal)

#
 =================================================================
 Chloritoid: FMMnASHO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.


 coded by axe attack on 09 July 2011

 E-m   Formula                         Mixing sites
                               M1A           M1B
                               Al    Fe3     Fe    Mg    Mn
 mctd  MgAl2SiO5(OH)2          1/2   0       0     1     0
 fctd  FeAl2SiO5(OH)2          1/2   0       1     0     0
 mnct  MnAl2SiO5(OH)2          1/2   0       0     0     1
 ctdo  MgFe0.5Al1.5SiO5(OH)2   0     1/2     0     1     0

 x -> xFeM1B/(xFeM1B + xMgM1B)
 m -> xMnM1B
 f -> xFe3M1A
 -------------------------------------------------
#

 starting guesses
  x(ctd) = 0.88000  range 0 <> 1
  m(ctd) = 0.010000  range 0 <> 1
  f(ctd) = 0.020000  range 0 <> 1

 labels (assign first label for which condition is true)
  chloritoid : ctd : true
  
 site fractions
   xAlM1A = 1 - f
   xFe3M1A = f
   xFeM1B = x + (-m)*x
   xMgM1B = 1 - m - x + m*x
   xMnM1B = m

 proportions
   mctd = 1 - f - m - x + m*x
   fctd = x + (-m)*x
   mnct = m
   ctdo = f

 ideal mixing activities
  mctd = xAlM1A**(1/2)*xMgM1B
  fctd = xAlM1A**(1/2)*xFeM1B
  mnct = xAlM1A**(1/2)*xMnM1B
  ctdo = xFe3M1A**(1/2)*xMgM1B

 non-ideality by symmetric formalism
  W(mctd,fctd) = 4
  W(mctd,mnct) = 3
  W(mctd,ctdo) = 1
  W(fctd,mnct) = 3
  W(fctd,ctdo) = 5
  W(mnct,ctdo) = 4

 "make" end-members
  mnct = mnctd + 0.66  (rcal)
  ctdo = mctd + 1/4 andr - 1/4 gr + 13.5  (make)

#
 ====================================================================
 Spinel: FMATO

 White, RW, Powell, R & Clarke, GL (2002) The interpretation of reaction textures
 in Fe-rich metapelitic granulites of the Musgrave Block, central Australia:
 constraints from mineral equilibria calculations in the system K2O-FeO-MgO-Al2O3-
 SiO2-H2O-TiO2-Fe2O3. Journal of Metamorphic Geology, 20, 41-55.

 E-m  Formula   "Mixing sites" (not true sites)
                M1             M2
                Mg    Fe       Al    Fe3   Ti
 herc FeAl2O4   0     1        2     0     0
 sp   MgAl2O4   1     0        2     0     0
 mt   Fe3O4     0     1        0     2     0
 usp  Fe2TiO4   0     1        0     0     1

 x -> xFe2M1/(xMgM1 + xFe2M1)
 y -> xAlM2/(xAlM2 + xFe3M2 + 2 xTiM2)
 z -> 2 xTiM2/(xAlM2 + xFe3M2 + 2 xTiM2)
 --------------------------------------------------
#

 starting guesses
  x(sp) = 0.90000  range 0 <> 1
  y(sp) = 0.95000  range 0 <> 1
  z(sp) = 0.010000  range 0 <> 1

 labels (assign first label for which condition is true)
  spinel : sp : true
  
 site fractions
   x(Al) = y
   x(Fe3) = 1 - y - z
   x(Ti) = z
   x(Mg) = 1 - x
   x(Fe2) = x

 proportions
   herc = y + (-1 + x)*(1 + z)
   sp = (1 - x)*(1 + z)
   mt = 1 - y - z
   usp = z

 ideal mixing activities
  herc = x(Al)*x(Fe2)
  sp = x(Al)*x(Mg)
  mt = x(Fe3)*x(Fe2)
  usp = x(Ti)*x(Fe2)

 non-ideality by symmetric formalism
  W(herc,sp) = 0
  W(herc,mt) = 18.5
  W(herc,usp) = 27
  W(sp,mt) = 40
  W(sp,usp) = 30
  W(mt,usp) = 0

#
 =================================================================
 Ilmenite: FMMnTO

 Mn-free core model:
 White, RW, Powell, R, Holland, TJB, Johnson, TE &
 Green, ECR (2014). New mineral activity-composition relations
 for thermodynamic calculations in metapelitic systems.
 Journal of Metamorphic Geology, 32, 261-286.

 Addition of Mn:
 White, RW, Powell, R & Johnson, TE (2014). The effect of Mn
 on mineral stability in metapelites revisited: new a-x
 relations for manganese-bearing minerals.
 Journal of Metamorphic Geology, 32, 809-828.


 This model may give implausibly high Mg contents, in which
 case the older, Mg,Mn-free model ilm would be preferable.

 coded by axe attack on 08 March 2011

 E-m   Formula                      Mixing sites
                  A                               B
                  Fe    Ti    Mg    Mn    Fe3     Fe    Ti    Fe3
 oilm  FeTiO3     1     0     0     0     0       0     1     0     - ordered ilm
 dilm  FeTiO3     1/2   1/2   0     0     0       1/2   1/2   0     - disordered ilm
 dhem  Fe2O3      0     0     0     0     1       0     0     1     - disordered hem
 geik  MgTiO3     0     0     1     0     0       0     1     0
 pnt   MnTiO3     0     0     0     1     0       0     1     0

 i -> 1 - xFe3A
 g -> xMgA
 m -> xMnA
 Q -> xFeA - xFeB    - order variable
 -------------------------------------------------
#

 starting guesses
  i(ilmm) = 0.90000  range 0 <> 1
  g(ilmm) = 0.020000  range 0 <> 1
  m(ilmm) = 0.020000  range 0 <> 1
  Q(ilmm) = 0.85000  range -1 <> 1 

 labels (assign first label for which condition is true)
  ilmenite : ilm : true
  
 site fractions
   xFeA = -1/2*g + 1/2*i - 1/2*m + 1/2*Q
   xTiA = -1/2*g + 1/2*i - 1/2*m - 1/2*Q
   xMgA = g
   xMnA = m
   xFe3A = 1 - i
   xFeB = -1/2*g + 1/2*i - 1/2*m - 1/2*Q
   xTiB = 1/2*g + 1/2*i + 1/2*m + 1/2*Q

 proportions
   oilm = Q
   dilm = -g + i - m - Q
   dhem = 1 - i
   geik = g
   pnt = m

 ideal mixing activities
  oilm = xFeA*xTiB
  dilm = 4*xFeA**(1/2)*xTiA**(1/2)*xFeB**(1/2)*xTiB**(1/2)
  dhem = xFe3A*xFe3A
  geik = xMgA*xTiB
  pnt = xMnA*xTiB

 non-ideality by symmetric formalism
  W(oilm,dilm) = 15.6
  W(oilm,dhem) = 26.6
  W(oilm,geik) = 4
  W(oilm,pnt) = 2
  W(dilm,dhem) = 11
  W(dilm,geik) = 4
  W(dilm,pnt) = 2
  W(dhem,geik) = 36
  W(dhem,pnt) = 25
  W(geik,pnt) = 4

 "make" end-members
  oilm = d-ilm - 13.6075 + 0.009426*T  (od)
  dilm = d-ilm + 1.9928 - 0.0021*T  (od)
  dhem = d-hem

#
 =================================================================
 Ilmenite: FTO

 White, RW, Powell, R, Holland, TJB & Worley, BA (2000) The effect of TiO2 and
 Fe2O3 on metapelitic assemblages at greenschist and amphibolite facies conditions:
 mineral equilibria calculations in the system K2O-FeO-MgO-Al2O3-SiO2-H2O-TiO2-Fe2O3.
 Journal of Metamorphic Geology, 18, 497-511.

 E-m   Formula    Mixing sites
 		   A            B
Fe2 Ti Fe3   Fe2 Ti Fe3
 oilm  FeTiO3      1   0   0    0   1   0     - ordered ilm
 dilm  FeTiO3     1/2 1/2  0   1/2 1/2  0     - disordered ilm
 dhem  Fe2O3       0   0   1    0   0   1     - disordered hem

 x(ilm) = 1 - xFe3A
 Q(ilm) = x(Fe2,A) - x(Fe2,B)    - order variable
 NOTE: Q(ilm) must have a range of -x to +x
 --------------------------------------------------
#

 starting guesses
  x(ilm) = 0.80000  range 0 <> 1
  Q(ilm) = 0.55000  range -0.99 <> 0.99

 labels (assign first label for which condition is true)
  ilmenite : ilm : true
  
 site fractions
   xFe2A = 1/2*x + 1/2*Q
   xTiA = 1/2*x - 1/2*Q
   xFe3A = 1 - x
   xFe2B = 1/2*x - 1/2*Q
   xTiB = 1/2*x + 1/2*Q
   xFe3B = 1 - x

 proportions
   oilm = Q
   dilm = x - Q
   dhem = 1 - x

 ideal mixing activities
  oilm = xFe2A*xTiB
  dilm = 4*xFe2A**(1/2)*xTiA**(1/2)*xFe2B**(1/2)*xTiB**(1/2)
  dhem = xFe3A*xFe3B

 non-ideality by symmetric formalism
  W(oilm,dilm) = 15.6
  W(oilm,dhem) = 26.6
  W(dilm,dhem) = 11

 "make" end-members
  oilm = d-ilm - 13.6075 + 0.009426*T  (od)
  dilm = d-ilm + 1.9928 - 0.0021*T  (od)
  dhem = d-hem

#
 =============================================================
 Magnetite: FTO

 Alternative magnetite: use for SUBSOLIDUS equilibria only!
 (greenschist->amphibolite grade)

 White, RW, Powell, R, Holland, TJB & Worley, BA (2000) The effect of TiO2 and
 Fe2O3 on metapelitic assemblages at greenschist and amphibolite facies conditions:
 mineral equilibria calculations in the system K2O-FeO-MgO-Al2O3-SiO2-H2O-TiO2-Fe2O3.
 Journal of Metamorphic Geology, 18, 497-511.

 E-m  Formula   Mixing sites
                T              M
                Fe    Fe3      Fe    Fe3   Ti
 imt  Fe3O4     0     1        1     1     0
 dmt  Fe3O4     1/3   2/3      2/3   4/3   0
 usp  Fe2TiO4   1     0        1     0     1

 x -> 1 - 2 xTiM
 Q -> xFe3T            ONeils inversion parameter
 =============================================================
#

 starting guesses
  x(mt1) = 0.97040  range 0 <> 1
  Q(mt1) = 0.74720  range 0 <> 1

 labels (assign first label for which condition is true)
  magnetite : mt : true
  
 site fractions
   xTiM = 1/2 - 1/2*x
   xFe3M = x - 1/2*Q
   xFeM = 1/2 - 1/2*x + 1/2*Q
   xFe3T = Q
   xFeT = 1 - Q

 proportions
   imt = -2x + 3Q
   dmt = 3x - 3Q
   usp = 1 - x

 ideal mixing activities
  imt = 4*xFe3M*xFeM*xFe3T
  dmt = 27/4*xFe3M**(4/3)*xFeM**(2/3)*xFe3T**(2/3)*xFeT**(1/3)
  usp = 4*xTiM*xFeM*xFeT

 non-ideality by symmetric formalism
  W(imt,dmt) = 2.4
  W(imt,usp) = 1
  W(dmt,usp) = -5

 "make" end-members
  imt = d-mt - 1.8595 + 0.003166*T  (od)
  dmt = d-mt + 1.3305 - 0.001184*T  (od)