Author Topic: Script for calculate the bandgap.  (Read 62793 times)

0 Members and 1 Guest are viewing this topic.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Script for calculate the bandgap.
« Reply #30 on: February 26, 2012, 22:10 »
... since transmission calcs take a whole day to complete, i need to speed up the time by selecting the bias window properly ..

Do you mean the self consistent calculation or the transmission calculation?

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #31 on: February 26, 2012, 22:12 »
but the bandgap can only be found if it is not heavily doped right?  in other words, if i have a n+ or p+ region where Ef is above Ec or below Ev ... then the scripts that have been posted do not work (they cannot find the bandgap) ... unless i am mistaken but i tried and it did not work

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Script for calculate the bandgap.
« Reply #32 on: February 27, 2012, 01:36 »
Hey.

Sorry for the many counter questions, but I am not certain that what you desire exactly. If it was a semi-conductor you were talking about, everything
would be clear. Your electrode is p/n node semi-conductor to such a degree it becomes metallic, and therefore there is no band gap.
The definition of the valence band and conducting band in metals is not set in stone when it comes to metals.

One definition of the conducting band could be the lowest lying band that is completely free for electrons around the entire Brillouin zone, and the energy would E_c would then be the lowest energy point for this band. However by this definition the band crossing the fermi level will not be labeled the conduction band.

The same goes for the valence band, likewise the band crossing the fermi level will not be label the valence band. E_v would the be the highest energy for this band.

If you want to go with the usual definition of valence/conduction bands from semi-conductors, then you know the answer straight away E_g = 0, E_v = E_c = E_f



Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #33 on: February 27, 2012, 01:55 »
well maybe i am not explaining well enough, or maybe i am not accurate in what i am saying, but maybe a picture will help ...

attached is a picture i posted in another post .. it is a p+-i-n+ tfet type design ... as you can see in the source and drain, the fermi level is above Ec or below Ev ... i need to know the gap, Ec and Ev .. given this information, i can set bias appropriately .. does that make sense? 

the scripts for bandgap posted here cannot find this gap and i dont believe they give the Ec and Ev levels ... I understand what you are saying, but just because it is heavily doped doesnt mean Ec and Ev don't exist does it?  they are just shifted by the doping


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Script for calculate the bandgap.
« Reply #34 on: February 27, 2012, 12:52 »
To some extent this is a semantic issue. Actually Ec and Ev do not exist in the heavily doped case, if by Ec we mean the lowest occupied state which is separated from another available state by a gap in energy, and opposite for Ev. But you come from a more pragmatic viewpoint and you say you know what the original Ec and Ev are before the doping, so you want to track these particular states as doping is introduced. My suggestion would be to figure out the quantum labels of these states, which simply means the band index of the Ec and Ev states (at a particular k-point). This is actually trivial, since you will have as many levels under the Fermi level as electrons in the system / 2 (for spin). This quantum number is not likely to change when doping is introduced, so you can ask for the energy of this same band index in the doped structure.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #35 on: February 27, 2012, 19:55 »
Ok, and is there a way to find out how the bandstructure object is constructed and how to get to that information?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Script for calculate the bandgap.
« Reply #36 on: February 27, 2012, 20:46 »
In general in Python you can find out a lot of information about objects by using "dir". For example,
Code: python
dir(Bandstructure)
in Python produces a list of all methods and properties on the object. Then, if you want more information on a method, you can type e.g.
Code: python
help Bandstructure.evaluate
The best way to explore these things is by using ATK interactively, i.e. just start "atkpython" from the command line (without any script argument), then you can type Python commands manually, like those above, or any other ones that would normally appear in a script. It's a great way to develop a new script, to prototype something. This also allow you to do the "dir" thing above in a cool way: if you type something like
Code: python
config = nlread("file.nc",BulkConfiguration)[0]
config.
Note where this stops - with a ".". Now, hit the TAB key - and you will see all possible things you can continue this statement with. And it will autocomplete them, if you start typing "e" and hit TAB, you see only two choices: "elements" and "externalPotential". Saves a lot of typing! Now, the information contained in this is actually given in the Reference Manual as well, there is no difference, except that with "dir" you also see "hidden" or "private" functionality, methods and properties that the object has, but which we haven't made public yet. These can be utilized for many things, just don't trust them to work 100% the same way in future versions on ATK. It can also be faster to look things up interactively than browse the html manual.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Script for calculate the bandgap.
« Reply #37 on: February 27, 2012, 20:54 »
More specifically, about the band structure, if you use "evaluate", it returns a matrix of all the energies, with Npoints rows and Nbands columns, where Npoints is how many points are on the route (20 per segment, by default) and Nbands is the total number of bands. So, after
Code: python
b = nlread('silver.nc', BulkConfiguration)[0]
bs  = Bandstructure(b, route=['G','X'])
E = bs.evaluate()
we could use E[0] to get all band energies at the Gamma point, and E[20] for those at the X point. If, instead, we want all energies for the 4th lowest band, as a function of k, we would use E[:,3] for the energies, and bs.kpoints() for the k-points. Note that in this case there are 21 k-points; this is because there are 20 per segment + the final end-point.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #38 on: February 27, 2012, 21:14 »
thank you very helpful i will try it

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #39 on: July 29, 2012, 09:23 »
I came back to this to try what you suggested ... i am not understanding it at all ... what i mean is, the values read dont seem to match the picture, or i can not reading it correctly ... attached is a zoomed out image of bands .. now there is some more complex thing i want to do, but let me explain the issue with a simple calculation:
Code
objid = "bulkUndoped"
bandstructures = nlread('file_bands.nc', Bandstructure, object_id=objid+"bands")
E = bandstructures[0].evaluate() 
numPts = len(E)
numBands = len(E[0])
Now, I set the variables above numPts and numBands as above, because when I ran len(E) I got 22, and len(E[0]) i got 184, which seems to mean that the first index is the point index, and the 2nd is the band index ... is this correct? Now the question is then, if that is true, then why dont't the values from E[0][0] to E[21][0] match the first band? I dont understand it ... What I want to do is index each value on the band in order, how can I do that please?

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: Script for calculate the bandgap.
« Reply #40 on: July 29, 2012, 09:55 »
Nevermind ... that works perfectly well .. i was looking at the wrong objid

thank you

Offline yogita

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: Script for calculate the bandgap.
« Reply #41 on: January 20, 2013, 12:53 »
hi Nordland,

i am very new in ATK, using 11.8.2,
want to calculate bandgap of Cu2o, but got the following error message,
can u help me to know about module..... and some more details in script to analyse the bandstructure...


thanks



Traceback (most recent call last):
  File "c:\users\skf1f5~1.sha\appdata\local\temp\6465418687460360.py", line 20, in <module>
    from ATK.KohnSham import *; import numpy
ImportError: No module named ATK.KohnSham
+-------------------------------------------------

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Script for calculate the bandgap.
« Reply #42 on: January 20, 2013, 21:51 »
This is a very old thread, but if you had read all posts you would find the reason - and the solution. The script posted originally was for ATK 2008.10, but a new one can be found in http://quantumwise.com/forum/index.php?topic=1013.0 (the second post). It's an Analyzer, you should drop the script on the Analyzer icon.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Script for calculate the bandgap.
« Reply #43 on: January 21, 2013, 10:53 »
And therefore I lock it to prevent it getting resurrected from time to time.