QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: perfetti on November 23, 2011, 18:17

Title: How to get electrode coordinates for two probe system
Post by: perfetti on November 23, 2011, 18:17
Dear Everyone, I just started using ATK, and now I want to set up a two probe system with metal electrodes and a nanotube in the central region. However, I don't know how can I get the electrode coordinates for the electrodes?Everybody's using cartesian coordinates there, but I don't know where can I get that. Thank you.
Title: Re: How to get electrode coordinates for two probe system
Post by: zh on November 24, 2011, 01:48
The coordinates of atoms in electrodes and center region can be printed out by calling nlprint(your_device_configuration).
Title: Re: How to get electrode coordinates for two probe system
Post by: kstokbro on November 24, 2011, 07:11
You can drop the device_configuration on the editor, this will show the python file which includes the electrode setup
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on November 24, 2011, 17:42
Thanks.But I want to get the input data for the electrode, not the output. Which means, I want to set up a device but I don't know what coordinates should I input for the electrodes, and where I could get that.

On the other hand, my question may be modified as how to set up the device as in the picture.

 I see somebody mentioned there's a two probe module,but I am using a demo license, does that mean I don't have the two probe function in my trial software??

Thank you.

Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on November 24, 2011, 22:57
I thought as much :) Your license is for the full software, the demo license is just limited in time, and you are not allowed to publish articles based on the results obtained with only a demo license.

So you can build this kind of interface with the version you have - but it's not entirely trivial. I'll provide some hints etc later on.
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on November 25, 2011, 15:42
This will be so much easier to do in ATK 12.2. We are currently make a completely new Builder, where this system is one of the test cases, which we are making sure is easy to build.

So, since that is coming out relatively soon, but not tomorrow, I decided to make the simplest solution possible (for me) which anyway works in 11.8.

The result is the quick-and-dirty Custom Builder attached to this post. How way to use it:

One thing you may want to "post-process" is to rotate the tube, or fine-tune it's position. This can be done in the Builder, by selecting all carbon atoms (right-click background, Select>Select by>Elements), and then use Transform>Rotate or Translate.

Let me know if you find any mistakes or problems with using it.
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on November 28, 2011, 22:52
Dear Dr. Blom,
        Thank you very much. Now I want to do is to shrink the size of the electrode. But I found that I can only get the ideal result for the left electrode while failed for the right one. I want to get a electrode with 4 layers of Cu(100) atoms, whose lattice parameter is 3.61496.
       What I did is like this: I decreased the minimum length of the electrodes to 3.61496 which now gives me two layer of atoms. Then I changed the left surface length to 3.61496 and it gives me two layers of atoms too. However when I did the same for the right surface, I can only see the dangling bonds and split planes. I think it's caused by the wrong parameter values I gave, that is, the right surface length. However, I couldn't figure it out. I myself is not quite sure about the meaning of the surface length too.
      It's a very detailed question and I am very grateful for your and others' kindness.
      Attached are picture and the .py file. Thanks.  :)
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on November 28, 2011, 23:17
You're almost there :)

However: First of all, only 2 layers in the electrode is not advisable. It will leads to problems with convergence, and possibly wrong results. You can read more here: http://www.quantumwise.com/publications/tutorials/mini-tutorials/99

So, you had better keep the electrode minimum length at around 4 Å, that gives 4 layers. Trust me, you want that. Yes, heavier to calculate, but that's the name of the game.

In that situation, you cannot get by with fewer than 4 layers also in the surface, thus left and right surface lengths (this is simply the amount of Cu in the central region) can and should be left at the default 9 Å. This is also a very reasonable surface thickness; you need to screen our the effects of the nanotube before reaching the electrodes, after all.

With that, I think you will have the correct setup easily, although with more atoms than you had hoped, I suppose ;)

PS: This Custom Builder has a bit less error checking than desirable. That's why you can get some weird structures when choosing certain parameters. It was good that you caught it before starting the calculations.
Title: Re: How to get electrode coordinates for two probe system
Post by: anyuezhiji on November 29, 2011, 02:53
You're almost there :)

However: First of all, only 2 layers in the electrode is not advisable. It will leads to problems with convergence, and possibly wrong results. You can read more here: http://www.quantumwise.com/publications/tutorials/mini-tutorials/99

So, you had better keep the electrode minimum length at around 4 Å, that gives 4 layers. Trust me, you want that. Yes, heavier to calculate, but that's the name of the game.

In that situation, you cannot get by with fewer than 4 layers also in the surface, thus left and right surface lengths (this is simply the amount of Cu in the central region) can and should be left at the default 9 Å. This is also a very reasonable surface thickness; you need to screen our the effects of the nanotube before reaching the electrodes, after all.

With that, I think you will have the correct setup easily, although with more atoms than you had hoped, I suppose ;)

