Tutorial Scripts and Environment Variables

for exciting lithium

Purpose: Here, you will learn how to download all scripts that are used in exciting tutorials. Furthermore, it will be explained how to set those shell variables which are needed for running examples presented in the tutorials.


0. Did you already download exciting?


1. Download tutorial scripts (last update 15-Aug-2013)

Following the next instructions all tutorial scripts will be available!

Before running any example presented in the exciting tutorials, a directory which will contain all scripts used in these tutorials must be created. In order to do this, open one terminal page and move to the directory where you have unpacked the exciting package. We assume this directory to be called /home/exciting-tutorial, however, you can change this path to your own choice (here, again the symbol $ indicates the shell prompt).

$ cd /home/exciting-tutorial

Now, move to the subdirectory produced by unpacking exciting (see Section 0).

$ cd exciting

A tar.gz file of the directory excitingscripts containing all scripts used in exciting tutorials can be found here

After downloading the excitingscripts.tar.gz file in the directory /home/exciting-tutoria/exciting, execute the following command.

$ tar xfvp excitingscripts.tar.gz

Now a directory excitingscripts is created inside /home/exciting-tutorial/exciting. All scripts which are downloaded in the directory excitingscripts must be made executable. In order to do this for all files, execute the following commands.

$ cd excitingscripts
$ chmod u+x *

In order to check when tutorial scripts have been last updated, look inside excitingscripts for the presence of the file tutorials-release-date-DAY-MONTH-YEAR.

$ ls tutorials-release-date-*

Now the exciting scripts are ready to be used.

General classification of script types
  • SETUP-xxxxxx.py: Python scripts for preparing appropriate input files for exciting calculations.
  • EXECUTE-xxxxxx.sh: (Bash) shell scripts for running exciting calculations.
  • CHECKFIT-xxxxxx.py: Python scripts used for post-processing results of exciting calculations.
  • OPTIMIZE-xxxxxx.xx: Scripts used for lattice optimization.
  • ElaStic@exciting-xxxxxx.xx: Scripts which use the ElaStic tool.
  • PLOT-xxxxxx.py: Python visualization tools.
  • PLOT-xxxxxx.gnu: Gnuplot visualization tools.
Minimal requirements for running tutorial scripts
  • Bash shell
  • Python 2.6.6
  • Matplotlib 0.99.3
  • Gnuplot 4.4

2. Setting environment variables

The next instructions have to be executed only once before starting your first tutorial!

Very important: Before starting, the following shell variables must be set by the user

  • EXCITINGROOT = Directory where exciting has been downloaded, e.g.: /home/exciting-tutorial/exciting .
  • EXCITINGBIN = Path to the exciting executable files.
  • EXCITINGRUNDIR = Scratch directory used for running calculation by some exciting scripts. Example of definition: /home/exciting-tutorial/tmpdir .
  • EXCITINGSCRIPTS = Directory where the scripts are downloaded, defined as $EXCITINGROOT/excitingscripts .
  • EXCITINGATAT = Directory containing scripts for ATAT@exciting, defined as $EXCITINGSCRIPTS/ATAT@exciting .
  • EXCITINGASE = Directory containing the ASE tool, defined as $EXCITINGSCRIPTS/ase .
  • EXCITINGVISUAL = Directory containing several visualization templates.
  • ATATROOT = Directory containing the ATAT package, defined as $EXCITINGSCRIPTS/atat .
  • TIMEFORMAT = Output format for writing on the screen the running elapsed time, used in some script.

The setting of these variables can be done in a bash shell. In order to do this, edit the ~/.bashrc file in your $HOME directory (or create the file if it does not exist yet). Then, append the following lines to the ~/.bashrc file.

#=====================================================================================
# The following shell variables are needed for executing scripts in exciting tutorials
# 
export EXCITINGROOT=/home/exciting-tutorial/exciting
export EXCITINGBIN=$EXCITINGROOT/bin
export EXCITINGRUNDIR=/home/exciting-tutorial/tmpdir
export EXCITINGSCRIPTS=$EXCITINGROOT/excitingscripts
export EXCITINGATAT=$EXCITINGSCRIPTS/ATAT@exciting
export EXCITINGASE=$EXCITINGSCRIPTS/ase
export EXCITINGVISUAL=$EXCITINGROOT/xml/visualizationtemplates
export ATATROOT=$EXCITINGSCRIPTS/atat
#-------------------------------------------------------------------------------------
export TIMEFORMAT="   Elapsed time = %0lR"
#-------------------------------------------------------------------------------------
export PYTHONPATH=$PYTHONPATH:$EXCITINGASE
export PATH=$PATH:$EXCITINGSCRIPTS:$EXCITINGBIN
export PATH=$PATH:$EXCITINGATAT:$EXCITINGASE/tools
#=====================================================================================

Please note again: Explicit paths given above (such as /home/exciting-tutorial/exciting and /home/exciting-tutorial/tmpdir) are only valid as examples which can be changed by the user to the appropriate ones. In order to activate changes, any time you modify the ~/.bashrc file, you have to start a new shell or source ~/.bashrc.

$ source ~/.bashrc
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License