Improve averaging system

From QWalkWiki

Jump to: navigation, search

The current averaging system is not terribly extensible. It currently uses a hierarchy of objects, each of which needs to be modified to add a new averaging variable. They are laid out as follows:

  • Properties_point: The lowest on the totem pole, contains the quantities of interest for a given point
  • Properties_block: Middle object, holds the averages over one averaging block
  • Properties_average: Transforms the blocks into a total average with error bars

Currently, all the quantities are hard-coded into these objects, which requires us to change them all and make sure that they're all correct whenever we add a new quantity. It would be useful to implement a pluggable module-based system, which would obviate this need.

Some considerations are in order here:

  • There can be many Properties_point's in memory at once, so they should be as small as possible
  • The properties_block's are written to a file, so the stored data should be relatively compact. Ten doubles are fine; 1000 is too much (so things like the one-particle density should stay as they are).
  • Dmc_method (and Rmc_method ) access the Properties_point energies directly so that they don't have to recalculate them.
  • We shouldn't recalculate things unless we really need to.

There are several things that are implemented as One_particle_densities that could be better implemented as plugins to the Properties architecture. They include

  • S(k) calculation
  • Magnetic moment calculation
Personal tools