Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Running a GPAW Calculation with GPU libxc Functionals

  • in GPAW there are two ways one can specify a libxc functional, the method shown here with the "+" symbol, or by adding a simpler "short_name" to the top of gpaw/xc/libxc.py.
  • generate the setup for the GPU functional you are interested in (search for _GPU in xc_funcs.h in libxc for list of currently ported functionals). For example:
    Code Block
    gpaw-setup -f GGA_X_RPBE_GPU+GGA_C_PBE_GPU H
  • add path to the above generated setup to GPAW_SETUP_PATH environment variable
  • run the script specifying the GPU functional, for . For example:
    Code Block
    #!/usr/bin/env python
    
    from ase import *
    from gpaw import GPAW
    
    a = 5.0
    H = Atoms([Atom('H',(a/2, a/2, a/2), magmom=1)],
                    pbc=False,
                    cell=(a, a, a))
    
    H.set_calculator(GPAW(nbands=1, h=0.2, convergence={'eigenstates': 1e-3},txt='H.txt',
                     xc='GGA_X_RPBE_GPU+GGA_C_PBE_GPU'))
    e = H.get_potential_energy()
    

...