This repository contains the source code and default resources for GEM-Selektor with graphical user interface (GEMSGUI)- the interactive package for thermodynamic modelling of aquatic (geo)chemical systems by Gibbs Energy Minimization using the GEM-Standalone chemical solver.
- Building using Conda
- How to build on Linux or Mac OS
- How to run the GEM-Selektor
- How to build and run GEM-Selektor application using Qt Creator
- How to use the application
Distributed "as is" by the Laboratory for Waste Management (LES) of the Paul Scherrer Institute (PSI) with two purposes:
-
to promote the GEM method and software into research community;
-
to gather the users feedback - vital for making the software more functional and reliable.
Permission to use the GEM-Selektor software is hereby granted free of charge for educational and research purposes, subject to acceptance of Terms and Conditions of Use. In particular, in any publication of your results obtained using the GEM-Selektor code, please, cite the web page (http://gems.web.psi.ch) and the following papers:
-
Kulik D.A., Wagner T., Dmytrieva S.V., Kosakowski G., Hingerl F.F., Chudnenko K.V., Berner U. (2013): GEM-Selektor geochemical modeling package: revised algorithm and GEMS3K numerical kernel for coupled simulation codes. Computational Geosciences 17, 1-24.
-
Wagner T., Kulik D.A., Hingerl F.F., Dmytrieva S.V. (2012): GEM-Selektor geochemical modeling package: TSolMod library and data interface for multicomponent phase models. Canadian Mineralogist 50, 1173-1195.
Qt widget application written in C++ and Qt6.
GEM-Selektor graphical user interface (GEMSGUI) is available under GNU General Public License (GPL) v3.
- Open a terminal and in the command line run:
git clone https://github.com/gemshub/GEMSGUI.gitGEM-Selektor can be easily built using Conda package manager. Conda can be installed from Miniconda or Miniforge.
Before building GEMSGUI, make sure you have the conda-devenv tool installed. Otherwise, run the following command in a terminal (assuming here that conda is already installed!):
conda install conda-devenvWe will use this tool now to create the GEMSGUI conda environment which contains all the dependencies for building GEMSGUI code. In the terminal, do:
cd path/to/GEMSGUI
conda devenvOnce this step is successfully completed, you can activate the GEMSGUI conda environment as follows:
conda activate GEMSGUINow it's time to use cmake to configure and build the GEM-Selektor application:
cmake -S . -B build
cmake --build build -j 5This step will produce gem-selektor application inside the created directory GEMSGUI/build/App. -j 5 lets you chose the number of CPU threads used for building the code.
Now you can run the GEMSGUI application
./GEMSGUI/build/App/gem-selektor-
Make sure that Qt6 is installed in your system.
-
Make sure you have g++, cmake and git installed. If not, install them. On Ubuntu linux terminal, this can be done using the following commands:
#!bash
sudo apt-get install g++ cmake git libssl-dev libtool byacc flexFor Mac OSX, make sure you have Homebrew installed (see Homebrew web site ).
- Install Dependencies
#!bash
cd ~/GEMSGUI
sudo ./install-dependencies.sh- Then navigate to the directory where this README.md file is located and type in terminal:
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<deploy_path> -DCMAKE_PREFIX_PATH=/home/<you>/Qt/<version>/gcc_64
make -j 4- To run Qt GEM-Selektor application, execute the following (or use GEMSGUI/gems3gui.pro with QtCreator):
./GEMSGUI/build/App/gem-selektor- For more details about command line parameters, see into GEMSGUI/Resources/rungems3.sh (for Linux), GEMSGUI/Resources/rungems3-mac.sh (for Mac) or GEMSGUI/Resources/rungems3.bat (for Windows)
# Change the path to the actual location of gem-selektor executable and Resources
cd ./Gems3-app/bin
# 1. First launch with default location of modeling projects (usually done by the installer)
# ./gem-selektor -d > gems3.log
# 2. Normal runs in default locations (retains all settings from previous session)
./gem-selektor > gems3.log
# or
# ./gem-selektor -s . -u \home\<you>\Library\Gems3 > gems3.log
# 3. New file configuration if project subfolder(s) were added/removed to/from
# /projects or if /projects are not in the default location
# ./gem-selektor -c -s <Path_for_Resources> -u <My_GEMS_Projects_Location>\Gems3 > gems3.log
# 4. New \data\*.ini files - remake DOD and module dialog configurators
# Otherwise, does the same as gems3 -c
# ./gem-selektor.exe -d -s . -u \home\<USER>\Library\Gems3 > gems3.log
# 5. Add -f after gem-selektor for a write access to database files in \DB.default\
# (for developers only!)Mace sure you have Qt6 with Wt Creator installed. Start Qt Creator and open gems3gui.pro (using prebuilt gems3k) or gems3gui_with_gems3k_source.pro (for building together with gems3k code).
Select the desired build and run locations. Copy folder Resources to the build location.
In the Qt project Run settings in the command line arguments add e.g., -d -f -s /home/<user>/path/to/build-gems3gui-Desktop_Qt. Help on the arguments can be found in Resources/doc/html/gems_setup.html
For information on using application take a look into the https://gemshub.github.io/site/.