NSCF calculation

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
hzakaryan
Newbie
Newbie
Posts: 3
Joined: Thu Jul 16, 2020 1:08 pm

NSCF calculation

#1 Post by hzakaryan » Tue May 18, 2021 10:05 am

Dear admin and VASP users,

I am trying to do nscf calculation with constant charge (ICHARG = 11). For this calculation VASP need charge density and PAW one-center occupancies (augmented occupancies). I have only charge density part, which was predicted by our ML code. So, I have two questions:

1) How can I get augmented occupancies for the given structure and charge density?

2) Is there any way to calculate total energy for the given structure and only charge density ?

henrique_miranda
Global Moderator
Global Moderator
Posts: 234
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: NSCF calculation

#2 Post by henrique_miranda » Wed May 26, 2021 9:17 am

I am not sure I understand your question correctly but I will try to answer.
VASP can do a NSCF calculation starting from a CHGCAR file (with ICHARG=11).
This CHGCAR file contains the charge density + one-center occupancies.
You have a machine-learning code that can predict the charge density for a given structure but you don't have the one-center occupancies.

So to answer your questions:

1) You can start the calculation from a CHGCAR file that does not contain the one-center occupancies by modifying fileio.F:

Code: Select all

WRITE(IU0,*) 'WARNING: PAW occupancies are missing on CHGCAR '
RHOLM=0
!ICHARG=0
!RETURN
This will set the one-center occupancies set to zero when they are not present in the CHGCAR file.
Then you need to tell VASP to read the charge density (ICHARG=1) but to keep it fixed during the SCF loop (IMIX=1 and AMIX=0).
Using these settings, however, there is no mechanism to change the one-center occupancies because AMIX=0 affects both the charge density mixing as well as the one-center occupancy mixing.
It is possible to modify the code to still perform mixing of the PAW one-center occupancies by modifying these lines in mix.F:

Code: Select all

!AMIX_PAW=AMIX
AMIX_PAW=0.4
Note however that we have not tested/designed the code to work like this.
If you do these modifications do them at your own risk and check that the results that you obtain are what you expect.
Make sure you are the only one using such a modified copy since the code might produce unexpected results for other users.

2) In Kohn-Sham theory, the total energy is a functional of the charge density so yes, given the charge density and the structure you can compute the total energy. Notice however that you still need to solve the Kohn-sham system which implies at least doing a NSCF calculation to determine the orbitals.
Furthermore, VASP uses PAW potentials so you need the information contained in those as well.

hzakaryan
Newbie
Newbie
Posts: 3
Joined: Thu Jul 16, 2020 1:08 pm

Re: NSCF calculation

#3 Post by hzakaryan » Wed Jun 09, 2021 7:39 am

Dear Henrique,

Thank You for the detailed answer.
I don't want to modify the code, because, as You mentioned, the code doesn't designed for it.

a) Instead, I have tested the following tags: IBRION = -1, NSW = 0, ICHARG=1, IMIX=1, AMIX=0. In this case VASP start run with CHGCAR, which doesn't include augmented occupancy. But the total energy differ 0.14 eV/atom from SCF calculated total energy. What do You think, can the size of this error variate large from system to system, or not?

b) Is there any way to recalculate augmentation occupancy from AECCAR0 and ACCAR1?

Thank You in advance.
Best regards,
Hayk

henrique_miranda
Global Moderator
Global Moderator
Posts: 234
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: NSCF calculation

#4 Post by henrique_miranda » Wed Jun 09, 2021 11:15 am

Dear Hayk,

a) Without modifying the lines in mix.F you are keeping the augmentation charges fixed during the run.
If you made the first change I mentioned in fileio.F they are set to zero and kept during the calculation.
That likely explains the difference in the total energy that you observe.
When you do an SCF calculation in VASP the augmentation charges are allowed to change.

b) The AECCAR0 and AECCAR1 are built from information in the POTCAR file.
This same information is used to compute the augmentation charges during the SCF procedure in VASP.
The approach I outlined previously is simply a SCF run where the charge density is kept fixed but the augmentation charges are allowed to change.
To compute these augmentation charges you need to solve the Kohn-Sham system self-consistently.
I don't know another way to do it.

Cheers,
Henrique Miranda

Post Reply