% ==================================================================
% Scriptfile for .... compatibility calcs 
%
% in the prefsfile, these scripts are needed
%           dataset   62          
%           calcmode 1 
%           scriptfile compatibility   % if this file keeps its name
% 
% Use "%" for commenting (nothing is read between % and the line ending).
% No lines are read after the "*" character.
% ==================================================================

axfile mp51MnNCKFMASHTO  % axfile, tc-<system>.txt, becomes axfile <system>

% =======================
% phases
% =======================

with ctd bi g           % enter list of phases in desired assemblage

inexcess  mu q H2O      % list of phases to be included in all calculations
tozero H2O              % zeroes the mode of H2O in the output

% =======================
% conditions
% =======================

diagramPT  4 14  400 700     % P in kbar; T in degC 

calcP  9                     % Plow Phigh Pinc
calcT  575                   % Tlow Thigh Tinc

calctatp                     % do calculate T at P (so, info in calcT ignored)

% =======================
% pseudosection-related
% =======================

pseudosection no            

% =======================
% projection-related
% =======================

projection

% ----------------------------------------------------------
% AFM - projected from mu q H2O
% ----------------------------------------------------------
  projplane              H2O  SiO2 Al2O3   MgO   FeO   K2O
% ----------------------------------------------------------
  projplane     a          0     0     1     0     0     0
  projplane     f          0     0     0     0     1     0
  projplane     m          0     0     0     1     0     0
% ----------------------------------------------------------

% =======================
% what output?
% =======================

compatibility            % print info in mathematica form (in drfile) and comma-delimited 
                         % form (in csvfile)
% =======================
% set up x-eos
% =======================

% samecoding mu pa      % duplicating x-eos: make paragonite from muscovite

% !!!! 
% Add your own xyzguess blocks for all phases (including any made by samecoding)
% !!!! 

% ---------------------------------------------------------- 
xyzguess x(g)          0.887427
xyzguess z(g)                 0  % boiler
xyzguess m(g)                 0  % boiler
xyzguess f(g)                 0  % boiler
% -----------------------------
xyzguess x(bi)         0.674182
xyzguess m(bi)                0  % boiler
xyzguess y(bi)         0.260333
xyzguess f(bi)                0  % boiler
xyzguess t(bi)                0  % boiler
xyzguess Q(bi)        0.0969282
% -----------------------------
xyzguess x(mu)         0.548754
xyzguess y(mu)         0.909621
xyzguess f(mu)                0  % boiler
xyzguess n(mu)                0  % boiler
xyzguess c(mu)                0  % boiler
% -----------------------------
xyzguess x(st)         0.858563
xyzguess m(st)                0  % boiler
xyzguess f(st)                0  % boiler
xyzguess t(st)                0  % boiler
% ---------------------------------------------------------- 
xyzguess x(chl)        0.465451
xyzguess y(chl)        0.805095
xyzguess f(chl)               0  % boiler
xyzguess m(chl)               0  % boiler
xyzguess QAl(chl)      0.194402  range -1.000 1.000
xyzguess Q1(chl)      0.0352754  range -1.000 1.000
xyzguess Q4(chl)      0.0888073  range -1.000 1.000
% -----------------------------
xyzguess x(ctd)        0.823922
xyzguess m(ctd)               0  % boiler
xyzguess f(ctd)               0  % boiler
% -----------------------------

* 

two separate calculations

<==========================================================>
phases: g bi chl (mu, q, fluid) 

------------------------------------------------------------
 P(kbar)     T(°C)      x(g)     x(bi)     y(bi)     Q(bi)     x(mu)     y(mu) ...
   9.000    575.00    0.8932    0.6677    0.1701    0.1091    0.5331    0.8713 ...

proj          a        f        m        q      H2O       mu    phase
g        0.2500   0.6699   0.0801   0.7500                    -0.2500
bi      -0.3506   0.9105   0.4401  -0.1494            0.5000  -0.5000
chl      0.2102   0.4496   0.3402   0.4565   0.6667           -0.1667

<==========================================================>
phases: g st chl (mu, q, fluid) 

------------------------------------------------------------
 P(kbar)     T(°C)      x(g)     x(mu)     y(mu)     x(st)    x(chl)    y(chl)
   9.000    575.00    0.8900    0.5252    0.8922    0.8575    0.5618    0.6713

proj          a        f        m        q      H2O       mu    phase
g        0.2500   0.6675   0.0825   0.7500                    -0.2500
st       0.6923   0.2639   0.0438   0.5769   0.1538           -0.0769
chl      0.2238   0.4361   0.3401   0.4429   0.6667           -0.1667


