Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Anders Blom

Pages: 1 ... 342 343 [344] 345 346 ... 362
5146
This question highlights an important conceptual point about the way ATK calculated two-probe systems under bias, which I would like to take a second to comment on in more detail.

The simplest, and perhaps most common way to compute the I-V curve for a tunneling device is precisely like was attempted above: to first compute the zero-bias transmission, and then just integrate the transmission spectrum over an increasingly broad "bias window" to get the current. This works fine, in some sense, and is called the linear response current. However, it only gives accurate results under one crucial assumption: that the transmission spectrum is not influenced by the bias. In many cases this assumption is valid, in others it is just assumed, without proof (often because there is no simple way to check it).

There are however many situations where the transmission spectrum T(E) itself depends strongly on the applied bias. The uniqueness of ATK lies in its ability to compute T(E) self-consistently under an applied finite bias.

To do this you must, exactly like serhan shows, include the bias in the actual self-consistent calculation. In this way, the bias will be included in the self-consistent electrostatic potential, and consequently in the electron density and the density matrix, which in turn are used to compute the transmission.

Newer versions (later than 2008.02) of ATK actually also include a method to compute the linear response current, which works almost as you tried to do, artingchen. To use this function, you must however first import a module called ATK.Future, and instead of calling calculateCurrent() you use a different function. A rewritten version of your original attempt that utilizes this function would be as below.

I have made this is as a standalone analysis task, loading an already converged calculation from the checkpoint file.

Code
from ATK.TwoProbe import *
import numpy
from ATK.Future import calculateLinearResponseCurrent
from ATK.MPI import processIsMaster

scf = restoreSelfConsistentCalculation ('my_calculation.nc')

my_voltages = numpy.linspace(-4.0, 4.0, 100)*Volt
lr_currents = calculateLinearResponseCurrent(
    self_consistent_calculation = scf,
    voltages = my_voltages,
    brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
    green_function_infinitesimal = 1.0e-5*electronVolt,
    number_of_points = 100
)

if processIsMaster():
    file = VNLFile ('linear_response_current.vnl')
    print 'Bias (V)\tCurrent (A)'
    for i in range(len(my_voltages)):
        print my_voltages[i].inUnitsOf(Volt), '\t', lr_currents[i].inUnitsOf(Ampere)
        file.addToSample(lr_currents[i], 'twoprobe_configuration', 'Current at %g V bias' % my_voltages[i].inUnitsOf(Volt))

Note that all voltages are given at once, instead of looping over them. I have also made use of the very nice NumPy function linspace() instead of arange() which is a tricky function.

Oh, and I reduced the number of points between -4 and +4 V from 400 to 100. Note that if you want to (and you do want to!) go by serhan's approach, the best approach is always to start by 0 V bias,.

For more details, see the manual page for the function calculateLinearResponseCurrent().

Do note, however, that calculating the current in this way may not give the correct result, if, as mentioned above, the transmission does depend on the bias. And the only way to find out if it does it to compute it... Still, the linear response current can be useful as a first quick test to get an overview. It is however always crucial to also study the details of the transmission spectrum, also at finite bias.

5147
General Questions and Answers / Re: Smearing the I-V curve
« on: April 27, 2009, 14:12 »
Ok, it looks pretty much like I suspected :)

First, I'm wondering whether the actual current is that relevant in this case. The resonance is very sharp and has a reasonable value (not like 0.01), but probably does not change much at all with bias. Therefore, you may not need to spend a lot time computing the current extremely accurately; it seems to me the effect you are looking for is not in the I-V curve but the position of the resonance itself, its height, the difference between spin up/down, how the peak changes when you modify the structure, etc.

The fluctuations in the current are almost certainly due to poor accuracy in the integration. Taking the above point into account, if you are really concerned with the precise value of the current, you need to integrate the transmission spectrum more accurately. However, since the peak is quite sharp, it will be very inefficient to just increase the number of points to a huge value, since most of the points will be in the areas of zero transmission anyway. What you need an adaptive integration routine, that puts more points in the region of the peak, and fewer outside it.

Fortunately for you, I recently wrote such a routine :-)

I'll be happy to share it with you, perhaps, for now, off the Forum, however, since it's not 100% finalized (anyone else who is interested in it are most welcome to contact me!).

However, again: even if you were able to compute the current extremely accurately, I think it will just show a linear increase, which is the bias window "background". The real physics here lies, as I see it, elsewhere, and not in the I-V curve.

5148
General Questions and Answers / Re: Smearing the I-V curve
« on: April 27, 2009, 12:22 »
If the transmission spectrum is zero then the current will be zero :)

But I guess T(E) is not exactly zero, just very small. In that case, I guess the current integration can have a large effect on the results. Can you post an example of the transmission spectrum, at two different biases? Perhaps in log-scale.

5149
General Questions and Answers / Re: Smearing the I-V curve
« on: April 27, 2009, 11:26 »
What is red vs black curve?

How different are the transmission spectra?

One should also note that the current integration routine in ATK is not extremely accurate numerically. So another point that would affect the current values at the level of accuracy you are looking at would be the number of points in the current integration.

