Skip to content

Instantly share code, notes, and snippets.

@ehermes
Created October 31, 2016 20:13
Show Gist options
  • Save ehermes/6490683d5b82cc619cfc5a17871ae509 to your computer and use it in GitHub Desktop.
Save ehermes/6490683d5b82cc619cfc5a17871ae509 to your computer and use it in GitHub Desktop.
from ase.build.bulk import bulk
from ase.calculators.vasp import Vasp
from ase.io import read
from ase.dft.band_structure import BandStructure
si = bulk('Si', 'diamond', a=5.4)
si.calc = Vasp(kpts=(4, 4, 4), xc='PBE')
si.get_potential_energy()
si.calc.set(icharg=11, # Read charge density from CHGCAR
kpts={'path': 'WLGXWK', 'npoints': 100},
isym=0)
si.get_potential_energy()
bs = BandStructure(read('vasprun.xml'))
bs.plot(emax=5.0, filename='bands_Si.pdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment