[gpaw-users] Request for Assistance with Band Structure of H₂ Using GPAW
Mikael Kuisma
kuisma at dtu.dk
Tue Aug 20 15:21:33 CEST 2024
Hi!
In the first part, where you plot the DOS, you have already plotted the closest thing that a molecule has to a band structure: density of states. Whatever you try to do next is ill-defined, as molecules are localized particles, thus non-periodic, and thus do not have any band structure. If you were to calculate the band structure of a molecule in a large enough cell, you would get that each band is completely flat, and it would anyway reduce to all of the information available in the density of states plot.
I suggest to read basics of band structure theory, and then start from the GPAW tutorial:
https://wiki.fysik.dtu.dk/gpaw/tutorialsexercises/electronic/band_structure/bands.html
https://wiki.fysik.dtu.dk/gpaw/tutorialsexercises/electronic/bandstructures/bandstructures.html#bandstructures
BR.
Mikael
________________________________
From: DAMEGARIN SAMBIANI <sambianidamegarin at gmail.com>
Sent: Tuesday, August 20, 2024 11:02 AM
To: Mikael Kuisma <kuisma at dtu.dk>
Subject: Request for Assistance with Band Structure of H₂ Using GPAW
Dear GPAW Developers,
I am writing to request your assistance in plotting the band structure of the H₂ molecule using GPAW. Despite my efforts, I am still facing difficulties in obtaining a correct plot of the band structure.
Attached, you will find the code I used for this simulation. I would greatly appreciate any guidance you can provide to help resolve this issue.
Thank you in advance for your assistance and expertise.
from ase.build import molecule
from gpaw import GPAW, PW, FermiDirac
import matplotlib.pyplot as plt
# Créez la molécule H2
h2 = molecule('H2')
h2.center(vacuum=3.0)
# Calcul de l'état fondamental
calc = GPAW(mode=PW(200),
xc='PBE',
kpts=(1, 1, 1),
random=True,
occupations=FermiDirac(0.01),
txt='H2_gs.txt')
h2.calc = calc
h2.get_potential_energy()
ef = calc.get_fermi_level()
print(ef)
calc.write('H2_gs.gpw')
e, dos = calc.get_dos()
plt.plot(e, dos)
plt.ylabel('DOS')
plt.show()
# Bande
from ase import Atoms
from ase.build import molecule
from ase.visualize import view
from gpaw import GPAW
from ase.dft.kpoints import bandpath
import matplotlib.pyplot as plt
from gpaw.spinorbit import soc_eigenstates
calc = GPAW('H2_gs.gpw').fixed_density(
nbands=158,
symmetry='off',
kpts={'path': 'GX', 'npoints': 60},
convergence={'bands': 8})
bs = calc.band_structure()
bs.plot(filename='bandH2.png', show=True, emax=10.0)
Sincerely,
SAMBIANI
PhD student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20240820/7442d19a/attachment.htm>
More information about the gpaw-users
mailing list