from ase.build import bulk from gpaw import GPAW si = bulk('Si', 'diamond', a=5.4) si.calc = GPAW(mode='pw', kpts=(4, 4, 4)) si.get_potential_energy() si.calc.set(fixdensity=True, kpts={'path': 'WLGXWK', 'npoints': 100}, symmetry='off') si.get_potential_energy() bs = si.calc.band_structure() bs.plot(emax=5.0, filename='bands.pdf')