I would like to calculate the f(O2) associated to the equilibrium calcite+quartz=wollastonite+C+O2 (and FMQ...) for any P and T between 1-10 kbar and 350-550°C and plot the result in a PT diagram (either as contour lines or color shading). ... There are many ways to solve this problem, the easiest is to use FRENDLY. The problem is to calculate Delta_G for a reaction of pure phases as a function of P and T, in this case ln[fo2] = Delta_G/R/T, where the reaction is written so that the stoichiometric coefficient of O2 is 1. You can do this entirely within of FRENDLY but a shortcut is to make an entity in the thermodynamic data file that has the properties of the reaction. To do this open the thermodynamic data file, look for the line "begin_makes" and after this line enter, e.g.: qfm_fo2 = -2 mt - 3 q + 3 fa + 1 O2 | qfm O2 oxygen fugacity (or activity) DQF = 0 See www.perplex.ethz.ch/perplex_thermodynamic_data_file_body.html#Make_definitions for more information on make definitions. Then run FRENDLY as in the dialog at www.perplex.ethz.ch/perplex/faq/calculate_fo2_for_a_buffer_frendly_dialog.txt. FRENDLY generates a file named qfm_fo2.tab in which the 10th column is log10(fO2). The *.tab file data can be manipulated in a spreadsheet program or plotted with PSTABLE or, in MatLab, perple_x_plot. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! BEWARE: the fugacity of an entity, here the O2 species, is arbitrarily defined relative to the reference state Gibbs energy at the temperature of interest and the reference state pressure (G0[P0,T]), in recent versions of Perple_X it is necessary to eliminate, when present, the reference to a P-V-T EoS for the entity of interest in the thermodynamic data file by setting the EoS flag. For example, the thermodynamic data file entry O2 EoS = 107 O2(1) S0 = 205.2 c1 = 48.3 c2 = -.691E-3 c3 = 499200 c5 = -420.7 end associates EoS 107 with the O2 species, with the result that FRENDLY will calculate G0(P,T) for O2; that result corresponds to the activity of the O2 species. To obtain the fugacity, the above entry must be modified, i.e., the EoS value changed from 107 to 1, as in: O2 EoS = 1 O2(1) S0 = 205.2 c1 = 48.3 c2 = -.691E-3 c3 = 499200 c5 = -420.7 end For additional information on special EoS flags refer to: www.perplex.ethz.ch/perplex_thermodynamic_data_file_body.html#Special_EoS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! See also: www.perplex.ethz.ch/perplex/faq/how_to_buffer_chemical_potentials.txt www.perplex.ethz.ch/perplex/faq/how_to_compute_fo2_for_CCO.txt