5150
General Questions and Answers / Re: Choice of basis
« on: April 26, 2009, 23:10 »
As a general rule, to add the above considerations, I would never use SZ for real calculations, unless I was really forced to by memory constraints. There is just too little freedom both radially and angularly to properly describe bonds except in very spherically symmetric cases.

For several elements (specifically, those with a full shell as the valence), ATK will in fact refuse to run a SZ calculation since it will converge very poorly, if at all.

My rule of thumb is: SZP as a work-horse when trying things out, and most of the time for C-based systems, and DZP whenever I can afford it otherwise. DZ can sometimes be a good alternative to SZP if the geometry is close to "elemental". The difference between DZDP and DZP is rarely important; other errors like exchange-correlation functional are probably larger.

5151
General Questions and Answers / Re: ATKError: bad allocation
« on: April 26, 2009, 22:12 »
Is the error really exactly like you wrote?
In that case, it might not be an out-of-memory error after all (which is St9bad_alloc), but rather something else (like over-lapping atoms).
On the other hand, if you are running it properly now, let's hope it was a spurious thing, perhaps. Let us know if it appears again, and regularly.

Good luck with your calculations!

5152
Although I haven't seen the geometry, my guess is that the electrode is too short. If it's only 1 period, or even 2, this is too short and will, even if the calculation converges (which is sometimes hard, when the electrodes are too short), lead to the wrong results.

It was observant of you to note the charges, but you would probably have seen it very clearly in the transmission spectrum later. This is an ideal system, but I would not be surprised if the transmission spectrum comes out less than perfect (not integer plateaus).

So, increase the electrodes (use 4 periods) and let's see what happens!

5153
General Questions and Answers / Re: ATKError: bad allocation
« on: April 24, 2009, 09:25 »
The error means "out of memory", so you did the right thing to reduce the calculation size. Is there any chance you are running several MPI processes in parallel on the same computer? That is, you run in parallel but only have, say, a quad-core, or you use more MPI nodes than physical CPUs? That will put a much smaller limit on the max size of the calculation.

Where does it fail, in the two-probe part or in the electrode calculation? If it's in the two-probe (or equivalent bulk, when included), then changing kz points will not make a difference. How many kx/ky points? How many atoms in total?

Perhaps best to post the script + output, if you are comfortable doing so. You can mask the atom list if needed (replace all atoms by Hydrogen, or something). We just need to see the parameters and get an idea of the size of the system.

5154
General Questions and Answers / Re: "Killed signal 9" error
« on: April 23, 2009, 21:05 »
Upgrading to MPICH2 1.0.8 is probably always a good idea, and I hope it solves your problem. Otherwise, these MPI errors are a bit mysterious, and sometimes not reproducible. And when they are, they are not easy to solve...

5155
Please post the complete output file, it makes it easier to see exactly where the electrons are (if you used verbosity 10), or at least if there is a substantial difference in the equivalent bulk run compared to the two-probe part.

5156
News and Announcements / LaTeX on the Forum!
« on: April 23, 2009, 09:21 »
You can now use [tex]\LaTeX[/tex] equations on this Forum! The syntax is simple, just enclose the LaTeX formula in

Code
[ tex ]...[ /tex ]

(without the spaces, they are inserted to prevent the tags from actually rendering TeX code!)

Some examples:

[tex]\blue\Large      e^x=\sum_{n=0}^\infty\frac{x^n}{n!}[/tex]

There is even an interactive editor for equations! Click the last icon in the second button row (the blue one, to the right of the "list" icon)!

More examples to come (for now, see http://www.yourmathstutor.info/forum/index.php?topic=4.0, which uses the same technique as we do)!

5157
General Questions and Answers / Re: "Killed signal 9" error
« on: April 23, 2009, 09:11 »
Strictly speaking this is an MPI error, not an ATK error. It might indicate a network problem, which may be spurious or not. So, try to resubmit the calculation and see if it fails in the same point again.

5158
General Questions and Answers / Re: Confused on optimization
« on: April 23, 2009, 09:10 »
There are many approaches to optimizing systems, and two-probes are particularly tricky since they are made up of several parts.

The simplest, but also most time-consuming way is to make us of the equivalent bulk, as discussed above. Another is to pre-optimize the individual parts and then assume that nothing much happens when they are put together. For instance, if your problem is a nanotube with a defect, between metal electrodes, you may want to simplify the problem by optimizing the defect locally, in a smaller nanotube setting, and then assume the rest of the tube + the metal surfaces are perfect.

Or, if the contact properties of a nanotube with a metal surface are under investigation, you may assume that the tube and the surface are intact themselves, but their relative position may change. In this case you have to move the tube around on the surface in a clever, systematic way, to find the optimum. Or, as is probably more relevant, simply move it around more or less at random and do many calculations of the current, and then do a statistical analysis of the results (the current, for instance), since the real position of such a tube/metal interface will probably not be absolutely stable in an experimental setting anyway.

And so on :)

5159
There are some software tools out there which can convert different pseudopotential formats between each other. Google something like "upf psf convert pseudopotential".

5160
Theoretically this should be quite possible, if you can match the individual grids, etc. Just try :)

The difference in the two files lies in the exchange-correlation:
PZ = LDA Perdew-Zunger
PBE = GGA Perdew-Burke-Ernzerhof

Pages: 1 ... 342 343 [344] 345 346 ... 362