Author Topic: Is the negative current meaningful?  (Read 9160 times)

0 Members and 1 Guest are viewing this topic.

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Is the negative current meaningful?
« on: May 6, 2009, 04:33 »
Dear all,
    I run two-probe calculation of semi-conduct and got:

#I-V    Bias (Volt)     Current (Ampere)
#I-V    0.0             -0.00e+00
#I-V    0.1             1.08e-21
#I-V    0.2             9.37e-21
#I-V    0.3             -1.84e-17

     The converged charge q of each bias was:
# sc  1 : q =   -0.01908 e  Ebs = -24740.01518 Ry  dRho =  7.0103E-09
# sc  6 : q =   -0.01896 e  Ebs = -24728.50615 Ry  dRho =  3.2187E-07
# sc  6 : q =   -0.01864 e  Ebs = -24696.21142 Ry  dRho =  3.0930E-07
# sc  6 : q =   -0.01822 e  Ebs = -24667.42614 Ry  dRho =  8.5732E-07

      Is the negative current of the bias of 0.3V meaningful? Why the sign is different from 0.1 and 0.2 V?
      Thanks!

Frsy

Parameters used:
    electrode_constraint = ElectrodeConstraints.Off,
    initial_density_type = InitialDensityType.EquivalentBulk
    green_function_infinitesimal = 1.0e-5*electronVolt,
    number_of_points = 100
« Last Edit: May 6, 2009, 04:37 by frsy »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5411
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Is the negative current meaningful?
« Reply #1 on: May 6, 2009, 05:02 »
None of these calculations have converged to a meaningful state, so the current is also wrong. Well, it's zero (1e-21 Ampere is zero) as expected since there are no electrons in the system any more (q is also zero, almost).

This is one of the most usual problems in calculations, and there are many discussions on the Forum how to cure the problem (search for "zero charge"). Most important is to have a wide enough electrode, after that to have enough k-point sampling and perhaps increase the temperature.

If you post the geometry and parameters, we can perhaps give more direct tips on where to improve it. Also see the Tutorial on how to converge FeMgO for specific hints on avoiding charge run-away.
« Last Edit: May 6, 2009, 05:04 by Anders Blom »

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #2 on: May 6, 2009, 08:32 »
Please take a look on my input files. Thank you!

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Is the negative current meaningful?
« Reply #3 on: May 6, 2009, 08:45 »
In your case the current is simply zero and you have a problem with the convergence, however there is not something wrong with a negative current.

In ATK a positive current is a flow of electrons from the left electrode to the right electrode through the scattering region,
an negative current is a flow of electrons from the right electrode to the left electrode.

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #4 on: May 6, 2009, 08:59 »
Could you tell me where is the convergence problem and how to overcome it? All dRho are less than 1E-6. Is this not sufficient?
I guess you mean my current is negatively small so the sign is also negative? It can be treated as zero?
My right electode has higher voltage than the left one. So I suppose the current should flow from right to left.
Thank you!

In your case the current is simply zero and you have a problem with the convergence, however there is not something wrong with a negative current.

In ATK a positive current is a flow of electrons from the left electrode to the right electrode through the scattering region,
an negative current is a flow of electrons from the right electrode to the left electrode.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Is the negative current meaningful?
« Reply #5 on: May 6, 2009, 13:07 »
All the current reported here, is zero. However non of them are a correct result, as all the electrons has left the system.
dRho converged to 1e-6 is very good, unless we have lost all our charge.

For standard normal DFT there exist only one unique minimum and technical no fix points. If the convergence hits a fix points, it will remain in this subspace,
unable to iterate away from it. Therefore if we encounter a fix point, we have a problem as we will not get correct results, but it might appear to be converged.

For standard normal DFT there exist only a very exotic fix point, and it is created by starting a spin-polarized calculation in an exactly unpolarized conditions.
In NEGF-DFT there is another fix point, and it happens somewhat more often - it is the zero charge fix point. If the system loses all it electrons, it is a fix point in terms
of convergence, and no matter how much we iterate we will not be able to move away from this subspace.

The solution is therefore quite straight forward for normal DFT - dont use an unpolarized density for polarized calculation.
The solution for NEGF is somewhat more complex, but the general idea is that we need to make sure that system will behave nicely and ensure that charge flushing will not occour.
I recommend reading the tutorial on Fe-MgO-Fe as it has alot of good tips on how to avoid hitting this fix point.

I will also if I get sometime off, try to take alook at your system to see if I can see what is wrong with it.

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #6 on: May 6, 2009, 15:16 »
Thanks for your suggestion. Now I believe it is related to the contour parameter. I will try on these parameters. Thank you again!

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Is the negative current meaningful?
« Reply #7 on: May 7, 2009, 09:45 »
Hey frsy.

