Debian Codegraph @

doc/tutorialsexercises/energetics/rpa_ex/atom/si.atom.rpa_init_pbe.py

raw symbols SCIP
1 from ase import Atoms
2 from gpaw import GPAW, FermiDirac, Mixer
3 from gpaw import PW
4
5 # This calculation is too heavy to run as an exercise!!
6
7 # Plane wave cutoff
8 pwcutoff = 450.0
9
10
11 # box length for isolated atom
12 L = 8.0
13
14
15 # Do the isolated calculation
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), # fixmagmom=True),
30 spinpol=True,
31 hund=True,
32 # convergence={'density': 1.e-6},
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() # ouch
39 isolated_calc.write('si.rpa.isolated.gpw', mode='all')