QuantumATK Forum

QuantumATK => Scripts, Tutorials and Applications => Topic started by: kstokbro on December 22, 2010, 14:12

Title: custom analyzer script for calculating the band gap of a band structure
Post by: kstokbro on December 22, 2010, 14:12
I attach a custom analyzer for calculating the band gap of a band structure

Drop the script bandstructure_analyzer.py on the custom analyzer tool

You can generate some data with the file graphene.py

drop the file graphene.nc in the drop zone and get the attached plot,

Have fun,
 ;D

NOTE: The version of the script attached to this post works for ATK 10.8. For ATK 11.2, see post below (http://quantumwise.com/forum/index.php?topic=918.msg5114#msg5114).
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: Abe on December 23, 2010, 10:51
i tried the same way to get Bandgap but i got error like this

Traceback (most recent call last):
  File ".\zipdir\NL\GUI\Core\Runner.py", line 230, in run
  File ".\zipdir\NL\NanoLanguage\Builder.py", line 47, in dummyConfigurationGenerator
NL.ComputerScienceUtilities.Exceptions.NLError: No configurationGenerator defined. Use the method 'setConfigurationGenerator()'
to set a configurationGenerator

Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: kstokbro on December 23, 2010, 11:15
Hi Abe,
You must drop the script on the "Analyzer" icon.
According to your error message, you dropped the script on the "Custom" icon ;)
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: Abe on December 23, 2010, 11:52
Thanks for your reply sir,
                              I got the bandgap value in the bottom of the window.but i didnt get the graph.


Analyzing bandstructure number  0 NL.ComputerScienceUtilities.NLFlag.Up
Valence band maximum    -0.0705 eV at [0.0000, 0.0000,0.0000]   
Conduction band minimum  0.0705 eV at [0.0000, 0.0000,0.0000]   
Band gap                 0.1411 eV

Direct Band gap          0.1411 eV at [0.0000, 0.0000,0.0000]   


Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: kstokbro on December 29, 2010, 21:27
This is because you only have one point on the bandstructure in the netcdf file, thus there is only one point on your graph and this cannot be displayed.
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: Anders Blom on February 25, 2011, 13:55
This custom analyzer needs a small update for ATK 11.2.
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: ramkrishna on March 15, 2011, 09:17
Dear Sir,
    When I am running this script by the above procedure for that given files , I  am getting the following error.


Traceback (most recent call last):
  File "./zipdir/NL/GUI/Core/Runner.py", line 230, in run
  File "<string>", line 129, in analyzer
AttributeError: 'Bandstructure' object has no attribute 'spins'

Can you please clarify this error and please tell me how to overcome this problem??

Thanking you,
Ramkrishna
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: Anders Blom on March 15, 2011, 09:51
If you are using ATK 11.2, then you need the updated version of the script which you can download from the post just before yours ;)
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: ramkrishna on March 15, 2011, 12:24
Dear Sir,
   Thank you for your reply . :)

Regards
Ramkrishna
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: arpit on April 4, 2011, 09:58
sir when i am using this sc ript i am fetting the following error...


NL.ComputerScienceUtilities.Exceptions.NLError: No configurationGenerator defined. Use the method 'setConfigurationGenerator()'
to set a configurationGenerator
Title: Re: custom analyzer script for calculating the band gap of a band structure
Post by: Anders Blom on April 4, 2011, 10:18
This script should be dropped on the Analyzer, not Custom Builder.