Author Topic: custom analyzer script for calculating the band gap of a band structure  (Read 21266 times)

0 Members and 1 Guest are viewing this topic.

Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
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.
« Last Edit: February 25, 2011, 13:56 by Anders Blom »

Offline Abe

  • Regular QuantumATK user
  • **
  • Posts: 10
  • Reputation: 0
    • View Profile
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


Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
Hi Abe,
You must drop the script on the "Analyzer" icon.
According to your error message, you dropped the script on the "Custom" icon ;)

Offline Abe

  • Regular QuantumATK user
  • **
  • Posts: 10
  • Reputation: 0
    • View Profile
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]   



Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
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.
« Last Edit: December 29, 2010, 22:45 by Anders Blom »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
This custom analyzer needs a small update for ATK 11.2.

Offline ramkrishna

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 253
  • Country: us
  • Reputation: 5
    • View Profile
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

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
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 ;)

Offline ramkrishna

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 253
  • Country: us
  • Reputation: 5
    • View Profile
Dear Sir,
   Thank you for your reply . :)

Regards
Ramkrishna

Offline arpit

  • Heavy QuantumATK user
  • ***
  • Posts: 51
  • Country: in
  • Reputation: 0
    • View Profile
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

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
This script should be dropped on the Analyzer, not Custom Builder.