Author Topic: Possible Bug in the code: dips in the transmittance  (Read 16647 times)

0 Members and 1 Guest are viewing this topic.

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Possible Bug in the code: dips in the transmittance
« on: March 17, 2010, 10:04 »
Hi!

I have calculated the transmittance of (5,5) carbon nanotube at zero bias. The ATK version I used for that calculation is 2008.10.  See the file attached. There you can find that the transmiitance is zero at E = 0 (Fermi energy), which is certainly incorrect! It should be 2, since there are two conducting channels at the Fermi level. I addition, you will also find many dips at other energies in the plot. This is a problem.

I used 4-4-4 primitive cells in the left electrode, scattering region, and the right electrode. Since the lattice constant for a primitive cell along the tube axis is 2.45A, each region is 2.45*4 = 9.8A, which seems to be large enough to exclude any appreciable overlap between nonadjacent units. I used DZP basis set, and 80 k-points.

Please answer the following questions:

(1) Is  this problem fixed in the newer version, i.e., in version "2010.02 bug fixed release (= 2010_fixed)" ?
(2) In the quantumwise home page, you mentioned that

  As before noted for the 2009.11 release, ATK-DFT 2010.02 is not a complete replacement of ATK 2008.10, as it is still missing a few key features. Therefore it is considered an alpha-version, while VNL hereby is released in another beta-version.

Does this mean that you do not recommend to use 2010_fixed instead of 2008.10?

(3) Do you have any other suggestion to solve this probelm?

Thanks!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Possible Bug in the code: dips in the transmittance
« Reply #1 on: March 17, 2010, 16:02 »
1) There is a bug in the FFT algorithm in the first 2010.02 (and possibly 2010.01) release which at least would almost certainly be the cause of the dips (and most likely the E=0 issue too). It is fixed in 2010.02 build 4038.

A too short electrode could also give these kinds of artifacts, but you can check that with the new release.

2) There are definitely things in 2010.xx which are not optimal yet, so caution is advised. I'd recommend using both, for a few months still. The old one as the "work horse", but checking with the new one to see if the results are the same, thereby learning the new interface, and the slightly modified scripting language.

By summer there will be a complete replacement of 2008.10 available.
« Last Edit: March 17, 2010, 16:04 by Anders Blom »

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #2 on: March 18, 2010, 01:43 »
Thanks!

One more question.

Do I need a separate lisence for the version 2010.02 4038 ? Or, can I use it just with the lisence for 2008.10 ?

Thanks!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Possible Bug in the code: dips in the transmittance
« Reply #3 on: March 18, 2010, 03:10 »
I apologize, I didn't read your post very carefully.

First, yes, you need a separate license for 2010.xx, but the upgrade is for free if you have an active maintenance contract. Please contact Marcus Yee about this.

Now, if these dips appear for the older 2008.10 code, most likely the explanation is that the electrodes are too short OR you have electrostatic interactions. A good way to test the box size (unit cell in XY) is to see if the band structure of the single unit cell has proper degeneracies at Gamma and (0,0,1/2), with this cell.

Also, do I understand you correctly that the left/right electrodes AND the central region are all 4 repetitions of the unit cell? Probably that's ok for the electrodes, but it might be too short for the central region; I would double it.
« Last Edit: March 18, 2010, 03:12 by Anders Blom »

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #4 on: March 18, 2010, 09:04 »
Le me make thing more clear.

(1) Do you believe that there is no bug in 2008.10 which can cause dips in the transmission?
(2) If (1) is true, are you saying that the supercell-supercell interaction along XY directions (not along Z direction) can cause the probelm?
(3) You are also saying that the size (Lz) of the scattering region may be too short along Z direction (= transport direction). What is the physical reason why you think that way? Is there any reason why the scattering region should be much large along Z axis than that of the electrode, when I calculate the transmittance of a pristine CNT?

Please note that I used a much larger value of Lz for my another calculation of the transmittance in which a molecule is adsorbed on the surface of (5,5) CNT. For this, please read another question which   I posted under the title "How can I get rid of noisy dips in the tranmission curve?" more carefully. There I also find the dip at E=0, although I used much large Lz.

