Skip to content

Fix DFT+U forces for solids

Nicolas Tancogne-Dejean requested to merge lda_u_geom_opt into main

Description

While working on the DFT+U stress tensor, I realized that the DFT+U forces got broken for periodic systems. Here is a list of changes done in the merge request:

  • Changes the update of Coulomb integrals to ensure that geometry optimization with DFT+U works. A test is added to avoid regression.
  • The GO mode now support ReportMemory.
  • Fixes the torque for isolated systems by removing the center of mass.
  • Do now compute and write the torque for periodic systems, as this is wrong.
  • The DFT+U forces were not symmetrized anymore. This was introduced recently when changing the nonlocal forces and was not propagated to the DFT+U part.
  • The forces were wrongly converted twice to Cartesian coordinates. This is due to a change from individual derivatives to a gradient (in correct coordinates) and it was forgotten to change this because this is not covered by any test at the moment.
  • Adding matches for DFT+U forces in different conditions.

Thanks to @huebener for reporting the problem with the forces.

News snippet

Fix DFT+U forces for periodic systems.

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.

Merge request reports