PAW. build core density and valence electron density files

Dear friends, Who can tell me how to build core density and valence electron density files? Under PAW. I want to get the bulk full charge density (valence+core), for use the ‘prtden=3’.

Not sure I understand your question. You don’t need the core and valence densities in order to use prtden 3, rather, running a calculation with prtden 3 will give you the full valence+core density.

Dear jzwanzig:
First of all, thank you for your reply. I use paw pseudopotential, and abinit requires core and valence charge density, when prtden=3 is used. you can see ‘prtden’ in Abinit wed.

Oh, yes, I see the problem, I’m sorry I misunderstood the question originally. I am not immediately sure of the solution. I will dig around and get back to you.

OK, it seems to me that the information you need is contained in a file called “density”, that is generated when the PAW dataset is created by atompaw. Atompaw is a free and open source code that can be used to make PAW datasets for abinit, see the PAW2 tutorial in the abinit PAW tutorials. The PAW datasets we distribute on the pseudo-dojo site also include the input files used to make them. So what you do is, install atompaw on your machine; download from pseudo-dojo the files for the element you want; run the input file through atompaw; and you will have created among other things a file called “density”. This is just an ascii file, with columns of “r”, “core density”, etc out of which you can extract what you want and save to files as needed. It sounds complicated but it’s really not.

Dear jzwanzig:
I’m glad to see your message. Thank you for your detailed reply and guide me how to obtain the required core density and price density.As you said, I installed ‘atompaw’ and obtained the file named ‘density’, and took the core density and valence density respectively according to the columns shown. But abinit still reported an error, saying that the density file I provided was wrong.I attach my input file and obtained density file, please review the following. Thank you again for your detailed reply.
density.txt (275.6 KB)
C_simple.input.txt (1.3 KB)

Hi, I just used your atompaw input and ran the output on diamond, with prtden 3, and it’s working fine. I think what you might be missing is that abinit does not want your density file, it needs you to create the core and valence density files from it–I did the following:
awk ‘{print $1,$2}’ density.txt > core_density_atom_type1.dat
awk ‘{print $1,$3}’ density.txt > valence_density_atom_type1.dat
to make the two necessary files. Abinit worked fine then with prtden 3 and created the file like it’s supposed to. I’d agree that this is a very klunky interface to this feature, but it’s not a feature in high demand so the developers haven’t been working on it.

Dear jzwanzig:
Thank you very much! Thank you for your guidance, I learned a lot of knowledge. I hope I can quote your paper to thank you for all you have done.But it seems that the file you uploaded cannot be downloaded.

I didn’t upload any files–I just gave you the awk commands you would need to use to extract the correct files from the density file–

Dear jzwanzig:
Thank you very much and wish you good health and success. I have successfully made everything I need. my friend.

Great! Best wishes going forward–