[gpaw-users] questions about the metallic electrode in the poissonsolver
Geng Sun
sungengdft at outlook.com
Thu Aug 15 11:10:46 CEST 2024
Dear GPAW users,
I would like to calculate the adsorption energies of small molecules on charged metallic slab.
I read that there is a metallic electrode method in GPAW. It seems to be useful to setup a charged slab with 2D periodicity.
I carried out a test calculation using Ru(0001) surface with one addtional electron, comparing the obtained electron density of the charged system and the neutral one. However, I found that the addtional electrron is located on the vacuum region at the top of the simulation box. I do not understand the results, I expected the electrons located around the Ru atoms.
I attached the script and the charge difference plot in the email. Is there any thing wrong in the calculation or is this a bug in the GPAW?
Thank you very much in advance.
Best
Geng
from gpaw import GPAW, restart
from ase.build import hcp0001
from gpaw.poisson import PoissonSolver
import numpy as np
from ase.units import Bohr
from ase.io import read, write
for charge in [0.0, -1.0]:
slab=hcp0001('Ru',size=(1,1,4), vacuum=10.0)
slab.set_pbc([True,True,False])
if charge < -0.05:
slab.calc = GPAW(
mode='fd',
xc='PBE', h=0.2,
txt='charged.txt',
charge=charge,
kpts=(12, 12, 1),
poissonsolver=PoissonSolver(metallic_electrodes='single'))
else:
slab.calc = GPAW(
mode='fd',
xc='PBE', h=0.2,
txt='netural.txt',
charge=charge,
kpts=(12, 12, 1))
slab.get_potential_energy()
rho = slab.calc.get_all_electron_density(gridrefinement=4)
write('q{:0.1f}.cube'.format(charge), slab, data=rho * Bohr**3)
# slab.calc.write("optimized.gpw")
[cid:a6d5b0be-7af2-4af6-9899-3ad29b4a80ba]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20240815/2b10ff60/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metallic_electrode.png
Type: image/png
Size: 41898 bytes
Desc: metallic_electrode.png
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20240815/2b10ff60/attachment-0001.png>
More information about the gpaw-users
mailing list