Question about total charge handling in VASP’s DFT-D4 implementation

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
User avatar
simon_cao
Newbie
Newbie
Posts: 4
Joined: Tue Aug 27, 2024 7:02 am

Question about total charge handling in VASP’s DFT-D4 implementation

#1 Post by simon_cao » Fri Aug 21, 2026 8:05 am

Hi VASP developers,

I would like to clarify how VASP interfaces with DFT-D4 for charged calculations.

From what I can tell, it seems that the net charge associated with changing NELECT may not be communicated by VASP to the DFT-D4 library. My impression is based on two observations:

1. From inspecting subdft_sd3_d4.F, it appears that the VASP–DFT-D4 interface does not explicitly provide the total system charge when constructing the DFT-D4 calculation.
2. I also tested this numerically using a fixed geometry while changing NELECT. The DFT-D4 contribution appeared unchanged when the total number of electrons was varied.

My understanding is that DFT-D4 itself is capable of using a total-charge constraint in its EEQ charge model. Therefore, my question is specifically about the implementation choice in the VASP interface: does VASP currently pass the net charge implied by NELECT to DFT-D4?

If not, could you please clarify whether this is intentional? In particular, is there a physical or technical reason related to charged periodic calculations in VASP that makes the NELECT-derived charge inappropriate to pass to DFT-D4? Alternatively, is the propagation of the total charge simply not implemented in the current VASP–DFT-D4 interface?

Thank you for your help!

Purun (Simon) Cao
PhD Student, Electrical & Computer Engineering
University of Washington


pedro_melo
Global Moderator
Global Moderator
Posts: 221
Joined: Thu Nov 03, 2022 1:03 pm

Re: Question about total charge handling in VASP’s DFT-D4 implementation

#2 Post by pedro_melo » Mon Aug 24, 2026 11:57 am

Dear simon_cao,

Your observation is correct. The net charge defined by NELECT is not passed through the VASP-DFT-D4 interface. This is not a design decision, just a feature that is not currently implemented.

Note that for periodic systems VASP adds an homogeneous background charge that compensates the charge added by NELECT, so a neutral cell is formally correct.

Kind regards,
Pedro


Post Reply