| 1 |
from ase.io import read |
| 2 |
from gpaw import GPAW, FermiDirac, Mixer, PoissonSolver |
| 3 |
from gpaw.poisson_moment import MomentCorrectionPoissonSolver |
| 4 |
|
| 5 |
# Read the structure from the xyz file |
| 6 |
atoms = read('Ag55.xyz') |
| 7 |
atoms.center(vacuum=6.0) |
| 8 |
|
| 9 |
# Increase the accuracy of density for ground state |
| 10 |
convergence = {'density': 1e-12} |
| 11 |
|
| 12 |
# Use occupation smearing, weak mixer and GLLB weight smearing |
| 13 |
# to facilitate convergence |
| 14 |
occupations = FermiDirac(25e-3) |
| 15 |
mixer = Mixer(0.02, 5, 1.0) |
| 16 |
xc = 'GLLBSC:width=0.002' |
| 17 |
|
| 18 |
# Parallelzation settings |
| 19 |
parallel = {'sl_auto': True, 'domain': 2, 'augment_grids': True} |
| 20 |
|
| 21 |
# Apply multipole corrections for monopole and dipoles |
| 22 |
poissonsolver = MomentCorrectionPoissonSolver(poissonsolver=PoissonSolver(), |
| 23 |
moment_corrections=1 + 3) |
| 24 |
|
| 25 |
# Ground-state calculation |
| 26 |
calc = GPAW(mode='lcao', xc=xc, h=0.3, nbands=360, |
| 27 |
setups={'Ag': '11'}, |
| 28 |
basis={'Ag': 'pvalence.dz', 'default': 'dzp'}, |
| 29 |
convergence=convergence, poissonsolver=poissonsolver, |
| 30 |
occupations=occupations, mixer=mixer, parallel=parallel, |
| 31 |
maxiter=1000, |
| 32 |
txt='gs.out', |
| 33 |
symmetry={'point_group': False}) |
| 34 |
atoms.calc = calc |
| 35 |
atoms.get_potential_energy() |
| 36 |
calc.write('gs.gpw', mode='all') |