by Pasquale Pavone for exciting nitrogen
Purpose: Here, it will be explained how to set those environment variables which are needed for running examples presented in the tutorials. Furthermore, some general information is given about the scripts that are used in exciting tutorials.
0. Did you already download exciting?
1. Setting environment variables
The next instructions have to be executed only once before starting your first tutorial!
Very important: Before starting, the following environment variable must be set by the user
- EXCITINGROOT = Directory where exciting has been downloaded, e.g.: /home/tutorials/exciting .
The above variable is used to define other environment variables
- EXCITINGBIN = Path to the exciting executable files, defined as $EXCITINGROOT/bin .
- EXCITINGTOOLS = Directory where the tutorial scripts are located, defined as $EXCITINGROOT/tools .
- EXCITINGSTM = Directory containing the STM scripts, defined as $EXCITINGTOOLS/stm .
- EXCITINGVISUAL = Directory containing several visualization templates.
- EXCITINGCONVERT = Directory containing several conversion templates.
- 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/tutorials/exciting
export EXCITINGBIN=$EXCITINGROOT/bin
export EXCITINGTOOLS=$EXCITINGROOT/tools
export EXCITINGSTM=$EXCITINGTOOLS/stm
export EXCITINGVISUAL=$EXCITINGROOT/xml/visualizationtemplates
export EXCITINGCONVERT=$EXCITINGROOT/xml/inputfileconverter
#-------------------------------------------------------------------------------------
export TIMEFORMAT=" Elapsed time = %0lR"
#-------------------------------------------------------------------------------------
export WRITEMINMAX="1"
#-------------------------------------------------------------------------------------
export PYTHONPATH=$PYTHONPATH:$EXCITINGSTM
export PATH=$PATH:$EXCITINGTOOLS:$EXCITINGBIN:$EXCITINGSTM
#-------------------------------------------------------------------------------------
function DOS () { xsltproc $EXCITINGVISUAL/xmldos2grace.xsl dos.xml > $1 ; }
function BAND () { xsltproc $EXCITINGVISUAL/xmlband2agr.xsl bandstructure.xml ; }
#=====================================================================================
Please note again: Explicit paths given above (such as /home/tutorials/exciting and /home/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
If you have already used previous versions of exciting: You have probably some environmental variables defined inside your ~/.bashrc file. In this case, you must delete the old definitions before setting the new ones. In order to apply correctly the new settings you have to log out your account and enter it again.
Remark on the species files directory in exciting: It is not possible to define the directory containing the species files by linking directly to the exciting-code site.
2. Tutorial scripts
All the scripts used in the exciting tutorials can be found in the directory $EXCITINGROOT/tools.
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.
- STRESS-exciting-xxxxxx.xx: Scripts which use the STRESS-exciting tool.
- PLOT-xxxxxx.py: Python visualization tools.
- PLOT-xxxxxx.gnu: Gnuplot visualization tools.
The examples in the tutorials were running using
- Linux kernel version 4.9.0-6-amd64
- Intel compiler
- Bash shell
- Python 2.7.13
- Matplotlib 2.0.0
- Gnuplot 5.0 patchlevel 5
- xmgrace Grace-5.1.25
- vmd for LinuxAMD64, version 1.9
- xcrysden-1.5.24