Package: taurex-ggchem
TauREx-GGchem pluginA Python wrapper built using theTauRExis available.
The wrapper also installs all available datafiles included with GGchemInstallationYou can install one of the prebuilt binary wheels for Windows, macOS and manylinux through pip:pipinstalltaurex_ggchemInstalling from sourceTo install from source a valid C/C++ and FORTRAN compiler must be present. You can compile it by doing:gitclonehttps://github.com/ucl-exoplanets/GGchem.gitcdGGchem
pipinstall.Running in TauRExOnce installed you can select the chemical model through thechemistry_typekeyword under
Chemistry.[Chemistry]
chemistry_type = ggchem
metallicity = 1.0
selected_elements = H, He, C, N, O, Ti, V, S, K
ratio_elements = C, N, Ti
ratios_to_O = 0.5,0.001, 1e-4
equilibrium_condensation = True

[Fitting]
Ti_O_ratio:fit = True
Ti_O_ratio:prior = "LogUniform(bounds=(-6,2))"
S_O_ratio:fit = True
S_O_ratio:prior = "LogUniform(bounds=(-6,2))"
metallicity:fit = True
metallicity:prior = "LogUniform(bounds=(-6,2))"Input arguments:ArgumentDescriptionTypeDefaultRequireddispol_filesPath to thermochemical datalist of stringsBuilt-in (BarklemCollet,StockKitzmann_withoutTsuji, WoitkeRefit )abundance_profileInitial abundance profile. Eithersolar,meteor,oceanorearthstring'solar'selected_elementsList of elements to includelist of stringAll elements in GGchemratio_elementsList of elements to set the ratiolist of stringratios_to_Oratio of each 'ratio_element' relative to oxygenarrayhe_h_ratioHe/H ratiofloat0.083metallicityMetallicity relative to initial abundancefloat1.0include_chargeInclude ionsboolFalseequilibrium_condensationInclude condenstationboolFalsedustchem_fileDust chemistry filestringBuilt-in (DustChem.dat)TfastLowest temperature (K) to use faster methodfloat1000new_back_itinteger6new_back_facfloat1e5new_pre_methodinteger2new_full_itboolFalsenew_fast_levelinteger1Retrieval Parameters:Fitting ParameterDescriptionmetallicityMetallicity relative to solarThe wrapper will generate oxygen retrieval parameters for all metallic elements within the
chemical model. If Ti is present (either by default or specifing inselected_elements)
then aTi_O_ratioretrieval parameter will be available.
Using the defaultselected_parameterswill give access to:Fitting ParameterDescriptionC_O_ratioC/O ratioN_O_ratioN/O ratioNa_O_ratioNa/O ratioMg_O_ratioMg/O ratioSi_O_ratioSi/O ratioFe_O_ratioFe/O ratioAl_O_ratioAl/O ratioCa_O_ratioCa/O ratioTi_O_ratioTi/O ratioS_O_ratioS/O ratioCl_O_ratioCl/O ratioK_O_ratioK/O ratioLi_O_ratioLi/O ratioF_O_ratioF/O ratioP_O_ratioP/O ratioV_O_ratioV/O ratioCr_O_ratioCr/O ratioMn_O_ratioMn/O ratioNi_O_ratioNi/O ratioZr_O_ratioZr/O ratioW_O_ratioW/O ratioRunning in PythonYou can import the chemistry scheme in Python pretty easily>>>fromtaurex_ggchemimportGGChem>>>gg=GGChem(metallicity=1.0,selected_elements=['H','He','C','O','N','K'],abundance_profile='earthcrust',equilibrium_condensation=True)You can either pass it into a TauREx forward model like so:>>>tm=TransmissionModel(chemistry=gg)Or use it independently to compute volume mixing ratios for gas-phase and condensates by passing in
temperature and pressure ( Pascal ) arrays:>>>nlayers=100>>>T=numpy.linspace(400,1000,nlayers)>>>P=numpy.logspace(1,5,nlayers)>>>gg.initialize_chemistry(nlayers=nlayers,temperature_profile=T,pressure_profile=P)>>>gg.gases['H','He','C','O','N',...,'N3','O3','C3H']>>>gg.mixProfilearray([[4.75989782e-04,4.93144149e-04,5.10561665e-04,...,2.89575385e-05,2.47386006e-05,2.10241059e-05],...,[2.49670621e-16,1.44224904e-16,8.29805526e-17,...,9.48249338e-42,4.75884162e-42,2.37999459e-42]])>>>gg.condensates['C[s]','H2O[s]','H2O[l]','NH3[s]','CH4[s]','CO[s]','CO2[s]']>>>gg.condensateMixProfilearray([[0.00000000e+00,0.00000000e+00,0.00000000e+00,...,0.00000000e+00,0.00000000e+00],[0.00000000e+00,0.00000000e+00,0.00000000e+00,...,0.00000000e+00,9.82922802e-10,1.88551848e-10,2.88471985e-11,4.40651877e-12,6.95597887e-13],...,[0.00000000e+00,0.00000000e+00,0.00000000e+00,...,0.00000000e+00,0.00000000e+00]])BibliographyIf you use the plugin please cite the relevant articles. TauREx will output
it at program end. You can get the citation from Python like so:fromtaureximport__citations__print(__citations__)print(gg.nice_citation())Which gives:TauREx III: A fast, dynamic and extendable framework for retrievals
Al-Refaie, Ahmed F., Changeat, Quentin, Waldmann, Ingo P., Tinetti, Giovanna
arXiv, 1912.07759, 2019

Equilibrium chemistry down to 100 K - Impact of silicates and phyllosilicates on the carbon to oxygen ratio
Woitke, P., Helling, Ch., Hunter, G. H., Millard, J. D., Turner, G. E., Worters, M., Blecic, J., Stock, J. W.
A&A, 614, A1, 2018You can also generate bibtex from the input file like so:taurex-imyinput.par--bibtexmybib.bib