ExternalElectricField is not compatible with SlabDipoleCorrection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Siesta |
Fix Released
|
High
|
Nick Papior | ||
4.0 |
Fix Released
|
High
|
Nick Papior |
Bug Description
Introducing an external electric field is not compatible with slab dipole corrections. When the later are activated the electric field is automatically set to 0. However, the dipole corrections are needed to avoid spurious dipole interactions between the repeated images.
I propose a fix that just affects dhscf.F and siesta.tex. The old behavior can always be recovered with SlabDipoleCorre
I consider the current behavior a bug, but they might be reasons to prefer it to the proposed one. In any case now it would be for the user to decide if dipole corrections are included or not. For that reason I also propose a modification in the manual to alert the user of the change.
Siesta version: all. Patch for trunk-518.
Related branches
Changed in siesta: | |
status: | New → Invalid |
Changed in siesta: | |
status: | In Progress → Fix Released |
Having given this some thought. Each term is linearly independent and thus the correct method for applied electric field is actually to always include the slab dipole correction.
As such the bug extends beyond that reported and further changes are needed.