| 1 |
from ase import Atoms |
| 2 |
from gpaw import GPAW, FermiDirac, Mixer |
| 3 |
from gpaw import PW |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
pwcutoff = 450.0 |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
L = 8.0 |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
isolated_silicon = Atoms( |
| 19 |
symbols=['Si'], |
| 20 |
positions=[[0.5 * L, 0.5 * L, 0.5 * L]], |
| 21 |
cell=[L + 0.1, L, L - 0.1], |
| 22 |
pbc=(1, 1, 1)) |
| 23 |
|
| 24 |
isolated_calc = GPAW( |
| 25 |
mode=PW(pwcutoff, force_complex_dtype=True), |
| 26 |
parallel={'domain': 1}, |
| 27 |
xc='PBE', |
| 28 |
txt='si_isolated_rpa.init_pbe.txt', |
| 29 |
occupations=FermiDirac(0.01), |
| 30 |
spinpol=True, |
| 31 |
hund=True, |
| 32 |
|
| 33 |
mixer=Mixer(beta=0.05, nmaxold=5, weight=50.0)) |
| 34 |
|
| 35 |
isolated_silicon.calc = isolated_calc |
| 36 |
|
| 37 |
isolated_silicon.get_potential_energy() |
| 38 |
isolated_calc.diagonalize_full_hamiltonian() |
| 39 |
isolated_calc.write('si.rpa.isolated.gpw', mode='all') |