QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: sweta on September 14, 2012, 09:44

Title: two probe with atk-vnl
Post by: sweta on September 14, 2012, 09:44
Hello quantumwise

I have two questions:

1. Whether ATK have the facility to merge two fig (for example transmission spectra) in one fig?

2. How to calculate anchoring group and electrode distance exactly.

For example if we take sulfur anchoring group and adsorption height= 1.7 but the problem is that after optimization of two probe geometry its absorption height changes than how we can caculate the optimized adsorption height exactly.

Thank you!
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 15, 2012, 00:46
1. Not in the GUI currently, but you can always write a script for it. See e.g. http://quantumwise.com/forum/index.php?topic=1822

2. I don't understand what you mean. The way to find the distance is to run an optimization, as you say did. And if you do, of course the absorption height will change, that's the whole point. So now you have found the optimized height, it's in the result of the optimization.
Title: Re: two probe with atk-vnl
Post by: sweta on September 15, 2012, 08:25
1. I think your suggested script is for calculating only one transmission spectra but i want to merge two or three spectra in one fig.

2. I just want to calculate the adsorption height after optimizing the geometry.
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 15, 2012, 15:59
1. Yes, sure, so you would read in more than one NC file (or perhaps the spectra are in the same file, but the same approach applies) and then you add the plot, i.e. do P.plot several times.

2. So, just load the optimized geometry into the Viewer or Builder, put the mouse over the atoms (or open Coordinate Tools>Coordinate List) and inspect the coordinates.
Title: Re: two probe with atk-vnl
Post by: sweta on September 17, 2012, 10:12
Following script doesn't calculate the transmission spectra of two nc file in same plot.
how i will modify it to do the same ???

t = nlread('analysis.nc', TransmissionSpectrum)[0]
t = nlread('analysis1.nc', TransmissionSpectrum)[0]
import pylab as P 
P.plot(t.evaluate(),t.energies() )
P.plot(t.evaluate(),t.energies() )
P.xlabel("Transmission T(E)") 
P.ylabel("Energy / eV") 
P.savefig('transmission2.png', dpi=120)
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 17, 2012, 10:15
Call the variables t1 and t2 instead of t, the second line overwrites t as defined on the first line
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 17, 2012, 10:16
Or, you can always export the transmission spectrum and other data from VNL by right-clicking the plot and choose Export. Then you can plot in Excel, GNUPlot, IDL, or whatever you prefer.
Title: Re: two probe with atk-vnl
Post by: sweta on September 17, 2012, 20:13
thank you! it works well if spectra are in different nc file.

can you tell me what modifications i should do in the above script if two spectra in same file (for example transmission spectra at different voltages) and i want to merge it ???
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 17, 2012, 21:47
In that case use

Code: python
import pylab as P 
all = nlread('analysis.nc', TransmissionSpectrum)
for t in all:
    P.plot(t.evaluate(),t.energies())
P.xlabel("Transmission T(E)")
P.ylabel("Energy / eV")
P.savefig('transmission3.png', dpi=120)

Note the indentation of the "plot" line.
Title: Re: two probe with atk-vnl
Post by: sweta on September 19, 2012, 14:23
Thanks Dr. Blom!

Your suggested script works for all transmission spectra in same .nc file.

If we want to merge only some specific spectra in same .nc file (for example gID002, gID004 only) what changes i should do in the above script?
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 19, 2012, 14:31
Code: python
import pylab as P
ids = ['gID002', 'gID004']
for id in ids:
    t = nlread('analysis.nc', object_id=id)[0]
    P.plot(t.evaluate(),t.energies()) 
P.xlabel("Transmission T(E)")   
P.ylabel("Energy / eV")   
P.savefig('transmission4.png', dpi=120)

Tip: learn Python - it will help you a lot
Title: Re: two probe with atk-vnl
Post by: sweta on September 21, 2012, 13:39
Thanks Dr. Blom!

Is this possible to show bias window through the above process? How i can do this
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 22, 2012, 21:24
Easy

Code: python
P.plot([0,6],[0,6], 'b-')
P.plot([0,6],[0,-6], 'b-')

where perhaps the range 0 to 6 V is a bit much, but that's easy to adjust.
Title: Re: two probe with atk-vnl
Post by: sweta on September 24, 2012, 13:04
import pylab as P
P.plot([0,1],[0,1], 'b-') 
P.plot([0,1],[0,-1], 'b-')
ids = ['gID002', 'gID004'] 
for id in ids: 
    t = nlread('analysis.nc', object_id=id)[0] 
    P.plot(t.evaluate(),t.energies())   
P.xlabel("Transmission T(E)")     
P.ylabel("Energy / eV")     
P.savefig('transmission4.png', dpi=120)

It does not show the bias window like attached fig
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 24, 2012, 13:49
That can be done with some pylab coding, but if the bias is different for the different transmission spectra it doesn't really make sense.
Title: Re: two probe with atk-vnl
Post by: sweta on September 24, 2012, 17:26
Can you please tell me the coding?

And where I should use in the above script?
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 24, 2012, 17:50
P.axhline(y=t.electrodeVoltages()[0].inUnitsOf(Volt), ls='--')
P.axhline(y=t.electrodeVoltages()[1].inUnitsOf(Volt), ls='--')
Title: Re: two probe with atk-vnl
Post by: sweta on September 25, 2012, 09:49
Thank you so much Dr. Blom you are really great :)
It helps me alot in showing my calculation results with clarity.

Please help me once more. your above script only shows transmission spectra at zero bias (bias window at zero applied bias).

I want to show  bias window at 1.2 Volt. For this what i should add in the script ???
Title: Re: two probe with atk-vnl
Post by: Anders Blom on September 25, 2012, 10:58
The script works for any bias.
Title: Re: two probe with atk-vnl
Post by: sweta on October 1, 2012, 09:18
Its really amazing!

Thanks Dr. Blom

one last question, how we can adjust the range of transmission spectra. For example, we have calculated transmission spectra in the range [0,5] but i want to show only [0,2] how we can adjust it through script?
Title: Re: two probe with atk-vnl
Post by: Anders Blom on October 1, 2012, 09:36
P.xlim(0,2)
Title: Re: two probe with atk-vnl
Post by: sweta on October 1, 2012, 11:25
It only change T(E) range.

I want to change range of Energy/eV
Title: Re: two probe with atk-vnl
Post by: Anders Blom on October 1, 2012, 11:48
xlim > ylim