PS: This Custom Builder has a bit less error checking than desirable. That's why you can get some weird structures when choosing certain parameters. It was good that you caught it before starting the calculations.


Well,http://www.quantumwise.com/publications/tutorials/mini-tutorials/99 (http://www.quantumwise.com/publications/tutorials/mini-tutorials/99) tells us how to set up the electrodes properly in a two-probe system, but how to choose a reasonable surface thickness then? ???
Thank you for your patient answers!
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on November 29, 2011, 09:15
The surface provides a smooth transition from the central part (the nanotube in this case) to the electrode material. Obviously the nanotube is not like bulk copper, but the electrodes are, and the surface atoms represent that intermediate region which is not perfect bulk copper, but also not a nanotube.
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on November 29, 2011, 22:12
Thanks Dr. Blom.
here are two simple questions:
1) how long should this calculation take, and is there any way to make it faster? It already ran for almost 1 day and still haven't done.

2) Should I do structure optimization before running the calculation for I-V curve, transmission and other transport properties?

Thank you. 

Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on November 29, 2011, 22:38
1. This is a big calculation. It will benefit from parallelization, in particular if you change EquivalentBulk to NeutralAtoms.

2. Ideally yes. For such a regular structure the main effects are probably related to the particular distance of the nanotube to the surface, the influence of this distance needs to be studied. The rotation and shift of the nanotube on the surface is probably less important; you can read some articles on that to see what the community thinks. In general these are not things that you do in 1-2 weeks, it takes time.
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on November 30, 2011, 00:12
 :) thanks. 
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on December 1, 2011, 21:42
I got a simple question: could I set the electrode length in any value?
I tried to get the long enough electrode length using the check-electrode-length.py,
and could get some values that sufficient long enough. However, when I put this length into view, the electrode shows up as lacking atoms inside.

Is that a rule that I should set the length as a integer times of lattice parameter or something?
Or I could just ignore the broken structure and select the sufficient long length?

Thank you.




You're almost there :)

However: First of all, only 2 layers in the electrode is not advisable. It will leads to problems with convergence, and possibly wrong results. You can read more here: http://www.quantumwise.com/publications/tutorials/mini-tutorials/99

So, you had better keep the electrode minimum length at around 4 Å, that gives 4 layers. Trust me, you want that. Yes, heavier to calculate, but that's the name of the game.

In that situation, you cannot get by with fewer than 4 layers also in the surface, thus left and right surface lengths (this is simply the amount of Cu in the central region) can and should be left at the default 9 Å. This is also a very reasonable surface thickness; you need to screen our the effects of the nanotube before reaching the electrodes, after all.

With that, I think you will have the correct setup easily, although with more atoms than you had hoped, I suppose ;)

PS: This Custom Builder has a bit less error checking than desirable. That's why you can get some weird structures when choosing certain parameters. It was good that you caught it before starting the calculations.

Title: Re: How to get electrode coordinates for two probe system
Post by: kstokbro on December 1, 2011, 22:17
If you import a device configuration into the builder, it will have a list of valid electrode lengths, select from the list.
If none of the listed lengths are large enough, you can extend the central region  and this will make it possible to use longer electrodes.
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on December 1, 2011, 23:07
It really depends on where you are trying to enter the values. But generally no, you cannot set the electrode length to any value, it needs to correspond to a value that makes the electrode periodic.
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on December 2, 2011, 18:53
What do you mean by "extend the central region"? Should I extend it in the builder under device mode? I increased it even to 100% but there's no new value appearing in the electrode lengths.



If you import a device configuration into the builder, it will have a list of valid electrode lengths, select from the list.
If none of the listed lengths are large enough, you can extend the central region  and this will make it possible to use longer electrodes.
Title: Re: How to get electrode coordinates for two probe system
Post by: perfetti on December 2, 2011, 19:22
Can you explain in more detail for " where you are trying to enter the values"?
How can get the value that makes the electrode periodic? I added half the lattice parameter but the structure still broken. i guess there's some allowable value gap in between.

It really depends on where you are trying to enter the values. But generally no, you cannot set the electrode length to any value, it needs to correspond to a value that makes the electrode periodic.

Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on December 4, 2011, 02:10
What I mean is that I no longer understand what you are doing :) It started in the Custom Builder called "Bulk Junction" which I sent, but then I think maybe at some point you transferred the structure to the Builder or not... So, I'm lost, and cannot help unless you show more details, ideally a screenshot.

My advise it, don't change the electrode or surface lengths in the Custom Builder, just make sure the structure looks correct and that you have 4 or more metal layers in each surface (provided you have fcc 111). Then transfer to Builder, and there you can manipulate the length of the electrodes in a controlled way.
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on January 6, 2012, 08:17
This will be so much easier to do in ATK 12.2. We are currently make a completely new Builder, where this system is one of the test cases, which we are making sure is easy to build.

