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
[resolved] WFK file in ASCII
Moderators: MMNSchmitt, gonze
-
- Posts: 138
- Joined: Sat Aug 15, 2009 12:45 am
Re: WFK file in ASCII
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
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
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
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
-
- Posts: 138
- Joined: Sat Aug 15, 2009 12:45 am
Re: WFK file in ASCII
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
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
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
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