Author Topic: Hexagonal plot of transmission coefficients  (Read 2293 times)

0 Members and 1 Guest are viewing this topic.

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5013
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
Hexagonal plot of transmission coefficients
« on: May 13, 2012, 06:17 »
Normally when you plot the k-point resolved transmission, it becomes a square plot of T vs kA and kB (the actual point K=kA*b1+kB*b2 where b1,2 are the reciprocal lattice vectors), because that is how we sample the Brillouin zone.

In the hexagonal case, it is more illustrative to see the plot in the actual Brillouin zone, i.e. as a function of kx,ky in the hexagon. To make that plot is rather challenging because as it turns out, the Monkhorst-Pack regular grid in kA,kB space actually samples points in the 2nd Brillouin zone, which you then have to map back into the first zone. And, there are some tricks needed in matplotlib to get a hexagonal axis plot. But in the end, you can get the attached picture!

The labels K and M have been added afterwards in an image editing program.

The inspiration for this came from PRB 80, 035408 (2009).
« Last Edit: May 13, 2012, 06:26 by Anders Blom »

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #1 on: April 28, 2020, 04:51 »
Dear Dr. Blom,

Would you like to update this script for the latest version?   It doesn't work for the 2019.12.sp1 version.

Thank you so much.

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5013
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
Re: Hexagonal plot of transmission coefficients
« Reply #2 on: April 29, 2020, 07:21 »
Minor changes, but a bit tricky because of deprecation of matplotlib.mlab.griddata

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #3 on: April 30, 2020, 16:06 »
Thank you Dr. Blom for your new script.

It works now. However, a strange pic is printed, as shown in the attachment named "pic".
It seems that the new script doesn't need the transmission sprectum and only reads the band structure?   

I just got the band of graphene from input.py and the pic from the new script.

The new script seems only to  print the Fermi surface of CBM or VBM (like the Ferm_ surface.py script in the examples https://docs.quantumatk.com/tutorials/topological_insulator_bi2se3/topological_insulator_bi2se3.html)? not the transmission coefficient?
So, 1 ) Would you like to update the script to plot the transission coefficients in the hexgonal?
     2) Would you like to update the script to plot the spin texture  for the newest version 2019.12.sp1?
    3) It's great if you can also update the script for calculating the topological invariants
   
Thank you so much.
« Last Edit: April 30, 2020, 16:48 by Roc2019 »

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5013
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
Re: Hexagonal plot of transmission coefficients
« Reply #4 on: May 5, 2020, 08:29 »
Ok, I didn't notice the original script was for transmission - it is more outdated than the band structure version because nxplot was deprecated already in Matplotlib 1.3. So, more work to update it. But my main problem is actually that I have no good data to test the plot with, I deleted all old "nc" files a long time ago.

Thus, I made a blind attempt to apply the same changes as for band structure - maybe it works, but if not perhaps you can provide me a test HDF5 file with transmission data to experiment on?

The reason for the strange plot is that  you have computed a usual band structure, from G to K to M etc. For this plot you need to get eigenvalues on a regular k-point mesh around the K point (or in the whole zone). The transmission spectrum already has such data, though. I have attached also a script to generate the input data for the band structure plot.

For the other questions, that is outside my expertise, but I understand you are saying the scripts in the tutorial do not work anymore? That should be considered a "bug" and I can report it to have it fixed.
« Last Edit: May 5, 2020, 20:15 by Anders Blom »

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #5 on: May 5, 2020, 11:36 »
Thank you Dr. Blom.
It seems that your script does not work for the new version 2019.12.sp1. 
The attachment is the input and output files for the transmission of graphene obtained by the newest version.
If possible, would you like to test and update the new srcipt to obtain the hexgonal transmission picture using the attachments.

Thank you so much again.
« Last Edit: May 5, 2020, 14:55 by Roc2019 »

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5013
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
Re: Hexagonal plot of transmission coefficients
« Reply #6 on: May 5, 2020, 20:18 »
Ooooh, I just missed that print needs to be a function now...!

So the script should technically work now. Using your HDF5 file didn't allow to make a nice plot to show it, because for whatever reason all transmission is zero for all energies and k-points in your example.
 

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #7 on: May 6, 2020, 03:58 »
Thank you Dr. Blom.

The new script works now. It is great!!!   :D

Expect you or other experts could update some other scripts for the neweast version 2019.12.sp1,  for examples,
     2) the script to plot the spin texture  for the newest version 2019.12.sp1
    3) the script for calculating the topological invariants

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #8 on: June 8, 2020, 14:18 »
Dear Dr. Blom,

Would you like to give the two new files of hexplot.py and transmission_hexplot.py for a spin polarization calculation?   The present version of the both scripts does not work for a spin-resolved calculation.

Thank you very much.

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 5013
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
Re: Hexagonal plot of transmission coefficients
« Reply #9 on: June 9, 2020, 09:04 »
I don't have good test data for that but should be easy by just modifying the nlread around line 48-49 to select the right spin component, no?

If the current code doesn't work, try

t = nlread(ncfile, TransmissionSpectrum)[0]
T = t.transmission(spin=Spin.Up or Spin.Down)[Epoint]
« Last Edit: June 9, 2020, 09:05 by Anders Blom »

Offline Roc2019

  • Regular ATK user
  • **
  • Posts: 29
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Hexagonal plot of transmission coefficients
« Reply #10 on: June 9, 2020, 15:21 »
Thank you very much, Dr. Blom.  I  get it.   ;)