Skip to content

enh: added a new cumulative distribution function class

Nick R. Papior requested to merge npapior/siesta:master-distribution into master

This class is a combination of 4 different methods, where 1 of these is a new method (the Gaussian method). While the Cauchy method is also added it is not currently allowed since the entropy calculation is not finalized. I simply do not know how to calculate it. I have checked the MP and Cold papers for hints regarding the entropy, to no avail.

The class is built up on a master class holding each implemented distribution function. While it could have made sense to use inheritance it proved too difficult since MP requires the N argument. As inherited methods require the same interface this became a problem and I resorted to this solution.

The usage is split into entropy and occupation functions for making it simpler for end usage.

Moving code fermid.F -> fermid.F90.

All code uses of the fermid code has been updated.

Another possible route with this code is to use the df/dE value to faster get convergence with the Fermi-level. This should be a rather trivial case and actually proves very useful (converging faster by a factor of ~ 7).

For this point see here: https://github.com/zerothi/distribution-test

Play with number of k-points and energy-points in main.f90 (Neig, Nk) and see how they perform.

This separation of occupation and entropy is required in another branch I am developing.

Also note that this way of using the distributions may be utilized for regular distributions (not CDF) for PDOS etc.

  • Document the additional flags for OccupationMethod.Optical
  • Document the Gaussian distribution

Merge request reports