doc/tutorialsexercises/opticalresponse/tddft/lcaotddft_Na8/ksd_init.py
raw| 1 | from gpaw import GPAW |
| 2 | from gpaw.lcaotddft.ksdecomposition import KohnShamDecomposition |
| 3 | |
| 4 | # Calculate ground state with full unoccupied space |
| 5 | calc = GPAW('gs.gpw', txt=None).fixed_density(nbands='nao', txt='unocc.out') |
| 6 | calc.write('unocc.gpw', mode='all') |
| 7 | |
| 8 | # Construct KS electron-hole basis |
| 9 | ksd = KohnShamDecomposition(calc) |
| 10 | ksd.initialize(calc) |
| 11 | ksd.write('ksd.ulm') |