Thanks!
 

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Possible Bug in the code: dips in the transmittance
« Reply #5 on: March 18, 2010, 09:16 »
1,2 are both correct. The main cause for the dips is most likely either the supercell interaction or the electrode length.

For 3, it must be noted that ATK is not really designed to compute a perfect metallic system, for which we know the solution based on the band structure. So since your end goal is to simulate the modified system, it's best to calculate the pristine system under the same circumstances, i.e. using the same length of the central region as when the molecule is present. For the case with the molecule, there must be enough CNT in the central region to screen the influence of the molecule such that the area close to the electrodes is bulk-like.

Generally speaking, the longer the central region is, the closer one is to modeling the realistic system, and thus avoids the risk of artifacts. The pristine system is a special case, one might argue, but even so, electrostatic interactions between the electrodes cannot be ruled out if the central region is very short.

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #6 on: March 18, 2010, 10:02 »
Some more questions:

(1) Does the size of the system along X and Y axes affect the computational time ? If I increase them, does the calcultion require much more CPU time? The CNT systems, i.e., both of pristine and CNT+molecule,  I have considere are alreay too big, which required more than three days for the calculation of zero-bias tranmittance only.

(2) That makes me hesitate to use larger supercell sizes of X and Y axes as well as using more atoms in the scattering region so that the perfect screening is guaranteed. Can you suggest me any possible solution for this kind of timing problem? How many cores of Zeon CPU would you recommend to use for the calculation of the zero-bias transmittance ?

(3)  Since dips at E=0 appears for both of pristine (5,5) CNT [which uses 4 prim cells for the scattering region] and CNT+molecule [which uses much longer tube for the scattering region], I doubt that the problem is originated from the short size of Lz for the scattering region. This is puzzling to me, unless this is due to the supercell-supercell interaction along X and Y axes.

Thanks!


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Possible Bug in the code: dips in the transmittance
« Reply #7 on: March 18, 2010, 16:13 »
Without seeing the exact current setup, it's hard to advise... Perhaps you can post the script?

Some more questions:

(1) Does the size of the system along X and Y axes affect the computational time ? If I increase them, does the calcultion require much more CPU time? The CNT systems, i.e., both of pristine and CNT+molecule,  I have considere are alreay too big, which required more than three days for the calculation of zero-bias tranmittance only.

A little bit, plus it increases the memory usage.

Increasing the electrode length will not add too much time. And, after all, if the results are wrong, one doesn't have much of a choice...

Quote
(2) That makes me hesitate to use larger supercell sizes of X and Y axes as well as using more atoms in the scattering region so that the perfect screening is guaranteed. Can you suggest me any possible solution for this kind of timing problem? How many cores of Zeon CPU would you recommend to use for the calculation of the zero-bias transmittance

This is a bigger question... If you have a parallel license, but only a single computer, it's not always the best idea to use MPI parallelization, esp. if that single machine only has one socket. Put generally, the top performance of ATK is achieved by MPI parallelization over several nodes (physically separate machines with individual RAM), while at the same time letting the code thread over the cores.

The problem if you run multiple MPI processes on a single node is that the processes will fight both for RAM and CPU. So unless the system is small, it might actually end up running slower than in serial...

Threading is controlled by the environment variables MKL_NUM_THREADS (set to the number of cores) and MKL_DYNAMIC (set to false). On Linux you will probably need to set these variables by hand, while on Windows the correct number of cores is typically automatically detected.

Also, as a general rule, Linux is faster than Windows and 64-bit is much faster than 32-bit.

Quote
(3)  Since dips at E=0 appears for both of pristine (5,5) CNT [which uses 4 prim cells for the scattering region] and CNT+molecule [which uses much longer tube for the scattering region], I doubt that the problem is originated from the short size of Lz for the scattering region. This is puzzling to me, unless this is due to the supercell-supercell interaction along X and Y axes.

Agree, it's not necessarily the first thing to try. First increase the electrode length (unless the XY cell is way too small, but again, since I don't see the setup I cannot know), then the cell (after checking with a simple band structure, using the same cell), and finally Lz of the central region.

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #8 on: March 29, 2010, 08:14 »
Hi

