[Pw_forum] how to print G+k vectors file in ASCII format

Andrea Ferretti ferretti at mit.edu
Tue Feb 9 12:27:33 CET 2010



Hi Priya,

in general you can convert all the .dat files from the $prefix.save
directory (or subdirectories) into xml using the iotk conversion tool
(which is linked in ~espresso/bin )

~espresso/bin/iotk convert  file.dat  file.xml

I think this utility is particularly useful to understand which 
and how are the data stored in the QE save directory.

Then, you can parse the xml file if you like.
My personal suggestion would be to do that only if you need this piece of 
information for a very simple postprocessing code, because parsing xml
from fortran, even if not impossible, is not simple...

Instead, I think the easiest way to go is to use the qexml library
(distributed with QE in ~espresso/PP/qexml.f90) which is exactly meant to 
provide tools to read (and in principles also write) QE datafiles...

The library must be initialized specifying the output directory, prefix, 
and few other informations, and then it directly provides routines to read
all the piece of data you need.
Some examples about how to use it are given in the WanT code
(www.wannier-transport.org); just grep qexml_ in the sources.

hope it helps
Andrea

>
> For some post processing purpose I need to have
> plave wave coefficents and G+k vectors, which get stored e.g. 
> outdir/*.save/K00001/evc.dat and outdir/*.save/K00001/gkvectors.dat. I 
> got success in getting evc.dat file in ASCII format but could get 
> gkvectors.dat file into ASCII. Can someone help by telling how to get 
> 'gkvectors.dat' file into ASCII format, instead of BINARY?
>
> Thanks in advance.
>
> pj
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>

-- 
Andrea Ferretti
Oxford University, Department of Materials
Parks Road, Oxford OX1 3PH, UK
Tel: +44 (0)1865 612796;  Skype: andrea_ferretti
URL: http://quasiamore.mit.edu

Please, if possible, don't send me MS Word or PowerPoint attachments
Why? See:  http://www.gnu.org/philosophy/no-word-attachments.html



More information about the users mailing list