[Pw_forum] how to print G+k vectors file in ASCII format
Johari, Priya
Priya_Johari at brown.edu
Tue Feb 9 18:44:57 CET 2010
Thanks Andrea, it indeed proved very helpful for me to know this direct command to convert .dat files to .xml files.
Previously, I had made BINARY = .FALSE. in ~espresso/PP/qexml.f90 file and thats how I could generate evc.dat, gvectors.dat
and charge-density.dat files in ASCII format, but don't know why gkvectors was staying in binary format only.
Thanks again.
PJ.
-----Original Message-----
From: pw_forum-bounces at pwscf.org on behalf of Andrea Ferretti
Sent: Tue 2/9/2010 6:27 AM
To: PWSCF Forum
Subject: Re: [Pw_forum] how to print G+k vectors file in ASCII format
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
_______________________________________________
Pw_forum mailing list
Pw_forum at pwscf.org
http://www.democritos.it/mailman/listinfo/pw_forum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4209 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20100209/a6114d86/attachment.bin>
More information about the users
mailing list