Special Guidelines for "exciting Shanghai School 2018" Participants

by Pasquale Pavone for exciting nitrogen

Purpose: Here, the guidelines for the participants in the "exciting Shanghai School 2018" are presented. It is assumed throughout the tutorials that you have a basic knowledge of the commands of the Linux operative system.

0. No need to download and compile the code!

All participants in the "exciting Shanghai School 20018" do not need to download and compile exciting. Instead, you will use a pre-installed 64-bit version of exciting nitrogen that can be found in the directory /home/sanboot/exciting_nitrogen of the desktop computer which you will use in the hands-on tutorial sessions.

The instructions given in the next sections have to be executed every time you start a tutorial session!

1. Checking the setting of environment variables

The setting of the relevant environment variables can be done in a bash shell. In order to do this, edit the ~/.bashrc file in your $HOME directory and check if the following lines appear at the end of the file.

# The following shell variables are needed for executing scripts in exciting tutorials
export EXCITINGROOT=/home/sanboot/exciting_nitrogen
export EXCITINGVISUAL=$EXCITINGROOT/xml/visualizationtemplates
export EXCITINGCONVERT=$EXCITINGROOT/xml/inputfileconverter
export TIMEFORMAT="   Elapsed time = %0lR"
export WRITEMINMAX="1"
function DOS  () { xsltproc $EXCITINGVISUAL/xmldos2grace.xsl dos.xml > $1 ; }
function BAND () { xsltproc $EXCITINGVISUAL/xmlband2agr.xsl bandstructure.xml ; }

If these lines are not included in the ~/.bashrc file, append them at the end of the file.

Description of the most relevant environment variables
  • EXCITINGROOT = Directory where exciting has been downloaded. In our case: /home/sanboot/exciting_nitrogen.
  • 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.

Please note: In order to activate the changes above, you have to start a new shell or source ~/.bashrc (from now on the symbol $ will indicate the shell prompt):

$ source ~/.bashrc
Tutorial scripts

All the scripts used in the exciting tutorials can be found in the directory $EXCITINGROOT/tools and its subdirectories.

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.

2. Install the correct version of Python

Most of the scripts used in the exciting tutorials are written in the Python language. In order to properly execute these scripts, you need to install the correct version of Python. This can be done using the following procedure:

  • Type on the shell line the command:
$ su
  • Typing a password will be requested (use the same password to enter your account).
  • After giving the password and pressing the enter key, the following two lines of command should be executed.
$ update-alternatives --install /usr/bin/python python /home/sanboot/miniconda2/bin/python 100
$ exit

3. Creating and saving the working directory

All data produced in your account in the daily tutorial sessions will be lost on quitting the session !

Therefore, in order to save your data, you have to strictly follow the procedure described in the next:

  • STEP 1: In the first tutorial session on Sunday, November 18, you should create the subdirectory /home/sanboot/tutorials where you will perform all the calculations presented in the tutorial examples:
$ mkdir /home/sanboot/tutorials
$ cd /home/sanboot/tutorials
  • STEP 2: At the end of the first daily tutorial session, you save the complete subdirectory tutorials by storing it using the memory stick you received at the registration desk.
  • STEP 3: At the beginning of each next daily tutorial session you copy back the directory tutorials from your memory stick inside the desktop directory /home/sanboot .
  • STEP 4: At the end of each daily tutorial session, repeat what you have done in STEP 2.

4. How to continue?

Move inside the directory /home/sanboot/tutorials where you will perform all the calculations presented in the tutorial examples:

$ cd /home/sanboot/tutorials

You can now go back to the main Tutorials page. However, due to the fact that you have already a compiled version of exciting, you should skip the README as well as the first tutorial Download and compile exciting and start with the second one How to start an exciting calculation.

Please note:

  • The settings described in this page are valid only for participants of the "exciting Shanghai School 2018". Participants of this school must follow the settings described in this page instead of the general ones described in How to set environment variables for tutorials scripts.
  • The standard starting working directory for the hands-on exercises as mentioned in every tutorial is /home/tutorials. However, this should be substituted by /home/sanboot/tutorials for participants of the "exciting Shanghai School 2018".

5. Useful hints for those who have little experience with Unix/Linux

  • There are a bunch of Unix/Linux editors available in the Ubuntu distribution that can be used, try one of the following examples and decide what you like more:
$ gedit FILENAME &
  • In order to visualize png files, you can use either the eog program (preferred choice) or the firefox browser as in the following example:
$ eog PLOT.png &
$ firefox PLOT.png &
  • In order to visualize ps or pdf files, you can use the evince program as in the following example:
$ evince PLOT.ps &
$ evince PDFFILE.pdf &

More details on these and further Linux commands can be found here.

6. How to run exciting using your laptop

If you want to run exciting on your own laptop (e.g., during the evening extra computer time), you can use the standard procedure for downloading exciting nitrogen as discussed in How to set environment variables for tutorials scripts and Download and compile exciting.

A better option, however, is to use the pre-compiled version of exciting that is recommended for you. This 64-bit version has been obteined by compiling exciting with the fortran intel compiler and can be downloaded at the next link:

Following the usual downloading procedure of your browser, the file exciting-nitrogen.tar.gz will be located in the directoty $HOME/Downloads. Move this file in the directory /home and unpack it. This can be done using the commands

$ mv $HOME/Downloads/exciting-nitrogen.tar.gz /home
$ cd /home
$ tar xvf exciting-nitrogen.tar.gz

By executing the last command, a subdirectory called exciting-nitrogen is created. This directory contains all files which make up the exciting software package.

Finally, before you start to run the code, you should set the environmental variables as described in Section 1. Notice that, in this case you should modifiy the definition of the environmental variable $EXCITINGROOT as described in the following line:

export EXCITINGROOT=/home/exciting-nitrogen
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License