PWscf to yambo interface (p2y): indirect approach
This approach makes use of the pw_export.x executable,
and the low-level IOTK library routines of Giovanni Bussi, both part
of the standard Quantum-ESPRESSO distribution.
Step 1: Configuring p2y
- Make sure you have access to the library $ESPRESSO/iotk/src/libiotk.a in
your Quantum-ESPRESSO distribution. You may have to create it with make libiotk.
- Configure p2y, specifying BOTH the location of the iotk directory as well as
the export option:
./configure --with-iotk='$ESPRESSO/3.2/iotk' --with-p2y=export
We strongly recommend that you install and link
with a netCDF library.
--with-netcdf='/usr/local/'
- Check that configure found the links properly. You should see:
# [X] PW (export) support
# [X ] NETCDF/Large Files
- Make the p2y executable in $yambo/bin:
make interfaces
Step 2: Create the unformatted pw.x datafiles.
- Perform a self consistent run with PWscf (pw.x) in the usual manner.
- Perform a non-self-consistent calculation with pw.x (bands or nscf),
making sure to
- include many unoccupied bands,
- converge well the unoccupied states,
- generate a set of k-points that spans the full (or half) BZ, according to the symmetries
For example:
&control
calculation = 'bands'
/
&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
- You should now have various .save/.pot/.rho/.wfc files.
Step 3: Export data from PWscf into XML-like format
- In your Quantum-ESPRESSO distribution, make sure that the
executable pw_export.x has been compiled (make pw_export).
- Make an input file for pw_export.x, e.g.:
heaven % cat export.in
&inputpp
prefix='cheese-out'
outdir='./',
single_file=.false.,
ascii = .false.
pseudo_dir = '/home/cdhogan/Research/PSEUDO/UPF',
psfile(1)='H.pz-bhs.UPF'
psfile(2)='S.pz-bhs.UPF'
/
- Run the pw_export.x code in the directory containing the
.save/.pot/.rho file:
./pw_export.x < export.in > export.out
- There should now be a (e.g.) cheese-out.export
directory containing the index.xml/grid.*/wfc.* files.
Step 4: Convert data to the yambo format with p2y
- Enter the [prefix].export directory, and run p2y
with the required options, e.g.
cd cheese-out.export
$yambo/bin/p2y -S -N
- 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
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
- All ok? Well done: you are now ready to try the full yambo experience!
Still having problems? Try:
- Tips and troubleshooting advice.