I am playing around with your system, but do you by any chance have the input file for generating a bulk anatase crystal?

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #8 on: May 8, 2009, 12:02 »
Hi Nordland!
Sure. I wrote a script to generate the bulk.
Acturally, I'm testing integral_lower_bound these days and still have the problem. I have increase the integral_lower_bound to 100 Ry! Do you think it is reasonable? Could you give me more hints?

My input parameters:
two_probe_algorithm_parameters = twoProbeAlgorithmParameters(
    electrode_constraint = ElectrodeConstraints.Off,
    initial_density_type = InitialDensityType.NeutralAtom
)

energy_contour_integral_parameters = energyContourIntegralParameters(
    circle_points = 10,
    integral_lower_bound = 100.0*Rydberg,
    fermi_line_points = 10,
    fermi_function_poles = 4,
    real_axis_infinitesimal = 0.05*electronVolt,
    real_axis_point_density = 0.005*electronVolt
)

I know I should increase circle_points as well but I keep it small to speed-up the test calculation.
« Last Edit: May 8, 2009, 12:11 by frsy »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Is the negative current meaningful?
« Reply #9 on: May 8, 2009, 15:39 »
The lower bound and number of cycle points must go hand in hand, or else your sampling in the semi-circle will be very bad. However with that said, I think that 100 Ry is overkill - I would try the follow things:

1) Increase the temperature of the electrode to 1500 K
2) Choose the electrode constraint DensityMatrix ( if you have access to ATK 2008.10)
3) Check in anatase bulk calculation what the mesh cutoff means to convergence of a simple bulk system - if it alerts convergence for the small test bulk, then I would increase it in the twoprobe calculation.
4) Finally you use 1 k-points in one axis and 5 in the other. I would double them both to 2 and 10 - But it cost in terms of speed, however it is much more likely that you will converge in few steps, and hence no performance is lost.

You could try posting the log of the first 5 steps - somethimes it reveals why we loose the charge....

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #10 on: May 11, 2009, 03:38 »
I run several test, results are:
==================================
1)
    diagonal_mixing_parameter = 0.02,
    circle_points = 30,
    integral_lower_bound = 5*Rydberg,
    temperature = 2300.0*Kelvin

# sc  0 : q = 1023.99998 e
# sc  1 : q = 1424.96286 e  Ebs = -1824.70842 Ry  dRho =  1.8823E+00
# sc  2 : q =   67.28392 e  Ebs = -268.56841 Ry  dRho =  5.8137E+00
# sc  3 : q =  997.65331 e  Ebs = -1080.35030 Ry  dRho =  5.7394E+00
# sc  4 : q = 1024.48027 e  Ebs = -1112.94082 Ry  dRho =  2.7321E-01
# sc  5 : q = 1024.80998 e  Ebs = -1114.54109 Ry  dRho =  1.2772E-02
# sc  6 : q = 1032.20929 e  Ebs = -1154.62139 Ry  dRho =  3.0259E-01
# sc  7 : q = 1033.34392 e  Ebs = -1155.60353 Ry  dRho =  3.7512E-02
# sc  8 : q = 1074.61108 e  Ebs = -1206.45366 Ry  dRho =  3.2210E-01
# sc  9 : q = 1029.26668 e  Ebs = -1133.62307 Ry  dRho =  3.9532E-01
# sc 10 : q = 1024.56511 e  Ebs = -1106.89669 Ry  dRho =  1.3442E-01

2)
    diagonal_mixing_parameter = 0.04,
    circle_points = 10,
    integral_lower_bound = 5*Rydberg,
    temperature = 1300.0*Kelvin

# sc  0 : q = 1023.99998 e
# sc  1 : q = 1416.92054 e  Ebs = -1809.88553 Ry  dRho =  1.8825E+00
# sc  2 : q =   -7.91299 e  Ebs =  219.11140 Ry  dRho =  5.0023E+00
# sc  3 : q =  325.77001 e  Ebs = -722.91447 Ry  dRho =  4.3750E+00
# sc  4 : q = 1014.75194 e  Ebs = -1093.09579 Ry  dRho =  1.6451E+00
# sc  5 : q =  555.21092 e  Ebs = -876.94929 Ry  dRho =  1.5533E+00
# sc  6 : q = 1031.17532 e  Ebs = -1208.11968 Ry  dRho =  1.5766E+00
# sc  7 : q = 1030.46475 e  Ebs = -1194.04483 Ry  dRho =  1.3626E-02
# sc  8 : q =  904.69175 e  Ebs = -1020.76841 Ry  dRho =  7.4575E-01
# sc  9 : q = 1024.13101 e  Ebs = -1119.55928 Ry  dRho =  6.4285E-01
# sc 10 : q = 1032.82502 e  Ebs = -1172.37789 Ry  dRho =  2.3929E-01

3)
    diagonal_mixing_parameter = 0.02,
    circle_points = 10,
    integral_lower_bound = 3*Rydberg,
    temperature = 3300.0*Kelvin

