### Author Topic: How to find the dynamic capacitance of a nanowire in ATK?  (Read 6785 times)

0 Members and 1 Guest are viewing this topic.

#### serhan

• Heavy QuantumATK user
• Posts: 98
• Reputation: 1
##### How to find the dynamic capacitance of a nanowire in ATK?
« on: December 25, 2008, 21:37 »
Dear users,

Is it possible to calculate the dynamic capacitance of a nanowire or any other two-probe system in ATK?

I think, we can use C=Q/V formula.

* Can we extract Q(r) and V(r) (r being the 3-D posisiton vector, Q(r) being the 3-D charge matrix and V(r) is 3-D potential matrix of the scattering region) from the output file with extension .vnl  to another tool such as MATLAB? (I tried to read .nc file using a NetCDF reader but it was not straight )

If we can extract Q(r) and V(r) by simple element by element division I think a reasonable capacitance can be obtained. Also, it may be done with some NL coding  But extracting to MATLAB or sth else is also interesting I think.

Regards and nice Christmas and New Year

Serhan
« Last Edit: December 25, 2008, 21:39 by serhan »

#### Nordland

• QuantumATK Staff
• Supreme QuantumATK Wizard
• Posts: 812
• Reputation: 18
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #1 on: December 27, 2008, 10:12 »
Hey!

I tryed cooking something together. It is done such that you give it your calculation as a netcdf file. You simply modify the script to have the correct filename
of your calculation, and then you give it the output file and then it will calculate the "dynamic capatitance" by using the formula from above
and store it a VNL file. I have attached the script, and created a plot of it in 2D, since it is easy to see things this way that in 3D if you ask me
Whatever the results are correct or not - that I don't know

For this Li-H2-Li wire which I tested on, it seems that the averaged dynamic capatitance is zero?

I am not soo used to matlab, but getting the data to xyz file is not a problem at all.

P.S It should be noted that I have given it the unit Ry despite the units is really Ry*Bohr**(-1.5), but in order to save as a Local potential I have tricked it a bit
The values are correct - just ignore the Ry.

#### serhan

• Heavy QuantumATK user
• Posts: 98
• Reputation: 1
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #2 on: December 27, 2008, 13:56 »
Hi Nordland,

We can plot the simulation outputs for example electron density and potential profile in 3-D in VNL easily , Ok, it is very well.

But, can we export these 3-D outputs to a simple file that can be read by any other math tool, for example to a xyz file such as:

X coordinate        Y coordinate        Z coordinate       Electron density
1E-10                      1E-10                 1E-10               0.02
2E-10                      1E-10                 1E1-0               0.015
.                             .                         .                      .
.                             .                         .                      .

Thanks again...

Serhan
« Last Edit: December 27, 2008, 13:59 by serhan »

#### Nordland

• QuantumATK Staff
• Supreme QuantumATK Wizard
• Posts: 812
• Reputation: 18
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #3 on: December 27, 2008, 19:05 »

You can find it here.

#### serhan

• Heavy QuantumATK user
• Posts: 98
• Reputation: 1
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #4 on: December 27, 2008, 20:44 »
Thank you very much!

Regards

Serhan

#### Roc

• QuantumATK Guru
• Posts: 104
• Reputation: 0
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #5 on: December 28, 2008, 02:37 »
Dear Nordland ,

Unfortunately, I could not get it work.
After running these scripts lih2li-setup.py and lih2li-scf.py in the examples folder, I could get the lih2li.nc document easily, but when I run the dynamic_capacitance.py

atk dynamic_capacitance.py  > dynamic_capacitance.txt

I just got that,

dynamic_capacitance.txt  0K
test.vnl  7,904KB

I'm sorry, I haven't understood it how to get lih2li_dynamic_capatitance.png , and what's wrong with my scripts.

Thanks!
« Last Edit: December 28, 2008, 09:41 by anyipeng »

#### Nordland

• QuantumATK Staff
• Supreme QuantumATK Wizard
• Posts: 812
• Reputation: 18
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #6 on: December 28, 2008, 13:00 »
Well - I guess nothing, but there is something wrong with my description of the script.

The png file is made by matplotlib which is included in ATK, but the functionality for making this plot is not included in the posted scripts.

I think the scripts works as intended and you have done everything correct. The script contains a variable at the top called "output_vnlfile".
I have set this to test.vnl. The dynamic capacitance is stored in VNL as a 3D grid and can be visualized in VNL.
You can of course set this name to everything you want.

If you want the data to the screen, just like serhan, then you can go to the link I posted in the fourth post and combine the scripts,
then you can plot the results and manipulate them in any way you want.

Perhaps using matplotlib or GNUplot as I do

#### Roc

• QuantumATK Guru
• Posts: 104
• Reputation: 0
##### Re: How to find the dynamic capacitance of a nanowire in ATK?
« Reply #7 on: December 29, 2008, 02:16 »