-A  Click here to enlarge/reduce to/back from full screen 
Paul Scherrer Institut PSI GEM Software (GEMS) Home

Paul Scherrer Institut
5232 Villigen PSI, Schweiz/Switzerland
Tel. +41 56 310 21 11
Fax. +41 56 310 21 99



Updated:
27.11.2015
E-Mail: gems2.support@psi.ch


Printer Friendly Printout without Logo or Navigation Elements available here... just click and print

GEM-Selektor v.3 Technical Information 


GEM-Selektor v.3 (GEMS3) is written in C/C++. It has a modern windowed multi-document Graphical User's Interface (GUI) that uses the functionality of Qt v.4 Toolkit for desktops in the form of dynamically-linked libraries and plugins.  From version 3.2, GEMS3 compiles also with Qt v.5.

TrollTech logoQt is a cross-platform framework that allows the same source code to be compiled and run on all major desktop PC platforms, as well as on some mobile devices. Desktop variants of Qt available under LGPL v.2.1 licence are included in the Qt SDK, which can be downloaded from http://qt-project.org.
     
The GEMS3 executable code is produced by linking together Qt dynamic load libraries and plugins provided in Qt4 or Qt5 with the following parts compiled with the GNU C++ compilers:

  • GEMS3K code for solving chemical equilibrium systems by Gibbs Energy Minimization (more ...); uses the Jama TNT C++ library (NIST) for numerical algebra, but no Qt functionality. GEMS3K code also includes the TSolMod class library of built-in models of mixing in phases-solutions.

  • GEMS-GUI code, which contains all the specific code for simple thermodynamic calculations, database management modules, widgets and dialogs. This part requires Qt headers for compilation. It uses parts of the SUPCRT92 code (translated from Fortran to C/C++), and parts supporting the TSolMod code. The GraphicsDialog  is based in part on the work the Qwt project (http://qwt.sf.net).

The GEMS3 package also contains a "Resources/" folder with configuration files, default thermodynamic database, help database, and some pdf documentation files. Set of icons used in GEM-Selektor GUI: (c) 2012, Gillian Grün.

Attention: Since version 3.2, the GEMS3 installer contains an updated default thermodynamic database (TDB). Please, check here for learning about the correct upgrading of the existing GEMS3 installation (v 3.1 or lower) to GEM-Selektor v. 3.2 with the the updated default TDB.

Attention: GEM IPM numerical controls in this (v.3) program are not compatible with those in GEM-Selektor v.2. Hence, any old modeling project must be opened once in 'Remake' mode to reset the numerical controls (correct results are not guaranteed otherwise!).

  • To do so, start GEMS3; click on the 'Computation of Equilibria' button in the upper left corner; in the appearing dialog, turn on the 'Activate Project Remake Wizard' checkbox; select the project in the list of modeling projects, and click 'Open Project'. In the appearing 'Step 1 ...' page of the Project Wizard, 'Change pre-configured GEM IPM numerical controls' to 'Restore normal (standard) variant for fast convergence' or another suitable choice, and click 'Next >' twice. The new settings will be saved in the project record, so there will be no need to repeat this procedure when this project is opened next time.

Platform-specific technical information

Windows XP/7/8/10

GEM-Selektor is built using Qt4.8.4 or Qt5.x with the MinGW port of the GNU C++ compiler and linker. It comes as a self-extracting installer file  having the name

  Gems<ver>-<revGUI>.<revG3K>-win32-install.sfx.exe 

where  <ver>  stands for version number (e.g. 3.2), <revGUI> is the SVN trunk revision number for the GEMS-Vizor part, and <revG3K> is the SVN trunk revision number for the GEMS3K code part. The installer (ca. 14 Mb size) is prepared using the 7-zip SFX Maker out of a 7-zip archive that contains a compressed folder Gems3-app and files INSTALL.windows.txt, rungems3.bat      and Readme3.txt. The contents of INSTALL.windows.txt file are shown below.

To install GEM-Selektor on a Windows PC:

1. Copy the installer file into a temporary location and execute it. 

2. The installer will ask where to install/update, showing "C:\Selektor" as a suggestion. If you accept this, the program will be located in "C:\Selektor\Gems3-app\". This folder contains program and resource files, including help database and the "\DB.default\" folder with the thermodynamic database. Upon the first start, a folder "C:\Selektor\Library\Gems3\projects\" will be created, where your modeling projects will be stored. The folder will initially contain some test projects.

3. Alternatively, you can type or select another location ("\Program Files" is not recommended), for example "D:\MyWork\Modeling". In this case, the program will be located in "D:\MyWork\Modeling\Gems3-app\" and the modeling projects- in "D:\MyWork\Modeling\Library\Gems3\projects\".

4. After extracting files, GEM-Selektor will start automatically; you can exit it and look for a GEMS v3 icon on your desktop, to be used further on for staring GEM-Selektor.  At a first-time installation, the "....\Library\Gems3\projects\" folder will be created and test projects copied in there from the "....\Gems3-app\Resources\projects\" folder. If the installer is executed for update/upgrade, the test projects will not be copied even they were updated in the "Resources" location. To refresh or reset a test project, please use any suitable file manager to copy the project subfolder over.

5. You can also use any file manager to add your existing old projects folders into the "....\Library\gems3\projects\". Backup of modeling projects from this folder is strongly recommended at least once per day.

6. To update GEM-Selektor, start the installer and browse to the location where GEMS3 is installed, for example, to "D:\MyWork\Modeling\". Only files in the "\Gems3-app\" subfolder will be replaced; your existing modeling and test projects in "....\Library\gems3\projects\" will not be changed.   

7. To remove GEM-Selektor from your computer:  use a file manager to locate the installation folder (e.g. "D:\MyWork\Modeling\")  and delete it. Find the "GEMS3" icon on your desktop and drag it into the Recycle Bin. The GEMS3 installer does not change any Windows Registry entries.

When installed, GEM-Selektor occupies ca. 55 Mb on hard disk; a modeling project can occupy 1 to 100 Mb depending on the size of project chemical system and number of process-generated records. Therefore, at least 1 Gb of free HDD space is necessary (SSD disks work much faster). The program runs, in principle, on any PC with Intel or AMD processor - from netbooks to desktops - but for better performance, a quad-core i7 or similar processor with 4 Gb RAM or more is recommended. The multi-document GUI of GEMS3 looks nice on color displays with 1600 x 900 or higher resolution.

Mac OS X (10.6 to 10.10)

GEM-Selektor is built using Qt4.8.4 or Qt 5.x which requires the GNU C++ compiler and linker provided in the actual version of Xcode. GEMS3 comes as a disk image file having the name

  Gems<ver>-<revGUI>.<revG3K>-OSX-x86-64.dmg 

where  <ver>  stands for version number (e.g. 3.2), <revGUI> is the SVN trunk revision number for the GEMS-Vizor part, and <revG3K> is the SVN trunk revision number for the GEMS3K code part. The installer (ca. 22 Mb size) is prepared using the macdeployqt utility of Qt SDK from (updated) /Applications/gems3.app application that has usual folder structure as required by OS X. The /Applications/gems3.app/Contents/Resources/ contains a file INSTALL.macosx.txt, contents of which are shown below.

To install GEM-Selektor on Mac OS X Snow Leopard,  Lion, or Mountain Lion:

1. Click on the installer .dmg file to mount it. A window appears with the application Gems3.app.

2. Drag Gems3.app from that window to the "/Applications/" folder. The Gems3.app contains the program and the resource files, including the help database and a "/DB.default/" folder with built-in thermodynamic database.  

3. Start GEMS3 by clicking on Gems3.app in "/Applications/" folder. This will create a subfolder  "~/Library/Gems3/projects/" in your user home directory, where the modeling projects will be stored. If the application does not start, open the terminal; cd to /Applications; and execute a command:

$ /Applications/gems3.app/Contents/MacOS/gems3 -d

After that, next time, start GEM-Selektor as usual. If gems3.app still did not start, this means that some runtime libraries are missing; install Xcode with command line tools from App-store or from Apple web site.

4. You can add third-party or your old project folders into "~/Library/Gems3/projects/". Backup of modeling projects is strongly recommended at least once per day. To see this folder in Finder: open the Terminal; cd to your user's directory; run a command:

      chflags nohidden ~/Library/

This command will have effect until the next reboot or logout/login.

5. To add the GEMS3 icon to Dock: start Gems3.app, right-click on its icon in the dock, and select "Keep in Dock".

6. To update GEMS3: just move Gems3.app from "/Applications/" to Trash, and proceed from step 1. Only files in Gems3.app will be replaced; your modeling projects in "~/Library/Gems3/projects/" will remain unaffected.

7. To remove GEMS3 from your PC:  drag the Gems3.app from "/Applications/" to Trash; cd in ~/Library/ and delete Gems3/ recursively.   

When installed, GEM-Selektor occupies ca. 57 Mb on hard disk; a modeling project can occupy 1 to 100 Mb depending on the size of project chemical system and number of process-generated records. Therefore, at least 1 Gb of free HDD space is necessary (SSD disks work much faster). The program runs, in principle, on any Mac with Intel processor and OS X 10.6 or higher. For better performance, an iMac, Mac Pro, or Mac Book Pro quad-core i7 or similar processor with 4 Gb RAM or more is recommended. The multi-document GUI of GEMS3 looks nice on color displays with 1600 x 900 or higher resolution.

Linux

GEM-Selektor is built using Qt4.8.4 or Qt5.x installed in user's home directory, which uses the native GNU C++ compiler and linker. GEMS3 installer comes as a tar.gzip (tgz) archive file having the name

  Gems<ver>-<revGUI>.<revG3K>-linux-x86-<bits>.tgz

where  <ver>  stands for version number (e.g. 3.2), <revGUI> is the SVN trunk revision number for the GEMS-Vizor part, <revG3K> is the SVN trunk revision number for the GEMS3K code part, and <bits> stands for 32 or 64 depending on the linux distribution. The installer (ca. 16 Mb size) is prepared on the Ubuntu 12.04 LTS 32 or 64 by compressing the folder "~/Gems3-app/" application that contains the "Resources/" subfolder, gems3 executable, and binary Qt4 libraries and plugins used by gems3. The folder also contains the gems3.bash and gems3.sh batch files for launching GEMS3 program, and the INSTALL.linux.txt file. The contents of the latter are shown below.

To install GEMS3 on linux (Ubuntu >= 10.4; Mint >= 13.0; Fedora >= 15; Kubuntu >= 10.4; OpenSuSE >=12.0; Scientific Linux >= 6.0):

1. Copy the installer file into your home directory ~/ ("/home/<your-user-name>/").

2. Unpack the installer to your home directory. This will create a folder "~/Gems3-app/" that contains program and resource files, including help database and "/DB.default/" folder with thermodynamic database.

3. Optionally, you can now create in your home directory a folder like "~/MYGEMS/" and move the folder "~/Gems3-app/" in there.

4. In terminal, cd into "/Gems3-app/" wherever it is installed, and execute a command:  ./gems3.bash -d    (or ./gems3.sh -d). The GEMS3 program should launch; after you exit it, a folder "...../Library/Gems3/projects/" with several test modeling projects will be available at the same level as the "...../Gems3-app/" folder.

5. You can add existing third-party projects, or your old project folders into "..../Library/gems3/projects/".  Backup of modeling projects is strongly recommended at list once a day.

6. To create a desktop shortcut for starting GEMS3: copy the file GEMSv3.<x>.desktop from "..../Gems3-App/ToDesktop/" to the "~/Desktop/" folder; right-click on the GEMSv3 icon on your desktop and check the actual location of the program in the command line (e.g. /home/<your-user-name>/Gems3-app/gems3.bash -c) and location of the GEMS3 icon (e.g. /home/<your-user-name>/Gems3-app/gems3.png), and save.

7. Start GEMS3 by clicking on the desktop icon. If it does not start then check the path in the icon again, or try gems3.sh instead of gems3.bash (depends on the linux installation).

8. To update GEMS3, unpack the installer archive and replace with it the existing ".../Gems3-app/" folder only (your projects will remain intact in the ".../Library/Gems3/projects" folder).

9. To remove GEMS3 from your PC, simply delete both ".../Gems3-app/" and ".../Library/Gems3/" folders in your home directory.

All operations described above do not require root privileges.  

When installed, GEM-Selektor occupies ca. 45 Mb on hard disk; a modeling project can occupy 1 to 100 Mb depending on the size of project chemical system and number of process-generated records. Therefore, at least 1 Gb of free HDD space is necessary (SSD disks work much faster). The program runs, in principle, on any PC with Intel processor. For better performance, a PC with quad-core i7 or similar processor with 4 Gb RAM or more is recommended. The multi-document GUI of GEMS3 looks nice on color displays with 1600 x 900 or higher resolution.

Although the GEMS3 installer for linux is prepared on Ubuntu or on Scientific linux, it usually runs on any other linux distribution for the same architecture, e.g. on kubuntu linux 11 and higher, fedora linux 15 and higher, and openSuSE linux 12 and higher. The reason is that the installer contains all the necessary binary files form Qt, and is simply a tarball zip archive that is supposed to run in the home directory of the user with normal privileges.

On some linuxes, the default font size in GEMS module windows may appear odd (too small or too large). This can be fixed in Preferences Dialog. Start GEMS3 and click "Help" "Preferences" menu command, then click the "Change font..." button. Alternatively, try the system desktop "Appearance" settings for fonts.

Sometines on Ubuntu 12.x linuxes, tooltips may not be readable (white characters on almost white background). If so, then proceed as follows:

1. Start GEMS3
2. Right-click on ubuntu desktop
3. in "Appearance" "Look" tab, select a different Theme and then back the originally used Theme
4. Back in GEMS3 mainframe window, check the tooltips - they should now be readable until the end of GEMS3 session.


Troubleshooting

If GEMS3 program does not start properly:

  • Check that the paths to executable and Resources are correct in the shortcut or in the command-line batch file.

  • Try again starting GEMS3 with -d command line key to re-initialize configuration files.

  • On Linux, check that you installed a compatible variant, e.g. 32-bit on 32-bit linux. Re-install, if necessary.

  • Only one instance of GEMS3 can run in the computer memory. Kill the previous instance and start GEMS again. 

If GEMS3 crashes when the user tries to open a modeling project:

  • Restore two files with names containing "projec" from the backup of project database folder.

If this does not help, please contact the GEMS Development Team.



Last updated:  27. 11. 2015

© 2003-2015  GEMS Development Team.