[resolved] WFK file in ASCII

MULTIBINIT, aTDEP, ANADDB, optics, cut3d, mrg* postprocessors

Moderators: MMNSchmitt, gonze

Locked
MPis86
Posts: 6
Joined: Wed Jan 11, 2012 5:57 pm

[resolved] WFK file in ASCII

Post by MPis86 » Wed Jan 11, 2012 6:14 pm

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 ... avefctfile
however 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

david.waroquiers
Posts: 138
Joined: Sat Aug 15, 2009 12:45 am

Re: WFK file in ASCII

Post by david.waroquiers » Wed Jan 11, 2012 7:33 pm

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

MPis86
Posts: 6
Joined: Wed Jan 11, 2012 5:57 pm

Re: WFK file in ASCII

Post by MPis86 » Thu Jan 12, 2012 11:27 am

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

david.waroquiers
Posts: 138
Joined: Sat Aug 15, 2009 12:45 am

Re: WFK file in ASCII

Post by david.waroquiers » Thu Jan 12, 2012 10:19 pm

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

MPis86
Posts: 6
Joined: Wed Jan 11, 2012 5:57 pm

Re: WFK file in ASCII

Post by MPis86 » Fri Jan 13, 2012 1:32 pm

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

Locked