Author Topic: how to choose the eigenstates in the vnl plot  (Read 4877 times)

0 Members and 1 Guest are viewing this topic.

Offline bxu4

  • New QuantumATK user
  • *
  • Posts: 4
  • Reputation: 0
    • View Profile
how to choose the eigenstates in the vnl plot
« on: February 24, 2009, 10:09 »
Dear everyone
     
       For the example of imperfect Al wire, if I have got the two eigenstates and stored them in the *.vnl file, how can I choose which eigenstate is plotted in the vnl through Nanoscope?
         

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: how to choose the eigenstates in the vnl plot
« Reply #1 on: February 24, 2009, 11:05 »
Once you have dropped the VNL file on the Nanoscope, use the right mouse button to bring up the context menu. Under "Insert plot", there is first a list of plot types (Volume plot, Isosurface, etc), and under each of these is a list of the eigenstates in the VNL file. Select the one you want to include. A useful tip is to assign a unique label that's easy to remember to each state when you save it in the VNL file. This label will be visible in the menu, and makes it easier to choose the correct state. For example, the label could reflect the spin, or the eigenvalue, and the index. For instance:
Code
k = (0.0,0.0)
E = 0.0*electronVolt

transmission_eigenvalues = calculateTransmissionEigenvalues(
    self_consistent_calculation = scf,
    energy = E,
    quantum_numbers = (k)
)

for index,eigenvalue in enumerate(transmission_eigenvalues):

    transmission_eigenstates = calculateTransmissionEigenstates(
        self_consistent_calculation = scf,
        energy = E,
        quantum_numbers = (index,(k))
    )
    
    label='Transmission Eigenstate'+' '+str(index)+', k='+str(k)+', Eigenvalue='+str(eigenvalue)
    if processIsMaster(): file.addToSample(transmission_eigenstates[0], 'twoprobe_configuration', label)
This will, given the specified 2D k-point and energy, calculate the transmission eigenvalues, and for each one calculate the corresponding eigenstate and save it in a VNL file, with a label like Transmission Eigenstate 0, k=(0,0), Eigenvalue=0.92. Modify as needed for spin. If you have multiple k-points you can in principle extend "k" to be a list, but the code gets a bit messy...
« Last Edit: February 24, 2009, 12:34 by Anders Blom »

Offline bxu4

  • New QuantumATK user
  • *
  • Posts: 4
  • Reputation: 0
    • View Profile
Re: how to choose the eigenstates in the vnl plot
« Reply #2 on: February 24, 2009, 12:03 »
Thanks a lot!  Since I do not add the label for the eigenstates, there is no list of the eigenstates in the VNL file. This is the reason why I do not know how to choose the eigenstates. But acoording to the example file of imperfect Al wire(imperfect_alwire-transm-eigenvectors.py), no label is added to distinguish the eigenstates. So, I wonder if the file 'imperfect_alwire-transm-eigenvectors.py' can be used to calculated and labe the eigenstates. 

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: how to choose the eigenstates in the vnl plot
« Reply #3 on: February 24, 2009, 12:27 »
The label is optional, but if it's missing the list should still be there in VNL, in the Nanoscope. However, it might be hard to distinguish the states from each other. You can easily modify the example file you refer to by adding the label as the third argument to addToSample().
Code
from ATK.TwoProbe import *

# Look for the eigenvector at the Fermi level
energy = 0.0*Units.eV

# Restore the SCF calculation
scf = restoreSelfConsistentCalculation('imperfect_chain.nc')

# Define output on VNL file
results = VNLFile('imperfect_alwire.vnl')

# Calculate the transmission eigenstates
index_list = [0,1]
kpoint_list = [(0.0,0.0)]
for index in index_list:
    transmission_eigenstate = calculateTransmissionEigenstates(
        scf,
        energy,
        quantum_numbers=(index,kpoint_list)
	)
    label = 'Transmission Eigenstate '+str(index)
    results.addToSample(transmission_eigenstate[0],"imperfect_alwire",label)
Two last lines modified.
« Last Edit: February 24, 2009, 12:35 by Anders Blom »

Offline bxu4

  • New QuantumATK user
  • *
  • Posts: 4
  • Reputation: 0
    • View Profile
Re: how to choose the eigenstates in the vnl plot
« Reply #4 on: February 24, 2009, 13:10 »
Yes,if I give the label argument to addToSample(), the list will appear. But if I do not, the list will not appear. So, it is very trickly.
Anyway, I appreciate Anders Blom's reply.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: how to choose the eigenstates in the vnl plot
« Reply #5 on: February 24, 2009, 13:37 »
Ok, I see what happens. addToSample() overwrites the data if you use a label that already exists. This is the way it is supposed to be; if you add data with the same label, it should overwrite the existing data (compare saving a file with the same file name). This is, however, of course not obvious when the label is empty...

Thus, the lesson learned here is: always use a label!