logo
Home Documentation Getting Started Command line Runlevels News Download Tutorials FAQ Lecture Notes Forum

PWscf to yambo interface (p2y): direct approach

This approach is based on the QEXML library routines, kindly supplied by Andrea Ferretti from the WanT project, which act as a wrapper for the IOTK library routines of Giovanni Bussi, part of the standard Quantum-ESPRESSO distribution.

Step 1: Configuring p2y
  1. Identify the version of PWscf you are using. Supported versions are: 3.1, 3.1.1, 3.2 (also for 3.2.x), and 4.0 or later.
  2. Make sure you have access to the library $ESPRESSO/4.x/iotk/src/libiotk.a in your Quantum-ESPRESSO distribution. You may have to create it with make libiotk.
  3. Configure p2y, specifying both the location of the iotk directory as well as the version of PWscf:
    ./configure --with-iotk='$ESPRESSO/4.0/iotk' --with-p2y=4.0'
    
  4. Check that the links are found properly, and that p2y is configured for the right version of PWscf. You should see:
    # [X] PW (4.0) support
    
  5. Make the p2y executable (will appear in $yambo/bin):
    make interfaces
Step 2: Create the [prefix].save directory files
  1. Perform a self consistent run with PWscf (pw.x) in the usual manner.
  2. Perform a non-self-consistent calculation with pw.x (nscf), making sure to
    • include many unoccupied bands,
    • collect the wavefunctions,
    • converge well the unoccupied states,
    • generate a set of k-points that spans the irreducible BZ (according to the symmetries)
    For example:
     &control
        calculation = 'nscf'
        wf_collect= .true.  
     /
     &system
       nosym = .false.
       nbnd  = 200,
     /
     &electrons
        diago_thr_init = 1.0e-6
        diago_full_acc = .true.
     /
     K_POINTS {automatic}
     8 8 8 1 1 1
    
  3. Check that the [prefix].save directory contains (nkpt) x K0000n directories, and that each of these contains an eigenvector file evc.dat
Step 3: Convert data to the yambo format with p2y.
  1. Enter the [filename].save directory, and run p2y with the required options, e.g.
    cd molecule.save
    $yambo/bin/p2y -S -N
    
    Note that it is safer to run p2y on a single processor.
  2. Check the databases that are now in the SAVE directory. If you have linked to netCDF, you can inspect the files directly, e.g.:
    ncdump SAVE/ns.db1 | less
    
    and if fragmentation is being used (-S option), check that nkibz files of equal size, named ns.wf_fragments_n_1 (n=1...k), are created. See this page for a description of the yambo database format.
    Otherwise you can ask yambo to report on the contents:
    $yambo/bin/yambo -D -N
    
  3. All ok? Well done: you are now ready to try the full yambo experience!

Still having problems? Try: