Updated 2019-06-24

Run Quantum ESPRESSO on the Cluster

Overview

  • Quantum ESPRESSO is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.
  • This guide will cover how to run Quantum ESPRESSO on the Cluster.
  • The example used in this guide comes from this link.

Summary

  • To run Quantum ESPRESSO, you need an input file and a pseudopotential.
  • You will run a PWscf (pw.x) calculation on the input file to produce an output file containing the results of the calculation.

Tips

  • You can view all possible calculations using ls /usr/local/pacerepov1/espresso/6.2.1/mvapich2-2.1/gcc-4.9.0/bin.
  • You can run the calculation with multiple processors using mpirun -np 2 pw.x <input.in> output.out substituting 2 with the number of processors you would like to use. Make sure to request the proper number of processors in your PBS script if you do this.

Walkthrough: Run AMPL on the Cluster

  • This walkthrough will run a PWscf (pw.x) calculation on an input file which contains a reference to a pseudopotential.
  • The input file can be found here
  • The pseudopotential can be found here. For everything to work properly, a directory should be created called pseudopotential and this file should be saved inside of that directory.
  • PBS script can be found here
  • You can transfer the files to your account on the cluster to follow along. The file transfer guide may be helpful.

Part 1: The PBS Script

#PBS -N qespressoTest
#PBS -l nodes=1:ppn=2
#PBS -l pmem=2gb
#PBS -l walltime=3:00
#PBS -q force-6
#PBS -j oe
#PBS -o qespressoTest.out

cd $PBS_O_WORKDIR
module load gcc/4.9.0
module load mvapich2/2.1
module load mkl/11.2
module load espresso/6.2.1

pw.x <input.in> output.out

  • The #PBS directives are standard, requesting just 3 minutes of walltime and 1 node with 2 cores. More on #PBS directives can be found in the PBS guide
  • $PBS_O_WORKDIR is a variable that represents the directory you submit the PBS script from. Make sure the files you want to use are in the same directory you put the PBS script.
  • Output Files will also show up in this dir as well
  • module load espresso/6.2.1 loads the 6.2.1 version of Quantum ESPRESSO. To see what Quantum ESPRESSO versions are available, run module avail espresso, and load the one you want. The other module are dependencies that must be loaded before Quantum ESPRESSO is loaded.
  • pw.x <input.in> output.out runs a PWscf calculation on the input.in file and prints the results to the output.out file.

Part 2: Submit Job and Check Status

  • Be sure to change to the directory that contains the PBS Script.
  • qsub qespressoTest.pbs
  • Check job status with qstat -t <jobid>, replacing the number with the job id returned after running qsub.
  • You can delete the job with qdel <jobid> , again replacing the number with the jobid returned after running qsub.

Part 3: Collecting Results

  • In the directory where you submitted the PBS script, you should see a qespressoTest.out file which contains the results of the job, an output.out file which contains the output from Quantum ESPRESSO, a directory called pwscf.save, and a pwscf.xml file.
  • Use cat qespressoTest.out or open the file in a text editor to take a look at the ouput messages from running the PBS script. quespressoTest.out should look like this:
---------------------------------------
Begin PBS Prologue Fri Jun 21 11:51:56 EDT 2019
Job ID:     26115230.shared-sched.pace.gatech.edu
User ID:    svemuri8
Job name:   qespressoTest
Queue:      force-6
End PBS Prologue Fri Jun 21 11:51:56 EDT 2019
---------------------------------------
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
---------------------------------------
Begin PBS Epilogue Fri Jun 21 11:51:59 EDT 2019
Job ID:     26115230.shared-sched.pace.gatech.edu
User ID:    svemuri8
Job name:   qespressoTest
Resources:  neednodes=1:ppn=2,nodes=1:ppn=2,pmem=2gb,walltime=00:03:00
Rsrc Used:  cput=00:00:00,energy_used=0,mem=0kb,vmem=0kb,walltime=00:00:03
Queue:      force-6
Nodes:     
iw-c42-25.pace.gatech.edu
End PBS Epilogue Fri Jun 21 11:51:59 EDT 2019
---------------------------------------

  • Use cat output.out or open the file in a text editor to take a look at the results of running Quantum Espresso. ouput.out should look like this:

     Program PWSCF v.6.2 starts on 21Jun2019 at 11:51:57 

     This program is part of the open-source Quantum ESPRESSO suite
     for quantum simulation of materials; please cite
         "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
         "P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
          URL http://www.quantum-espresso.org", 
     in publications or presentations arising from this work. More details at
     http://www.quantum-espresso.org/quote

     Parallel version (MPI), running on     1 processors

     MPI processes distributed on     1 nodes
     Waiting for input...
     Reading input from standard input

     Current dimensions of program PWSCF are:
     Max number of different atomic species (ntypx) = 10
     Max number of k-points (npk) =  40000
     Max angular momentum in pseudopotentials (lmaxx) =  3

     Subspace diagonalization in iterative solution of the eigenvalue problem:
     a serial algorithm will be used


     G-vector sticks info
     --------------------
     sticks:   dense  smooth     PW     G-vecs:    dense   smooth      PW
     Sum         241     241     85                 2445     2445     531



     bravais-lattice index     =            2
     lattice parameter (alat)  =       7.6526  a.u.
     unit-cell volume          =     112.0383 (a.u.)^3
     number of atoms/cell      =            1
     number of atomic types    =            1
     number of electrons       =         3.00
     number of Kohn-Sham states=            6
     kinetic-energy cutoff     =      30.0000  Ry
     charge density cutoff     =     120.0000  Ry
     convergence threshold     =      1.0E-06
     mixing beta               =       0.7000
     number of iterations used =            8  plain     mixing
     Exchange-correlation      = LDA ( 1  1  0  0 0 0)

     celldm(1)=   7.652597  celldm(2)=   0.000000  celldm(3)=   0.000000
     celldm(4)=   0.000000  celldm(5)=   0.000000  celldm(6)=   0.000000

     crystal axes: (cart. coord. in units of alat)
               a(1) = (  -0.500000   0.000000   0.500000 )  
               a(2) = (   0.000000   0.500000   0.500000 )  
               a(3) = (  -0.500000   0.500000   0.000000 )  

     reciprocal axes: (cart. coord. in units 2 pi/alat)
               b(1) = ( -1.000000 -1.000000  1.000000 )  
               b(2) = (  1.000000  1.000000  1.000000 )  
               b(3) = ( -1.000000  1.000000 -1.000000 )  


     PseudoPot. # 1 for Al read from file:
     ./pseudopotential/Al.pz-n-rrkjus_psl.0.1.UPF
     MD5 check sum: 3b788946f5b2ec323a58a29a5ff2368a
     Pseudo is Ultrasoft + core correction, Zval =  3.0
     Generated using "atomic" code by A. Dal Corso v.5.0.2 svn rev. 9415
     Using radial grid of 1135 points,  4 beta functions with: 
                l(1) =   0
                l(2) =   0
                l(3) =   1
                l(4) =   1
     Q(r) pseudized with 0 coefficients 


     atomic species   valence    mass     pseudopotential
        Al             3.00    26.98150     Al( 1.00)

     48 Sym. Ops., with inversion, found



   Cartesian axes

     site n.     atom                  positions (alat units)
         1           Al  tau(   1) = (   0.0000000   0.0000000   0.0000000  )

     number of k points=    29  Marzari-Vanderbilt smearing, width (Ry)=  0.0050
                       cart. coord. in units 2pi/alat
        k(    1) = (   0.0000000   0.0000000   0.0000000), wk =   0.0039062
        k(    2) = (  -0.1250000   0.1250000  -0.1250000), wk =   0.0312500
        k(    3) = (  -0.2500000   0.2500000  -0.2500000), wk =   0.0312500
        k(    4) = (  -0.3750000   0.3750000  -0.3750000), wk =   0.0312500
        k(    5) = (   0.5000000  -0.5000000   0.5000000), wk =   0.0156250
        k(    6) = (   0.0000000   0.2500000   0.0000000), wk =   0.0234375
        k(    7) = (  -0.1250000   0.3750000  -0.1250000), wk =   0.0937500
        k(    8) = (  -0.2500000   0.5000000  -0.2500000), wk =   0.0937500
        k(    9) = (   0.6250000  -0.3750000   0.6250000), wk =   0.0937500
        k(   10) = (   0.5000000  -0.2500000   0.5000000), wk =   0.0937500
        k(   11) = (   0.3750000  -0.1250000   0.3750000), wk =   0.0937500
        k(   12) = (   0.2500000   0.0000000   0.2500000), wk =   0.0468750
        k(   13) = (   0.0000000   0.5000000   0.0000000), wk =   0.0234375
        k(   14) = (  -0.1250000   0.6250000  -0.1250000), wk =   0.0937500
        k(   15) = (   0.7500000  -0.2500000   0.7500000), wk =   0.0937500
        k(   16) = (   0.6250000  -0.1250000   0.6250000), wk =   0.0937500
        k(   17) = (   0.5000000   0.0000000   0.5000000), wk =   0.0468750
        k(   18) = (   0.0000000   0.7500000   0.0000000), wk =   0.0234375
        k(   19) = (   0.8750000  -0.1250000   0.8750000), wk =   0.0937500
        k(   20) = (   0.7500000   0.0000000   0.7500000), wk =   0.0468750
        k(   21) = (   0.0000000  -1.0000000   0.0000000), wk =   0.0117188
        k(   22) = (  -0.2500000   0.5000000   0.0000000), wk =   0.0937500
        k(   23) = (   0.6250000  -0.3750000   0.8750000), wk =   0.1875000
        k(   24) = (   0.5000000  -0.2500000   0.7500000), wk =   0.0937500
        k(   25) = (   0.7500000  -0.2500000   1.0000000), wk =   0.0937500
        k(   26) = (   0.6250000  -0.1250000   0.8750000), wk =   0.1875000
        k(   27) = (   0.5000000   0.0000000   0.7500000), wk =   0.0937500
        k(   28) = (  -0.2500000  -1.0000000   0.0000000), wk =   0.0468750
        k(   29) = (  -0.5000000  -1.0000000   0.0000000), wk =   0.0234375

     Dense  grid:     2445 G-vectors     FFT dimensions: (  20,  20,  20)

     Estimated max dynamical RAM per process >       4.41 MB

     Check: negative/imaginary core charge=   -0.000006    0.000000

     Initial potential from superposition of free atoms

     starting charge    2.99797, renormalised to    3.00000
     Starting wfc are    4 randomized atomic wfcs +    2 random wfc

     total cpu time spent up to now is        0.9 secs

     Self-consistent Calculation

     iteration #  1     ecut=    30.00 Ry     beta= 0.70
     Davidson diagonalization with overlap
     ethr =  1.00E-02,  avg # of iterations =  5.0

     Threshold (ethr) on eigenvalues was too large:
     Diagonalizing with lowered threshold

     Davidson diagonalization with overlap
     ethr =  1.89E-04,  avg # of iterations =  2.1

     total cpu time spent up to now is        1.4 secs

     total energy              =      -5.48853082 Ry
     Harris-Foulkes estimate   =      -5.49029436 Ry
     estimated scf accuracy    <       0.00542037 Ry

     iteration #  2     ecut=    30.00 Ry     beta= 0.70
     Davidson diagonalization with overlap
     ethr =  1.81E-04,  avg # of iterations =  1.2

     total cpu time spent up to now is        1.6 secs

     total energy              =      -5.48850283 Ry
     Harris-Foulkes estimate   =      -5.48862096 Ry
     estimated scf accuracy    <       0.00036210 Ry

     iteration #  3     ecut=    30.00 Ry     beta= 0.70
     Davidson diagonalization with overlap
     ethr =  1.21E-05,  avg # of iterations =  1.8

     total cpu time spent up to now is        1.7 secs

     End of self-consistent calculation

          k = 0.0000 0.0000 0.0000 (   331 PWs)   bands (ev):

    -3.4383  20.1765  20.1765  21.3995  21.3995  21.3995

          k =-0.1250 0.1250-0.1250 (   316 PWs)   bands (ev):

    -3.0166  15.8703  19.1643  19.1645  22.1845  22.9741

          k =-0.2500 0.2500-0.2500 (   311 PWs)   bands (ev):

    -1.7595  11.0367  18.3883  18.3884  21.8811  22.1847

          k =-0.3750 0.3750-0.3750 (   308 PWs)   bands (ev):

     0.3122   6.7618  18.2898  18.2899  20.2365  20.2369

          k = 0.5000-0.5000 0.5000 (   302 PWs)   bands (ev):

     3.0988   3.2354  18.7735  18.7735  19.0509  19.0511

          k = 0.0000 0.2500 0.0000 (   307 PWs)   bands (ev):

    -2.8764  17.4109  17.4109  17.7853  20.2798  22.1618

          k =-0.1250 0.3750-0.1250 (   308 PWs)   bands (ev):

    -1.8986  12.8876  16.3511  17.9177  19.0814  21.5770

          k =-0.2500 0.5000-0.2500 (   317 PWs)   bands (ev):

    -0.1001   8.4517  16.0037  16.7601  17.7228  23.6598

          k = 0.6250-0.3750 0.6250 (   312 PWs)   bands (ev):

     2.4880   4.6417  15.1373  16.3713  18.1653  22.1692

          k = 0.5000-0.2500 0.5000 (   308 PWs)   bands (ev):

     1.5408   5.8311  14.2599  17.4512  19.3408  21.3434

          k = 0.3750-0.1250 0.3750 (   309 PWs)   bands (ev):

    -0.7891   9.8460  14.1566  19.2124  21.2104  21.2190

          k = 0.2500 0.0000 0.2500 (   317 PWs)   bands (ev):

    -2.3169  14.0419  15.2072  21.2662  21.3463  22.8610

          k = 0.0000 0.5000 0.0000 (   311 PWs)   bands (ev):

    -1.2042  15.0349  15.0349  15.1393  15.8116  18.4238

          k =-0.1250 0.6250-0.1250 (   316 PWs)   bands (ev):

     0.3108  10.8312  13.1561  14.4409  15.9501  19.8592

          k = 0.7500-0.2500 0.7500 (   311 PWs)   bands (ev):

     2.6170   6.8753  11.2393  14.5657  16.2829  23.5055

          k = 0.6250-0.1250 0.6250 (   307 PWs)   bands (ev):

     3.5618   5.6615  10.1189  15.4090  17.2652  25.0687

          k = 0.5000 0.0000 0.5000 (   315 PWs)   bands (ev):

     0.9957   8.8771  10.3142  16.9684  18.9661  24.9701

          k = 0.0000 0.7500 0.0000 (   322 PWs)   bands (ev):

     1.5343  10.1874  13.4911  13.6031  13.6031  17.0120

          k = 0.8750-0.1250 0.8750 (   314 PWs)   bands (ev):

     3.5281   7.9905   9.8166  13.4856  14.8972  18.9319

          k = 0.7500 0.0000 0.7500 (   308 PWs)   bands (ev):

     5.7739   6.3003   7.1688  14.0869  15.7643  23.0998

          k = 0.0000-1.0000 0.0000 (   302 PWs)   bands (ev):

     4.7421   6.0085  12.9375  13.1263  13.1263  16.5096

          k =-0.2500 0.5000 0.0000 (   311 PWs)   bands (ev):

    -0.6511  11.4669  12.7994  16.2992  19.6855  21.3170

          k = 0.6250-0.3750 0.8750 (   313 PWs)   bands (ev):

     1.4035   7.7617  12.1519  14.1764  20.2645  22.3195

          k = 0.5000-0.2500 0.7500 (   308 PWs)   bands (ev):

     4.1386   4.3239  12.5935  12.9463  20.7464  21.2422

          k = 0.7500-0.2500 1.0000 (   309 PWs)   bands (ev):

     2.0767   9.9149  10.6283  11.3951  18.2031  20.0850

          k = 0.6250-0.1250 0.8750 (   308 PWs)   bands (ev):

     4.5907   6.7073   9.0603  11.1748  19.3464  23.3839

          k = 0.5000 0.0000 0.7500 (   311 PWs)   bands (ev):

     3.6913   7.3245   8.7317  12.2806  20.5357  23.7927

          k =-0.2500-1.0000 0.0000 (   308 PWs)   bands (ev):

     5.2578   6.5514   9.3969  10.8138  17.6969  19.6367

          k =-0.5000-1.0000 0.0000 (   308 PWs)   bands (ev):

     6.8074   6.8074   7.8494   8.5758  23.3237  23.6923

     the Fermi energy is     7.7294 ev