So, since that is coming out relatively soon, but not tomorrow, I decided to make the simplest solution possible (for me) which anyway works in 11.8.

The result is the quick-and-dirty Custom Builder attached to this post. How way to use it:
  • First save this script on your computer.
  • Then, drop it (the file) onto the "Custom" icon in VNL.
  • You can drop any cubic metal like Cu or Au or Pd etc onto the "New electrode" dropzone (default is gold). It must be cubic because we need to cleave it. A simple extension would be to allow also ready electrodes; then one could also build pure nanotube or graphene junctions :)
  • Now open another Custom Builder and select Nanotube from the menu. Choose the indices you want, and remember to repeat it so it's long enough.
  • Then drag and drop the nanotube, using the script icon in the lower right-hand corner, onto the dropzone "Drop center bulk here".
  • Now you can make some adjustments in terms of repetitions (in X/Y) distances etc so that you get something reasonable.
  • Note that you can actually take any bulk system and put in the middle. So also some piece of graphene would work fine.

One thing you may want to "post-process" is to rotate the tube, or fine-tune it's position. This can be done in the Builder, by selecting all carbon atoms (right-click background, Select>Select by>Elements), and then use Transform>Rotate or Translate.



Let me know if you find any mistakes or problems with using it.

I want to use the above script to build a schottky diode by replacing the left electrode with Aluminum(110) and right electrode with Palladium/Gold or any other ohmic contact and drop a CNT(8,0) in the centre bulk ..Is my procedure correct .
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 6, 2012, 23:55
Currently my posted script will only build homogeneous structures where the left and right electrodes are the same. It's not entirely trivial to build heterogeneous systems like the one you envision because the XY unit cells for the two electrodes must be the same, and hence stretched if the lattice constants are not the same.

As mentioned, in ATK 12.2 we're improving things a lot, I will use your system idea to test if we have made it possible to set this up easily; it's an important type of system that we should support.
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 10, 2012, 10:32
This will be so much easier to do in ATK 12.2. We are currently make a completely new Builder, where this system is one of the test cases, which we are making sure is easy to build.

So, since that is coming out relatively soon, but not tomorrow, I decided to make the simplest solution possible (for me) which anyway works in 11.8.

The result is the quick-and-dirty Custom Builder attached to this post. How way to use it:
  • First save this script on your computer.
  • Then, drop it (the file) onto the "Custom" icon in VNL.
  • You can drop any cubic metal like Cu or Au or Pd etc onto the "New electrode" dropzone (default is gold). It must be cubic because we need to cleave it. A simple extension would be to allow also ready electrodes; then one could also build pure nanotube or graphene junctions :)
  • Now open another Custom Builder and select Nanotube from the menu. Choose the indices you want, and remember to repeat it so it's long enough.
  • Then drag and drop the nanotube, using the script icon in the lower right-hand corner, onto the dropzone "Drop center bulk here".
  • Now you can make some adjustments in terms of repetitions (in X/Y) distances etc so that you get something reasonable.
  • Note that you can actually take any bulk system and put in the middle. So also some piece of graphene would work fine.

One thing you may want to "post-process" is to rotate the tube, or fine-tune it's position. This can be done in the Builder, by selecting all carbon atoms (right-click background, Select>Select by>Elements), and then use Transform>Rotate or Translate.

Let me know if you find any mistakes or problems with using it.

Dear Sir,
           I am trying to build a carbon nanotube transistor using the above script in which i have inserted a nanotube(5,0) in between Au(111) electrodes. As mentioned above,i followed the steps but at last it seems to have 4 layers of Au at the left surface and 3 layers at the right surface of the scattering region. Will this hamper my transport calculation..
                    thanking you in advance
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 10, 2012, 14:44
In principle it shouldn't be a big problem if there is enough screening. 3-4 layers are perhaps on the bit on the low side to consider the screening complete, however. But, I doubt it will be critical. Still, if you are concerned, it would be easy enough to add a 4th layer on the right in the Builder, just add 33.3333% of the electrode to the right surface.
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 10, 2012, 15:30
In principle it shouldn't be a big problem if there is enough screening. 3-4 layers are perhaps on the bit on the low side to consider the screening complete, however. But, I doubt it will be critical. Still, if you are concerned, it would be easy enough to add a 4th layer on the right in the Builder, just add 33.3333% of the electrode to the right surface.



Thank you for your generous reply..
But when i open it in the builder it already shows 33.3333% of the electrode to the right surface. So,can u just suggest me how to insert the 4th layer..
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 10, 2012, 15:41
Click the + sign :)
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 11, 2012, 06:44
Click the + sign :)

