Page 1 of 1
[resolved] WFK file in ASCII
Posted: Wed Jan 11, 2012 6:14 pm
by MPis86
Dear Abinit users.
I used abinit to meke some ground state calculation and I want to obtain the converged wavefunctions, written as expansion_coefficient*plane_wave.
Is there a post processing tool in the abinit package that makes this job?
I suppose that this information are written in the _WFK file in fact
http://www.abinit.org/documentation/hel ... avefctfilehowever I wasn't able to read this file. What I need is a file converter that rewrites the information contained in the wfk file in ASCII or another format readable with a text editor.
Thank you
Re: WFK file in ASCII
Posted: Wed Jan 11, 2012 7:33 pm
by david.waroquiers
Hello,
If you want to have a look at the wavefunction, you can use the cut3d post-processing tool. You can for example visualize the wavefunction for a specific state. You can use cut3d for analyzing densities (_DEN), potentials (_POT), wavefunctions (_WFK), ....
I hope it helps you
David
Re: WFK file in ASCII
Posted: Thu Jan 12, 2012 11:27 am
by MPis86
Thanks for the reply,
In fact cut3d is useful to plot the wave-functions, however what I need is the expansion of the wave-functions in plane waves because I need to calculate other quantities that depend on the one electron wave-functions. In fact what I need is a tool to convert the (I think) binary file _WFK to a file readable with a text editor, then I think that I can do the reading by myself.
Thank you
Re: WFK file in ASCII
Posted: Thu Jan 12, 2012 10:19 pm
by david.waroquiers
Hello,
Well in that case you might have to "hack" a little bit the code. For example you can change the cut3d.F90 routine so that it reads in the wavefunctions (this is already done) and then writes it to a file. I guess it would not be too difficult.
But what are the other quantities you are looking for ? Maybe there is already some tool to do this automatically.
David
Re: WFK file in ASCII
Posted: Fri Jan 13, 2012 1:32 pm
by MPis86
Thanks again David.
In fact modifing the cut3d code is a good idea, nevertheless I solved the problem in a different way.
It is possible to make abinit write everything, including the _WFK file, in the netcdf format. It is done by putting "accesswff 3" in the input file. Only little care has to be taken to the "istwfk" that must be 1 for all the k points. Unfortunately I wasn't able to use my converged densities, because I think that the code needs also netcdf files reading the density (for instance in a non-scf run), probably one can bypass this problem with some tricks.
Anyway, when one has the output file in netcdf format (they should be "something.nc") one can use a converter from the nc-format to text-format. One possibility is given by the "ncdump" script (see
http://www.unidata.ucar.edu/software/ne ... man-1.html ), that is released within the abinit package, by writing (for standard installation)
ncdump your-file.nc > your-file.txt
and it's all over.
Hope it helps other users having the same problem as me.
Regards
Michele