Theria_G - Numerical simulation of metamorphic garnet crystallization

Theria_G (Gaidies et al., 2008) is a software program that predicts the chemical composition of garnet and the mineral content of a rock during metamorphism considering Gibbs energy minimization, chemical diffusion in garnet, and chemical fractionation associated with garnet crystallization. Since Theria_G considers a nucleation history of garnet, it simulates the formation of compositional profiles in an entire garnet population. This offers the opportunity to compare garnet compositional zoning as well as garnet crystal size distributions, that are simulated for predefined conditions, with field observations - a powerful method to analyze metamorphic pressure-temperature-time paths and associated garnet crystallization kinetics.

Theria_G is a platform-independent, free software and part of the Theriak-Domino software package. Copies of the Theriak-Domino (de Capitani and Petrakakis, 2010) and Theria_G (Gaidies et al., 2008) software programs can be downloaded here:

Download for Windows PC

Download for MacOS

These copies have been compiled for the Geochemical Society Workshop on PTt trajectories using a recent (Dec 2020) version of the Intel(R) 64 Fortran Compiler on a MacBook Pro running macOS Catalina 10.15.6, and on an Intel(R) PC running Windows 10 Pro for Workstations (version 1909). Additional software required to run the programs include Terminal and Command Prompt, both included in the Mac and Windows operating systems, respectively. Also, a vector graphics software will be needed, such as Adobe Illustrator, CorelDRAW, or the free Inkscape.

Figure 1: Program theriak waiting for the initial user input when using Windows.

Installation on Windows PC

Once the software is downloaded (and unzipped), copy the folder ”TheriakDominoWIN” DIRECTLY into the C:\ directory of your computer (not into a subfolder). In order to run the software, use File Explorer to go into the folder

C:\TheriakDominoWIN\GeochemSoc2020\Working

and double-click the ”start.bat” file. This will open a console window (Command Prompt) which you will be using during each session with the Theriak-Domino software. You can change the properties of the console window (e.g., background color, screen buffer size, etc.) with a right-click on its title bar. To start a program, type its name into the console window (e.g., theriak) and hit the return key. Note that the files created by Theriak-Domino and Theria_G will be saved in your working directory (C:\TheriakDominoWIN\GeochemSoc2020\Working). Make sure that the input files required by the software, e.g., THERIN.txt, theriag_PTt.txt, etc. and the thermodynamic database files such as ds5_5.txt are also contained in that directory. If you correctly installed the software, typed theriak into the console window, and hit return, you should see something similar to Figure 1.

Figure 2: Preferences for Terminal on macOS Catalina.

Installation on Mac

Once the software is downloaded (and unzipped), copy the folder ”TheriakDominoMAC” into your Home Directory (e.g., /Users/fredsmacbookpro where instead of ”fredsmacbookpro” you should see your username). Now use Finder to locate the program ”Terminal” in your Macs ”/Applications/Utilities” folder and move it into the Dock. Open a console window by clicking Terminal in your Dock, then click on ”Terminal” in the menu and choose ”Preferences...”. This will open a window similar to Figure 2.

Make sure to activate the blue button next to ”Command (complete path):”. Note the path given here (e.g., ”/bin/zsh”, or ”/bin/bash”) as you will need this later. Close the ”Preferences...” window and quit ”Terminal”. Now use Finder to go to the folder

/Users/fredsmacbookpro/TheriakDominoMAC/GeochemSoc2020/Working

Figure 3: Program theriak waiting for the initial user input when using macOS (click figure to enlarge it).

where ”fredsmacbookpro” is your Home Directory. If the path given in the ”Terminal-Preferences...” window was ”/bin/zsh”, then move the file ”zprofile” into your Home Directory. If the path given in the ”Terminal-Preferences...” window was ”/bin/bash”, then you will have to move the file ”bash profile” instead.

After you moved the respective file into the Home Directory, open it with TextEdit. Locate the line

alias dom=”cd /Users/fredsmacbookpro/TheriakDominoMAC/Working” 

and replace ”fredsmacbookpro” with your username. In case there are spaces in your username, replace them with ”\ ”. Do the same with the line

export THERDOM=/Users/fredsmacbookpro/TheriakDominoMAC/Programs. 

Save your changes. Now it is important to open the ”File” menu of TextEdit and to choose ”Rename...”. This will activate the file name in the title bar of the document. Add a dot ”.” in front of the file name, i.e., rename ”zprofile” to ”.zprofile” (or ”bash profile” to ”.bash profile”). A warning message will appear (”Names that begin with a dot ”.” are reserved for the system.”). Acknowledge this by clicking on the button ”Use ”.””. Note that this is the only way to create a hidden system file with TextEdit which is necessary to conveniently run the Theriak-Domino software on a Mac. Quit TextEdit.

Now open Terminal again by clicking on it in the Dock, type ”dom” into the console window, and hit the return key. This will make the folder ”TheriakDominoMAC/Working” your current working directory. Note that the files created by Theriak-Domino and Theria_G will be saved in that working directory, and that the input files required by the software, e.g., THERIN.txt, theriag_PTt.txt, etc. as well as the thermodynamic database files such as ds5_5.txt have to be contained in that directory, too. It may be easiest to always run the Theriak-Domino and Theria_G software from this working directory. If you correctly installed the software, typed theriak into the terminal, and hit return, you should see something similar to Figure 3.

On some systems, an error message may appear when trying to start the software for the first time (”Permissions denied”). If that happens, enter

cd /Users/fredsmacbookpro/TheriakDominoMAC/GeochemSoc2020/Programs

where ”fredsmacbookpro” is your username, and hit the return key. Then type

chmod a+x theriak domino guzzler explot theriag plotg plotxy 

and hit return to obtain these ”permissions”. You should now be able to start any of these programs, by typing their names into the console window (e.g., theriak) and hit return. You can change the properties of the console window (e.g., font and background color, window size, etc.) by editing the Terminal preferences.

Software Documentation

These are the lecture notes used for the Geochemical Society Workshop on PTt trajectories:

Theriak-Domino-Theria_G Lecture Notes

These notes provide simple examples of how to use Theriak, Domino, and Theria_G. Files associated with these examples are contained in the download folders given above. Additional information about the Theriak-Domino software is available on the website of Christian de Capitani. Please get in touch if you have any questions.

Latest Theria_G update (Feb 2022)

The influence of pressure on the energy barrier of multi-component diffusion in garnet when using the Chakraborty and Ganguly (1992) dataset has been slightly underestimated in previous versions of THERIA_G, including the version used for the Geochemical Society Workshop. The latest update rectifies this. Thanks to Hugo Dominguez (PhD student @unibern with @PierreLanari) for pointing this out!

Update for Windows PC

Update for MacOS

In order to use the latest Theria_G version, you need to replace the files in the Program folder with the ones contained in the update.

Running Theria_G in batch mode

If you want to test how changes to the input parameters (such as the P-T-t path or the chemical composition of the model system) influence the simulation results, then running Theria_G in batch mode may be useful for you. An example of how to set this up is given here.