QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: donmbringer on August 6, 2012, 21:19

Title: About the range of band structure
Post by: donmbringer on August 6, 2012, 21:19
Hi, May I ask, how to adjust the range of the window of band structure to less than 10 eV. Currently, I can only use the "zoom in", but it is very hard to keep the same range each time. If there any way in which the window can exactly show the range, for example, -2 eV~ 2eV?
Title: Re: About the range of band structure
Post by: donmbringer on August 6, 2012, 21:21
Sorry, one more question about this. Is there any method to measure or show how much the bandgap is from the figure directly by software itself.?
Title: Re: About the range of band structure
Post by: Anders Blom on August 13, 2012, 00:04
If you know already at which k-point the band gap is, and esp. if it's direct, then it's fairly easy. For instance, assuming it's direct at the Gamma point, you can do

Code: python
import sys
b = nlread(sys.argv[1], BulkConfiguration)[0]
t = Bandstructure(b, route=['G','G'], points_per_segment=2)
vbmax_ix = numpy.where(t.evaluate()[0]<=0.*eV)[0][-1]
cbmin_ix = numpy.where(t.evaluate()[0]>=0.*eV)[0][0]
bandgap = t.evaluate()[0][cbmin_ix]-t.evaluate()[0][vbmax_ix]
print "Direct band gap at Gamma point", bandgap

Save this as  "bandgap.py", then run as "atkpython bandgap.py file.nc" where file.nc contains the converged BulkConfiguration.