Question about total charge handling in VASP’s DFT-D4 implementation
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!