Quantum Espresso is Electronic-Structure and Ab-Initio Molecular Dynamics Suite. It’s used by material scientists to determine properties of materials and to visualize their bands for optimization in modeling. From time to time i get these requests to set-up this suite on scientists PCs. I am getting tired of this, so here is a short tutorial on how to set it up and run examples.
- Ubuntu 14.04 (Trusty Tahr) 64bit
- Quantum Espresso 5.0.2
Download the correct .deb files from launchpad link above. If you have Ubuntu 14.04, get the Trusty files. If you have a 32-bit machine, get the 32-bit files, and if you have 64-bit machine make sure you get the amd64 files. trying to install 32-bit .deb files on a 64-bit machine will result in unsolved dependencies or installation of conflicting 32-bit libraries. You need both the Espresso .deb file and the Espresso-data.deb file. The data .deb file contains the documentation, i.e. including the Pseudopotential(UPF) files and examples.
step2: install QE
right-click the QE .deb file and open with Ubuntu software center, in my case the file is quantum-espresso_5.0.2-5build1_amd64.deb, or alternatively on terminal run
sudo dpkg -i path_to_.deb_file
Step3: install the QE-data
repeat step2 but this time using the other ‘-data.deb’ file. In my case the file is quantum-espresso-data_5.0.2-5build1_all.deb
if all goes well, you should be able to find the executable files under /usr/bin
which pw.x /usr/bin/pw.x
So you have the binaries installed. Check the documents and examples:
ls /usr/share/doc/quantum-espresso/ changelog.Debian.gz copyright examples html
Now you can test example1 in the examples folder. I prefer copying the example script in my home directory under /home/user/QE/example01/run_example
I modify the example script, there is no environmental variables file anywhere, so I declare them in the beginning of the script
#!/bin/sh # run from directory where this script is cd `echo $0 | sed 's/(.*)/.*/1/'` # extract pathname EXAMPLE_DIR=`pwd` # check whether echo has the -e option if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi $ECHO $ECHO "$EXAMPLE_DIR : starting" $ECHO $ECHO "This example shows how to use pw.x and postprocessing codes to make a" $ECHO "contour plot in the  plane of the charge density for Si, and to" $ECHO "plot the band structure of Si." # set the needed environment variables #. ../../../environment_variables export BIN_DIR=/usr/bin export PSEUDO_DIR=/usr/share/espresso/pseudo export TMP_DIR=tmp ...
The examples are available on my github repo. In there you will find the results folder, for silicon its complete and you can see some si.rho.ps postscript plot file, viewable using a pdf viewer.