Thanks a lot..
Sir,i now have the structure of cnt(5,0) in between Au(111) electrode..
Do I have to optimize the structure to obtain proper results or without optimization also,i will get fair results in calculating transmission spectrum,DOS,etc..
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 11, 2012, 09:54
At least the distance between the tube and the surface should be carefully considered.
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 11, 2012, 10:44
At least the distance between the tube and the surface should be carefully considered.

Thanks for the reply,..
I am keeping a distance of 2.2A between Au electrode and Carbon Nanotube according to the published paper
J. Palacios, P. Tarakeshwar, and D. M. Kim, Phys. Rev. B 77, 113403
2008
Will that be fine in carrying out the calculation without optimization..
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 11, 2012, 11:05
It is at least good if you can motivate the choice of the distance, if you don't optimize it.
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 11, 2012, 13:17
It is at least good if you can motivate the choice of the distance, if you don't optimize it.

Ok..
then i will first try the above geometry without optimization and then thereafter i will try to optimize the structure and compare both the results...(for optimization i will need your help again later)
i will inform you what result i get...
thanks a lot for everything..  :)
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on January 23, 2012, 05:02
Currently my posted script will only build homogeneous structures where the left and right electrodes are the same. It's not entirely trivial to build heterogeneous systems like the one you envision because the XY unit cells for the two electrodes must be the same, and hence stretched if the lattice constants are not the same.

As mentioned, in ATK 12.2 we're improving things a lot, I will use your system idea to test if we have made it possible to set this up easily; it's an important type of system that we should support.


Please make a script for a heterogeneous system with the functionality of inserting two different electrodes if possible  ...I am trying to manipulate the present script but not successful :(

Thanks in advance
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on January 23, 2012, 07:24
Secondly i am trying to get the transmission and current voltage characteristics of the following structure i have attached ..Here i have "deleted" the right electrode so as to say i have ignored the ohmic contact for the calculation..

But the calculation is taking a lot of time around 2-3 days ..Please see/Verify my Structure whether my process is correct or Wrong ..
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on January 23, 2012, 21:16
Yes, that's a big structure, not much to do but wait. However, you can reduce it a bit, I think at least by one layer in X and Y, there should still be enough vacuum in those directions.

Writing a general script for setting up heterogeneous structure that would work well for 11.8 is far from trivial, and that version is becoming old soon anyway, so there is no point in spending time on that. However, the structure you have is suitable to computing the interface between the metal and CNT, so you're in good shape already.
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on January 24, 2012, 07:24
Yes, that's a big structure, not much to do but wait. However, you can reduce it a bit, I think at least by one layer in X and Y, there should still be enough vacuum in those directions.

Writing a general script for setting up heterogeneous structure that would work well for 11.8 is far from trivial, and that version is becoming old soon anyway, so there is no point in spending time on that. However, the structure you have is suitable to computing the interface between the metal and CNT, so you're in good shape already.

Thanks for the reply ..one more question ..is there any way to calculate work function of carbon nano tubes .like of different chirality / diameter in 11.8 (i did not get by searching the forum)
Title: Re: How to get electrode coordinates for two probe system
Post by: anir on January 24, 2012, 11:16
It is at least good if you can motivate the choice of the distance, if you don't optimize it.


Sir,
    I have the licence for EHT and I wish to optimize my Au-Cnt-Au structure as mentioned above.
    But the tutorial
    http://quantumwise.com/publications/tutorials/mini-tutorials/95-optimizing-the-geometry-of-a-two-probe-system
    suggests to use DFT,so will i have a correct optimized structure or not.....
                                                                              Thanking you in advance
   
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on February 22, 2012, 06:28

Yes, that's a big structure, not much to do but wait. However, you can reduce it a bit, I think at least by one layer in X and Y, there should still be enough vacuum in those directions.

Writing a general script for setting up heterogeneous structure that would work well for 11.8 is far from trivial, and that version is becoming old soon anyway, so there is no point in spending time on that. However, the structure you have is suitable to computing the interface between the metal and CNT, so you're in good shape already.

I increased the k points to 500 .. increased the number of history steps to 15 and beyond... also lowered the tolerance to 1e-4. still the structure is not converging .. any suggestion till which i can continue changing the above parameters ..
Title: Re: How to get electrode coordinates for two probe system
Post by: Anders Blom on February 22, 2012, 11:57
I'm sorry I didn't see this before. You have a mistake in the configuration - there are C atoms in the left electrode!

The problem is that your "surface" - the Al atoms in the central region - has exactly the same size as the left electrode. This is not recommended, for many reasons; you should have at least one more layer of Al in the central region. So, you should go back to the central region, add some Al so you have at least 7 layers of Al there, 8 is better (you need 6 layers in the left electrode, I think, 4 is too little) and then remake the device with 6 Al layers in the left electrode again.
Title: Re: How to get electrode coordinates for two probe system
Post by: dhurba on February 26, 2012, 12:36
Thanks it worked  :)