Related Posts Plugin for WordPress, Blogger...

Saturday, December 25, 2010

How to install Quantum Espresso in Ubuntu Linux

Quantum ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft).

Preparing system:

To install Quantum Espresso you need the following packages pre-installed.

build-essential, gfortran and fftw3-dev. For that open the terminal from

Applications --> Accessories --> Terminal and type in

sudo apt-get install build-essential fftw3-dev gfortran

For best performance it is better to use intel fortran compiler "ifort" instead of gfortran.

In that case you will need to install intel C++ compiler (icc) also.

The installation details of ifort and icc are given in the following link.

In this case you may also need to install
liblapack-dev, fftw-dev

for that type into terminal the following...

sudo apt-get install liblapack-dev fftw-dev

Even with gfortran, if necessary you may install the above two.

Now Download Quantum-Espresso from

Now go to the location where the file has been downloaded in the terminal by using cd. (Applications --> Accessories --> Terminal)

Eg: if it is on desktop, type in

cd Desktop

Now enter the following commands:

tar -xzvf espresso-4*.tar.gz

cd espresso-4*


make all

gedit ~/.bashrc

Now enter the following line at the end of the file..

export PATH=$PATH:/complete_path_to_espresso-4*/bin/

Now save the file and close.

Then type in terminal...

source ~/.bashrc

Thats all... Quantum Espresso is installed...

Hands-on Tutorial of Quantum Espresso, series of presentations providing both theoretical background information as well as practical help for calculations is also available.

Some more tutorials are available at


Prerequisites for PWgui are: Tcl8.5, iwidgets4 which you can install from terminal by typing in the terminal:

sudo apt-get install tcl8.5 iwidgets4

Later you should uninstall the previous versions of tcl, tk and iwidgets. To know the previous installed versions, run the following:

sudo dpkg --get-selections | grep tcl

then uninstall the particular version by typing in

sudo apt-get purge tclx.x

Here you should mention the version number (x.x) exactly which you want to uninstall

similarly for iwidgets also,

sudo dpkg --get-selections | grep iwidgets

then uninstall by typing in

sudo apt-get purge iwidgetsx.x

Be careful in mentioning the version number (x.x)

You can download the graphical user interface for Quantum espresso from the page:

The version of PWgui need not be same as that of espresso.

Download and extract the PWgui-x.x into espresso-x.x.x folder.

Now go into the folder and type in


Then you will see...

pwgui-gui.png (855×769)
This requires XCrySDen to view molecular structures...
The installation instructions are here...

Now add the path environmental variables:

gedit ~/.bashrc

At the end of the file type in:

export PATH=$PATH:/complete_path_to/espresso-x.x.x/bin

export PATH=$PATH:/complete_path_to/espresso-x.x.x/PWgui-x.x/

Then save it and close and then type in the terminal:

source ~/.bashrc

Please inform me whether this method works or not...


Please give your valuable comment for further improvement...

Is this post useful?
Working well!
Not working...
Needs some modifications.. free polls


  1. So nice, Could you please post how to install quantum espresso in windows.

    Tx inadvnce...

  2. May be you need to install CygWin first...

    and with in that you can install Quantum ESPRESSO...

  3. Hi,
    Thank you for valuable instructions. I installed QE on a 32-bit dual Ubuntu/Win PC with gfrotran and it works perfectly (but that was just a test).

    Now I try a more serious multicore 64-bit PC, but I hesitate a bit. MPI-related stuff is not mentioned in your tutorial. Do we really need it for a multicore PC for better performance? (Was your PC multicore?) As follows from the Q.espresso wiki, we rather need MPI, but then, ifort doesn't seem to go easy. Have you any experience on the topic? Any comments will be greatly appreciated

    Pavel A

  4. MPI related stuff works only when there are 2 or more processors connected in parallel. But a multi core processor is a single processor with 2 or 4 or 8 or 16 cores (sub-processors). So one can install quantum espresso on 64-bit processor. I have tried it on i7-6 core 64-bit processor and AMD PHENOM-II X6, another six core processor. But the Linux one is going to install is a 64-bit Ubuntu which one can download from

    The installation instructions are here...

    It is better to have the kind of partition table I have mentioned in the above post.

    My best suggestion is to use ifort instead of gfortran.

    Because I came to know that for some other similar kind of softwares like GAMESS; ifort is giving 32 times faster performance than gfortran to run some commands...

    I hope these details answer your questions...

    For further details you can contact me at

  5. I installed pwgui, but when try to run it, the following error comes up
    ylli@ylliVB:~$ ./pwgui
    couldn't load file "/usr/lib/": /usr/lib/ cannot open shared object file: No such file or directory
    while executing
    "load /usr/lib/ Itcl"
    ("package ifneeded" script)
    invoked from within
    "package require -exact Itcl 3.2"
    (file "/home/ylli/pwgui/main.tcl" line 10)

  6. I hope you did not install the prerequisites:

    Prerequisites for PWgui are: Tcl8.5, iwidgets4

    with all dependencies... and correct versions...

    Please go through the section Pwgui: in the post for further details...

  7. installed the source and problem solved. Thanks. Yuelin

  8. @Yuelin

    Could you please mention which source did you install... which will be helpful for future visitors...

  9. Hi,
    I think I was able to run Pwgui-4.3, i.e. I saw the above-mentioned graphical user interface window. However, it cannot open example input files of Quantum Espresso version 4.3.1. Also I would like to learn how to run a code in Quantum Espresso via PWgui.
    Thanks in advance.

  10. Hi, can i know what's the command

    export PATH=$PATH:/complete_path_to_espresso-4*/bin/


  11. Hi,
    I tried to install Pwgui-5.0.2. When I installed the iwidgets4, it shows 'E: Unable to locate package iwidgets4'. So please help me to install PWgui-5.0.2. Thank you in advance.

  12. type in terminal the following:

    sudo gedit /etc/apt/sources.list

    and make sure that there is no hash symbol (#) before the lines containing "deb http://---- universe ---"

    and "deb-src http://---- universe ---"

    for example:

    deb precise main restricted universe multiverse
    deb-src precise main restricted universe multiverse

    save the file and then run in terminal...

    sudo apt-get update

    then try the above procedure...

  13. hi, when i run './check-pw.x.j ' it shows
    Segmentation fault (core dumped)
    FAILED with error condition!
    Input:, Output: berry.out, Reference: berry.ref

    could you help please ??

  14. well appreciated.
    pls when I was trying to run existing file in PWgui-4.3.1, I have the below error report. Pls what can I do?
    : failed to locate object from identifier path_inter_nimages

    ERROR: failed to locate object from identifier path_inter_nimages

    while executing
    "error $::tclu::error(errMsg) $::tclu::error(info) $::tclu::error(code)"
    ("uplevel" body line 2)
    invoked from within
    "uplevel 1 {
    error $::tclu::error(errMsg) $::tclu::error(info) $::tclu::error(code)
    (procedure "::tclu::ERROR" line 20)
    invoked from within
    "::tclu::ERROR "failed to locate object from identifier $varIdent""
    (object "::guib::PWmoduleObj0" method "::guib::moduleObj::valueToTextvalue" body line 11)
    invoked from within
    "valueToTextvalue $ident $value"
    (object "::guib::PWmoduleObj0" method "::guib::moduleObj::varset" body line 4)
    invoked from within
    "$moduleObj varset path_inter_nimages -value $ni"
    (procedure "::pwscf::pwReadFilter" line 59)
    invoked from within
    "$readFilter $this $fileChannel"
    (object "::guib::PWmoduleObj0" method "::guib::moduleObj::readFile" body line 8)
    invoked from within
    "::guib::PWmoduleObj0 readFile file7"
    (in namespace eval "::guib" script line 1)
    invoked from within
    "namespace eval ::guib [list $obj readFile $fileChannel]"
    (object "::gUI0" method "::guib::GUI::_openInput" body line 27)
    invoked from within
    "$cmd $moduleIdent $moduleName $moduleFile"
    (object "::gUI0" method "::guib::GUI::_toolbarCmd" body line 3)
    invoked from within
    "::gUI0 _toolbarCmd .gUI0_toolbaropen _openInput pw PW.X /home/ezekiel/Desktop/espresso-4.3.2/espresso-4.3/PWgui-4.3/modules/pw/pw.tcl"
    (in namespace inscope "::guib::GUI" script line 1)
    invoked from within
    "namespace inscope ::guib::GUI {::gUI0 _toolbarCmd .gUI0_toolbaropen _openInput pw PW.X /home/ezekiel/Desktop/espresso-4.3.2/espresso-4.3/PWgui-4.3/mod..."
    invoked from within
    ".gUI0_toolbaropen.0 invoke"
    ("uplevel" body line 1)
    invoked from within
    "uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 22)
    invoked from within
    "tk::ButtonUp .gUI0_toolbaropen.0"
    (command bound to event)


  15. While installing this kind of message found in the terminal,
    "can't find package Itk
    while executing
    "package require Itk "
    (file "/home/yaami/espresso/PWgui-4.1.1/lib/Guib-0.5/init.tcl" line 11)
    invoked from within
    "source /home/yaami/espresso/PWgui-4.1.1/lib/Guib-0.5/init.tcl"
    ("package ifneeded" script)
    invoked from within
    "package require Guib 0.5"
    (file "/home/yaami/espresso/PWgui-4.1.1/init.tcl" line 5)
    invoked from within
    "source [file join $env(PWGUI) init.tcl]"
    (file "/home/yaami/espresso/PWgui-4.1.1/pwgui.tcl" line 62)
    What to do???

  16. I had an installation of xcrysden problem when I want to install frrelut3-dev it displayed me a message ereur impossible d'obtenir le verrou /var/libd/pkg/lok-open

  17. -2014-03-21 20:04:12--
    => `MesaLib-7.10.3.tar.gz'
    Resolving (
    Connecting to (||:21... connected.
    Logging in as anonymous ...
    Error in server response, closing control connection.

    --2014-03-21 20:09:15--
    (try: 2) => `MesaLib-7.10.3.tar.gz'
    trying and trying...but can't download...what should i do?

    1. The files have been moved to "old versions" folder...

      Here is the link...

  18. how to remove MPI run when using on single processor desktop computer in Ubuntu linux (i3 processor) 32 bit

  19. here are a few supporting things...

    Also i3 is a 64 bit processor. You can install 64 bit Ubuntu.

  20. when i run ./check-pw.x.j
    its saying error
    what should i do to solve this

  21. PW/tests$ ./check-pw.x.j
    Checking atom...passed
    Checking atom-lsda...passed
    Checking atom-pbe...Segmentation fault (core dumped)
    FAILED with error condition!
    Input:, Output: atom-pbe.out, Reference: atom-pbe.ref

  22. thank you i have instal QE and pwgui successfully but i want a discription how to do input file pw.x with pwgui like coordinates atomes.....etc
    can any one help me please

  23. i allready installed cygwin im my system so now please wud u guys help me to install quantum espresso in windows its been two weeks m trying to install but failed......wil b grateful to u

  24. hello please can you send me how to install and use Q.E with the videos i' m trying to read all this but i didn't understand it's been two month i'm trying but in vain please help thanks

  25. Thank you for your text. It was very helpful. I installed QE 5.2.0, so I had to change a few things, but it was simply.


  26. Quickbooks Support - 1-800-261-4831
    COMPLETEPCSOLUTION is one of the best way to resolve all problems
    like Quickbooks technical support,Quickbooks customer suppport and installation,
    Quickbooks contact number , Quickbooks Desktop Support,Quickbooks Enterprise Support,
    Support for Quickbooks Desktop , Support for Quickbooks Enterprise.

  27. NATIONAL INSTITUTE OF DIGITAL EDUCATION established in 2010 with the mission of delivering training to professionals in Computer Training. We offer a wide range of quality computer training.

    All our training courses are taught by professionals in the field, allowing you the chance to learn from experts within their respected industry, which provides you with a quality computer training that will help you take your knowledge and career to new heights. We have different courses to shoot-up the requirement of the general youths of West Bengal. The duration of the courses are segregated in Six Months, One Year & 18 Months. Students are awarded by CERTIFICATE which will accept all over India.
    Email: /

    Website : , Facebook :

    Twitter : , YouTube :

    Android App :

  28. QuantumEspresso has been set in a docker container and can now run in seconds on every platform :

    you will find the docker images on

  29. Hi, I am John working in IT company. Cause of busy I work in my home so, I need a high-configaration which is one of the
    best computers.
    So, I was feeling worried about the best computer. By friend suggest me to visit your website and got it. This is really good product.
    Specially RAM, graphic, and all configaration are good. I am happy. I am happy.

  30. Nice post thanks for sharing. Friends if you want to purchase best thin bezel monitor, then just go with it

  31. Nice blog..
    How to Speed UP your PC?
    Download Registry Cleaner tools

  32. Nice blog...
    QuickBooks technical support number +1800-470-9685 provide support for Backup Support Multi-user Support, Payroll Support, and Synchronization with Devices support, QB Installation Support, QuickBooks Tech Support for Updating your QB, and Error Support etc.

    Quickbooks Tech Support Number

  33. Thanks for sharing, nice blog, Can you share more about high quality app installs and blogs.

  34. Nice blog...
    Get help from Intuit QuickBooks Hosting, Pro, Premier, Desktop, Enterprise, Accounting experts. Our QuickBooks Experts will be resolved any types of QuickBooks problems with in very short time period now Dial our toll free number 1-800-470-9685

    Quickbooks enterprise Tech Support Number

  35. Solution Macbook A1708 A1709 keyboard got liquid so difficult hard to press
    Here a splution

  36. Get help from Intuit QuickBooks Hosting, Pro, Premier, Desktop, Enterprise, Accounting experts. Our QuickBooks Experts will be resolved any types of QuickBooks problems with in very short time period now Dial our toll free number
    Visit here:

    aol customer care
    aol customer care
    aol customer care
    aol customer care
    aol customer care
    aol customer care

  37. when i run pwgui its telling itk package is not found please can you tell what to do.

  38. i want run comands of quantum espresso in pwgui but options are not availabe

  39. Given information in this blog is really beneficial for us....for more information about basic computer visit our blog...