RMGDFT / rmgdft

RMG is an Open Source code for electronic structure calculations and modeling of materials and molecules. It is based on density functional theory and uses a real space basis and pseudopotentials.
GNU General Public License v2.0
47 stars 11 forks source link

Store USPP augmentation charges in single precision or compressed format #22

Closed elbriggs closed 4 years ago

elbriggs commented 5 years ago

The augmentation charges (q-functions) used with USPP can use a large amount of memory so a reduced precision or compressed format would be useful. Some initial experiments have shown that storing these in single precision instead of double does not change the total energy to as many significant digits as RMG prints out. Testing on a wider range of pseudopotentials would be needed to confirm that this held true across the periodic table but if true it would be a useful enhancement (particularly since the required code changes are trivial).

elbriggs commented 4 years ago

Single precision q-function testing vs double.

Carbon 60 double precision total energy = -343.83721508 Ha single precision total energy = -343.83721511 Ha

2 atom Mg cell using 18 k-points double precision total energy = -125.31535060 Ha single precision total energy = -125.31535061 Ha

2 atom Fe cell with spin and 35 k-points double precision total energy = -250.35230991 Ha single precision total energy = -250.35230977 Ha

The update (which is only a single line) has been committed to master and while further testing will be done results appear to be more than acceptable.

elbriggs commented 4 years ago

All testing looks good. Closing this out.