GPAW

What is GPAW?

GPAW is a density-functional theory (DFT) Python code based on the projector-augmented wave (PAW) method. It uses real-space uniform grids and multi-grid methods or atom-centered basis-functions.

Obtaining GPAW

GPAW is an open-source code that can be downloaded at https://wiki.fysik.dtu.dk/gpaw/.

It relies on the following Python libraries:

Plus the standard math libraries:

  • BLAS
  • LAPACK
  • ScaLAPACK

And the HDF5 parallel I/O library.

Building GPAW for Blue Gene/Q

Build instructions for GPAW can be found here:

https://wiki.fysik.dtu.dk/gpaw/install/BGQ/mira.html

Non-developers should use one of the versions of ASE, GPAW, and NumPy, which have been installed under:

   /soft/apps TBD

An example of submission scripts:

   /soft/apps/gpaw-warmups TBD

Performance Notes

All users should read the generic parallel runs section of the GPAW webpage.

https://wiki.fysik.dtu.dk/gpaw/documentation/parallel_runs/parallel_runs.html

The recommended value of the buffer_size keyword is 32,768, but this is likely to change in the near future. The recommended mapping is ETDCBA. GPAW should be run in c16 mode with OMP_NUM_THREADS=4 or c32 mode with OMP_NUM_THREADS=2.

Memory Estimate

A memory estimate should be obtained using a --dry-run=N where N is the desired number of MPI tasks you would like to use for running your calculation. A dry-run can be performed on a single BG/Q node or even your desktop. Note that the method for estimating "Initial overhead" does not work properly on Blue Gene/Q.

Memory estimate
        ---------------
     Calculator          808.23 MiB
       Initial overhead     32.46 MiB
       Density              43.96 MiB
         Arrays                6.62 MiB
         Localized functions  28.78 MiB
         Mixer                 1.46 MiB
         Interpolator          7.10 MiB
     Hamiltonian          30.10 MiB
         Arrays                4.33 MiB
         Restrictor            4.30 MiB
         XC 3D grid            2.04 MiB
         Poisson              17.28 MiB
         vbar                  2.14 MiB
     Wavefunctions       701.71 MiB
         Arrays psit_nG      157.83 MiB
         Eigensolver           1.26 MiB
         Projectors            4.82 MiB
         Overlap op          537.39 MiB
         Kinetic operator      0.42 MiB

NOTE: The calculation must fit in memory.

Frequently Asked Questions

How do I restart a relaxation calculation?

To restart a relaxation calculation, review these two example files:

   /soft/apps/gpaw-warmup/Au_bulk3x3x3_optimize.py TBD
   /soft/apps/gpaw-warmup/Au_bulk3x3x3_optimize_restart.py TBD

Which algorithm should be used to perform structural relaxation on large systems?

The BFGS algorithm relies on explicitly storing the Hessian matrix. The storage requirement for the Hessian plus the resulting eigenvectors is 2*(3N)^2 where N is the number of atoms. For 1000 atoms, this is 138 MB. For systems of this size, the limited memory BFGS should be used.

   https://wiki.fysik.dtu.dk/ase/ase/optimize.html#module-optimize.lbfgs 

What should I do if the structural relaxation algorithm fails on a particular system?

If a system cannot converge quickly (for example, in under 20 steps) to the lowest energy structure, consider using the LineSearch version of BFGS or LBFGS. This can be accomplished by replacing BFGS with BFGSLineSearch or LBFGS with LBFGSLineSearch in the input file.

How does one read in VASP coordinates?

   from ase import read

   material = read('POSCAR')

The first line of the POSCAR file is used as a label in VASP. In contrast, it is very important to the ASE VASP coordinate reader. It must contain each element in the order it is specified in the POSCAR. Following is an example:

   C H O Li
   1
   15.0  0.0  0.0
   0.0  15.0  0.0
   0.0  0.0  15.0 
   10 20 30 40
   Select dynamics
   Direct

How can I reduce the amount of debugging information in the Python traceback?

This will produce a Python traceback on one rank. It needs to be placed right after all the main imports.

   import sys
   from gpaw.mpi import world
   from ase.utils import devnull
   if world.rank != 0:
   sys.stderr = devnull

What should I do if the SCF cycle fails to converge?

The most common reason for a system not converging is mixer settings. Try conservative mixer settings:

 mixer = Mixer(0.10, 5, 100.0), 

For suggestions, see https://wiki.fysik.dtu.dk/gpaw/documentation/convergence/convergence.html.