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

PWscf to yambo interface (p2y)

The p2y interface can read and process bandstructure output generated from the PWscf (Quantum-Espresso) package (http://www.pwscf.org). Linking libraries and routines from different codes is tricky, so read the following instructions thoroughly and carefully.

Important note:Kleinman-Bylander form factors are not created with p2y. For some materials or observables (e.g. optical spectra of Cu), these terms are crucial to obtain correct results. Therefore, unless you know better, you might be better off using the Abinit convertor, a2y, until we have implemented the terms in p2y.

In brief, importing data from PWscf is done in two steps:

  1. Perform standard nscf (or bands) calculation with pw.x to generate [prefix].save/ directory and contents.
  2. Convert content of [prefix].save/ directory into SAVE/(n)s.db1, SAVE/(n)s.wf files using p2y.

For detailed instructions in setting up and using p2y, see the

Please note that earlier versions of the code do not support PWscf versions later than 3.2.3, so be sure to use the latest tarball.

There is also an indirect method for converting from PWscf, explained here. However, this approach is obsolete and should not normally be used.

Running p2y

Although the default bin/p2y executable should work as is, various command line options are supported to help you during the conversion process. These are:

 -h             :Short Help
 -H             :Long Help
 -N             :Skip MPI initialization
 -F opt         :XML index file name
 -O opt         :Output directory
 -S             :DataBases fragmentation
 -a real        :Lattice constants rescaling factor
 -t             :Force use of spatial inversion instead of time reversal
 -w             :Force no wavefunctions
 -g             :Force use of all available planewaves
 -v             :Verbose wfc I/O reporting

Most of these are self explanatory, so just a few comments:

 -F <opt>       :XML index file name

Specify the name of the XML-like index file name. Usually you should not need to set this flag, since the default values are determined when you compile p2y. The default is data-file.xml.

 -S             :DataBases fragmentation

This option will generate subdirectories, by k-point and spin component, inside the SAVE directory. This is recommended for large systems with few k-points.

 -g             :Force use of all available planewaves

If this flag is specified, all G-vectors used to describe the charge will be imported, which is much larger (8 times) than the number needed to describe the wavefunctions. Generally, importing all G-vectors will not be necessary.

 -v             :Verbose wfc I/O reporting

This will force some extra reporting of the progress for reading and writing the wavefunctions, which can be useful to see if the conversion is working immediately.