!    total energy              =      -5.48852569 Ry
     Harris-Foulkes estimate   =      -5.48852591 Ry
     estimated scf accuracy    <       0.00000078 Ry

     The total energy is the sum of the following terms:

     one-electron contribution =       2.92909932 Ry
     hartree contribution      =       0.00591130 Ry
     xc contribution           =      -3.03130200 Ry
     ewald contribution        =      -5.39212484 Ry
     smearing contrib. (-TS)   =      -0.00010947 Ry

     convergence has been achieved in   3 iterations

     Writing output data file pwscf.save

     init_run     :      0.43s CPU      0.44s WALL (       1 calls)
     electrons    :      0.82s CPU      0.84s WALL (       1 calls)

     Called by init_run:
     wfcinit      :      0.06s CPU      0.07s WALL (       1 calls)
     potinit      :      0.01s CPU      0.01s WALL (       1 calls)

     Called by electrons:
     c_bands      :      0.67s CPU      0.69s WALL (       4 calls)
     sum_band     :      0.13s CPU      0.13s WALL (       4 calls)
     v_of_rho     :      0.01s CPU      0.01s WALL (       4 calls)
     newd         :      0.01s CPU      0.01s WALL (       4 calls)
     mix_rho      :      0.00s CPU      0.00s WALL (       4 calls)

     Called by c_bands:
     init_us_2    :      0.02s CPU      0.03s WALL (     261 calls)
     cegterg      :      0.65s CPU      0.66s WALL (     116 calls)

     Called by sum_band:
     sum_band:bec :      0.00s CPU      0.00s WALL (     116 calls)
     addusdens    :      0.01s CPU      0.01s WALL (       4 calls)

     Called by *egterg:
     h_psi        :      0.57s CPU      0.58s WALL (     437 calls)
     s_psi        :      0.01s CPU      0.01s WALL (     437 calls)
     g_psi        :      0.00s CPU      0.00s WALL (     292 calls)
     cdiaghg      :      0.06s CPU      0.06s WALL (     379 calls)

     Called by h_psi:
     h_psi:pot    :      0.56s CPU      0.57s WALL (     437 calls)
     h_psi:calbec :      0.01s CPU      0.01s WALL (     437 calls)
     vloc_psi     :      0.53s CPU      0.55s WALL (     437 calls)
     add_vuspsi   :      0.02s CPU      0.01s WALL (     437 calls)

     General routines
     calbec       :      0.01s CPU      0.01s WALL (     553 calls)
     fft          :      0.01s CPU      0.01s WALL (      26 calls)
     fftw         :      0.56s CPU      0.56s WALL (    4714 calls)

     Parallel routines

     PWSCF        :     1.68s CPU         2.01s WALL


   This run was terminated on:  11:51:59  21Jun2019            

=------------------------------------------------------------------------------=
   JOB DONE.
=------------------------------------------------------------------------------=

  • After the result files are produced, you can move the files off the cluster, refer to the file transfer guide for help.
  • Congratulations! You successfully ran Quantum ESPRESSO on the cluster.