Skip to content

Added "bands" to the convergence criteria output section

Terence Tsang requested to merge TTsangSC/gpaw:issue-901 into master

(Addresses #901.)

This adds output about the selection of bands in determining convergence back to the Convergence criteria: section of the output – which is where end-users would expect to find that, given that it is supplied along with other criteria in the convergence parameter. This is done via the gpaw.convergence_criteria.Bands class.

The display of convergence['bands'] towards the tail-end of the initialization output is however retained since bands is inherently treated differently from the other convergence criteria within the SCF-cycle logic of GPAW. As I've mentioned in the discussion below the issue, maybe more per-band convergence criteria can be introduced in the future, but that will IMO be a task for another day.

Before

Convergence criteria:
 Maximum [total energy] change in last 3 cyles: 1e-08 eV / valence electron
 Maximum integral of absolute [dens]ity change: 0.0001 electrons / valence electron
 Maximum integral of absolute [eigenst]ate change: 4e-08 eV^2 / valence electron
 Maximum number of scf [iter]ations: 333
 (Square brackets indicate name in SCF output, whereas a 'c' in
 the SCF output indicates the quantity has converged.)

After

Convergence criteria:
 Maximum [total energy] change in last 3 cyles: 1e-08 eV / valence electron
 Maximum integral of absolute [dens]ity change: 0.0001 electrons / valence electron
 Maximum integral of absolute [eigenst]ate change: 4e-08 eV^2 / valence electron
 Number of [bands] to consider in convergence: 100
 Maximum number of scf [iter]ations: 333
 (Square brackets indicate name in SCF output, whereas a 'c' in
 the SCF output indicates the quantity has converged.)

Code

  • gpaw.convergence_criteria.Bands
    New Criterion subclass
  • gpaw.test.test_scf_criteria.test_scf_criterion()
    Now including convergence={'bands': ...} in the test
  • doc/documentation/custom_convergence.rst
    Added references to the Bands criterion class

Merge request reports