I have made extensive calculations for pristine (5,5) CNT by changing the electrode length,  Lx, and the length of the scattering region. Lz = 2.45A for a primitive cell.

(a) 4-4-4 cells in the left electrode, scattering region, and the right electrode. Lx-Ly = 25A, Lz = 2.45*4
(b) 4-4-4 cells, Lx = Ly = 32A (much larger than that for (a)), Lz = 2.45*4
(c) 5-5-5 cells, Lx=Ly = 25A. Lz = 2.45*5

For all of the runs above, I still get a very sharp dip (Transmission = 0) in the transmission at E=0.

Also note that I find that T = 2.0 (correct answer) at E = 0.005 eV !!!

I guess I have tried all your suggestions in your previous reply,and I still get a wrong answer!

What can you suggest me next to get the right answer? Does't this mean that there's a bug in the code?
I hope that I would have your reply very soon.

Thanks!
 


Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #9 on: March 29, 2010, 13:30 »
You will need to determine if this is a singularity or not.

Using one of the previous calculation, calculate the transmission spectrum around 0.0 eV ( from - 0.01 eV to 0.01 eV ).
Remember to use many energy points so we get a really good resolution.

After doing this try to redo the calculation of the transmission spectrum with a smaller infinitesimal than the default.

Looking forward to hear the continuation.

Offline jjhskang

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Reputation: 0
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #10 on: April 1, 2010, 07:31 »
Hi

Following your suggestions in your previous reply to this question, I have calculated the transmission at zero bias using real_axis_infinitesial = 0.004eV (default = 0.01) at every 0.001eV (very cvompact !), again finding dips around E= 0!

Below you will find nunerical values for the trasnmissiona round E = 0.

--------------------------------------
           E(eV)            Transmittance
--------------------------------------
           -0.010          1.999754
           -0.009          1.999750
           -0.008          1.999745
           -0.007          1.999736
           -0.006          1.999719
           -0.005          1.999681
           -0.004          1.999502
           -0.003          0.000542
           -0.002          0.000044
           -0.001          0.000022
            0.000          0.000019
            0.001          0.000024
            0.002          0.000056
            0.003          0.003167
            0.004          1.999573
            0.005          1.999692
            0.006          1.999724
            0.007          1.999738
            0.008          1.999746
            0.009          1.999751
            0.010          1.999755
            0.011          1.999757
            0.012          1.999759
-----------------------------------------

Obviously something is wrong!
I hope that you could consider this problem serioulsy, checking possible bugs in the code.

I hope to hear from you very soon.

Thanks!

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #11 on: April 1, 2010, 16:34 »
How many k-points do you have in the z-axis of the electrode calculation ?

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #12 on: April 1, 2010, 20:54 »
I tried to perform a standard calculation of the electrode to calculate the energy bands, since there must be a 1-to-1 agreement between these and the transmission spectrum in the ideal zero bias case.

I have found out that using your parameters there is an avoided crossing in the point where a simple nearest neighbor model would make the nanotube metallic. But this is not the case in this simulation. Hence the transmission spectrum also shows that this is the case.

If you want the system to behave metallic in this point, you will need to make some adjustments to your calculation.

For your convenience, I have attached a plot of the avoided crossing.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Possible Bug in the code: dips in the transmittance
« Reply #13 on: April 1, 2010, 22:11 »
Maybe this is not a avoided crossing. But the 3-nearest neighbor model also gives this "avoided crossing".
« Last Edit: April 1, 2010, 22:14 by Nordland »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Possible Bug in the code: dips in the transmittance
« Reply #14 on: April 1, 2010, 23:42 »
I don't think this is an anti-crossing, it's just the way the plotting is done. If you remove the lines, you can (and should, I guess) connect the dots in the opposite way around the Fermi level. With more k-points on the x-axis you could get arbitrarily close to E=0.

@jjhskang: Please post your script used for the calculation. I agree with Nordland it might be the Z k-points. The presence of so many minor dips at several energies (not just E=0) indicates artificial scattering from somewhere.