# sc  0 : q = 1023.99998 e
# sc  1 : q = 1431.47477 e  Ebs = -1833.10160 Ry  dRho =  1.8823E+00
# sc  2 : q =   58.95118 e  Ebs = -263.23412 Ry  dRho =  5.7266E+00
# sc  3 : q =  974.75854 e  Ebs = -1072.06407 Ry  dRho =  5.6481E+00
# sc  4 : q = 1014.49430 e  Ebs = -1102.57788 Ry  dRho =  3.3595E-01
# sc  5 : q = 1020.13938 e  Ebs = -1114.65361 Ry  dRho =  3.2280E-02
# sc  6 : q = 1028.65257 e  Ebs = -1164.17669 Ry  dRho =  1.1267E-01
# sc  7 : q = 1030.59839 e  Ebs = -1184.38413 Ry  dRho =  5.4742E-02
# sc  8 : q = 1085.91052 e  Ebs = -1221.19005 Ry  dRho =  4.6196E-01
# sc  9 : q = 1046.19352 e  Ebs = -1191.34863 Ry  dRho =  2.5427E-01
# sc 10 : q = 1169.38366 e  Ebs = -1228.02015 Ry  dRho =  7.4900E-01
# sc 11 : q = 1124.50035 e  Ebs = -1229.82123 Ry  dRho =  3.0367E-01
# sc 12 : q = 1025.19517 e  Ebs = -1127.48006 Ry  dRho =  7.0523E-01
# sc 13 : q = 1022.83390 e  Ebs = -1116.01107 Ry  dRho =  3.1471E-02
========================================================

q is close to original charge but dose not converge. Is this normal? Pelase give me more hints. Thanks!
« Last Edit: May 11, 2009, 03:42 by frsy »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5411
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Is the negative current meaningful?
« Reply #11 on: May 11, 2009, 03:45 »
It is highly normal that difficult calculations require upwards of 25-50 iterations to converge. So, at least 2 of your attempts are promising (the one with negative q is questionable).

So, you just need some more patience, hopefully! :)

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #12 on: May 12, 2009, 10:20 »
Hi Blom! It takes too many steps. Should I wait or do some thing?

# sc  0 : q = 1023.99998 e
# sc  1 : q = 1431.47477 e  Ebs = -1833.10160 Ry  dRho =  1.8823E+00
# sc  2 : q =   58.95118 e  Ebs = -263.23412 Ry  dRho =  5.7266E+00
# sc  3 : q =  974.75854 e  Ebs = -1072.06407 Ry  dRho =  5.6481E+00
# sc  4 : q = 1014.49430 e  Ebs = -1102.57788 Ry  dRho =  3.3595E-01
# sc  5 : q = 1020.13938 e  Ebs = -1114.65361 Ry  dRho =  3.2280E-02
# sc  6 : q = 1028.65257 e  Ebs = -1164.17669 Ry  dRho =  1.1267E-01
# sc  7 : q = 1030.59839 e  Ebs = -1184.38413 Ry  dRho =  5.4742E-02
# sc  8 : q = 1085.91052 e  Ebs = -1221.19005 Ry  dRho =  4.6196E-01
# sc  9 : q = 1046.19352 e  Ebs = -1191.34863 Ry  dRho =  2.5427E-01
# sc 10 : q = 1169.38366 e  Ebs = -1228.02015 Ry  dRho =  7.4900E-01
.....................
# sc 66 : q = 1026.06189 e  Ebs = -1125.28519 Ry  dRho =  2.2362E-02
# sc 67 : q = 1029.73697 e  Ebs = -1161.02460 Ry  dRho =  3.5764E-02
# sc 68 : q = 1030.20989 e  Ebs = -1168.02970 Ry  dRho =  2.4595E-02
# sc 69 : q = 1029.17963 e  Ebs = -1153.29370 Ry  dRho =  1.8653E-02
# sc 70 : q = 1031.50257 e  Ebs = -1181.27999 Ry  dRho =  2.7415E-02
# sc 71 : q = 1030.84315 e  Ebs = -1171.56700 Ry  dRho =  2.0024E-02

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5411
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Is the negative current meaningful?
« Reply #13 on: May 13, 2009, 05:03 »
Yeah, it happens...

This is clearly a quite tricky system you have, so it will require some clever tuning of the parameters to get it to converge. That's a bit of an art, sometimes, for difficult systems.

Did you increase the k-point sampling? Also, so far it seems we haven't discussed the importance of k-point sampling, and - most importantly, perhaps! - the width of the electrodes. If your electrodes are too thin, the result is often bad convergence. The same if the k-point sampling is too low.

I will be offline for a while due to travels, hope the points above bring some improvements.

Offline frsy

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: Is the negative current meaningful?
« Reply #14 on: May 18, 2009, 11:17 »
Dear Dr. Blom,
    After so long running (including restarting) it converged finally. Thanks for your help. But the convergence is done at high electron temperature (3000 K), do I need restart at the low electron temperature by using initial_calculation=scf?
    Regards,
Frsy