File: libvdwxc-pfft-example.py

package info (click to toggle)
gpaw 21.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,492 kB
  • sloc: python: 121,997; ansic: 14,138; sh: 1,125; csh: 139; makefile: 43
file content (12 lines) | stat: -rw-r--r-- 360 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
from ase.build import bulk
from gpaw import GPAW, PW
from gpaw.xc.libvdwxc import vdw_df_cx

# "Large" system:
atoms = bulk('Cu').repeat((2, 2, 2))
calc = GPAW(mode=PW(600),
            kpts=(4, 4, 4),
            xc=vdw_df_cx(mode='pfft', pfft_grid=(2, 2)),
            parallel=dict(kpt=4, augment_grids=True))
atoms.calc = calc
atoms.get_potential_energy()