Author Topic: Why so many k-points in the Z direction?  (Read 8634 times)

0 Members and 1 Guest are viewing this topic.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Why so many k-points in the Z direction?
« on: February 19, 2009, 23:28 »
A question popped up on CCL (mailing list for computational chemistry), which has a strong relevance for ATK. The question was (rephrased a bit):

Quote
For a calculation of a systems like [metalic electrode]-[molecule]-[metalic electrode] with molecule along the z axis, some literature references mention k-point parameters like 1x1x100 or 3x3x100 for the Brillouin zone integration. It is surprising, because in interface system like SAM in periodic condition, reasonable k-point parameters are like 8x8x1. Can you explain this difference?

The key point of Atomistix ToolKit (or the TranSIESTA method, which ATK is based on) is that the boundary conditions are not periodic in the z direction. Instead, open boundary conditions are used, in order to apply a voltage across the structure, so that one can compute the electron current under finite bias.

To understand why one needs many Kz-points in this case, assume that you have an ideal system, i.e. the electrodes are identical to the central region. Let HL, HC, HR be the Hamiltonians of the left electrode, central region, and right electrode, respectively. HL, HR are calculated under periodic boundary conditions, while HC is evaluated with open boundary conditions using self-energies obtained from HL and HR.

Now, clearly you will only get integer transmission in this system if HL=HR=HC. To obtain this, the same k-point sampling should be used in
the Kx and Ky directions for the electrode and two-probe calculation. This point is quite trivial.

In the z-direction, however, the two-probe calculation corresponds to an infinite number of Kz points, thus you need a lot of k-points in the
z-direction for the electrode calculation to ensure the same level of accuracy.

Generally, the literature values for Kz (and the VNL default) may be a little conservative, but it is relatively inexpensive since these k-points are only required for the electrode calculation which is the smaller and faster part of the whole computation.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Why so many k-points in the Z direction?
« Reply #1 on: August 3, 2011, 03:39 »
In the z-direction, however, the two-probe calculation corresponds to an infinite number of Kz points, thus you need a lot of k-points in the
z-direction for the electrode calculation to ensure the same level of accuracy.

Generally, the literature values for Kz (and the VNL default) may be a little conservative, but it is relatively inexpensive since these k-points are only required for the electrode calculation which is the smaller and faster part of the whole computation.


Dear Anders Blom,
    This is a very useful topic for the ATK users.
    But I have a puzzle about it.
    You have mentioned "In the z-direction, however, the two-probe calculation corresponds to an infinite number of Kz points", I think the electrode is semi-infinite in the z direction. Since we use a lot of Kz points, why we usually use a smaller Kx,Ky points,3x3x100 for example? Do the Kx,ky equal to the Kz? The electrode as well as the contact region is infinite in the x,y directions. So a similar level of K point sampling should be given. Can you explain it to me ? I will appreciate your explanation.

Best

Guangping

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Why so many k-points in the Z direction?
« Reply #2 on: August 3, 2011, 21:51 »
This doesn't have so much to do with infinite as periodic, viz. period length. But also, to some extent, with numerical practicalities.

In principle you should have infinitely many k-points in any direction that is not confined (for a nanotube or wire along Z you don't need more than 1 point in X/Y). However, that is obviously not possible, we need to use a finite number. Now, as a first consideration, the k-point sampling in X/Y is used not only in the electrode calculation but also for the device calculation. It thus becomes very costly, both in time and memory, to have many k-points, and so you want to use as few as possible. One needs to strike a balance between accuracy and efficiency, however in most cases - fortunately - we use say 3x3 repetitions of the unit cell in X/Y, and it turns out 3x3 or 5x5 k-points provide an excellent description of the electron density. In some materials like Fe you may need 9x9, and for special cases like 2D graphene perhaps a bit higher even (and a multiple of 3, at that).

Now, in the Z direction we can afford more k-points because they only enter into the electrode calculation, which contains rather few atoms and thus isn't that time-consuming or RAM-hungry. That's why, to be on the safe side, we suggest 100 or so. Perhaps in many cases 25 is perfectly sufficient, but it would have a very small influence of the total calculation time anyway.

Finally, the electrodes are indeed semi-infinite. The point, however, is that in the device calculation we assume no periodicity in the Z direction. We can, however, treat the semi-infinite system exactly, under certain assumptions, namely that the electrodes only have non-zero interactions with their nearest neighbor cells (this is why a single period of the electrode in Z is not always enough, such as in the case of a graphene ribbon). In that treatment you are really treating the infinite (ok, semi-infinite) or aperiodic problem and thus the Fermi level that comes out of that calculation is based, essentially, on an infinite k-point sampling.

One of the things that can cause convergence problems is, if the Fermi levels of the electrodes - which are determined from the electrode calculations - don't match properly the device calculation Fermi level, used to populate the states in the central region in the non-equilibrium condition (and even under zero bias). Therefore, the more k-points in the Z direction the better, to avoid a mismatch. And, we can afford it, as described above, so there's no point in skimping there.

In X/Y, however, we always use the same k-point sampling both for the electrode and the device, and thus no mismatch can occur. The number of X/Y k-points therefore becomes a pure accuracy parameter - the more you have, the better accuracy, but it also costs in time/memory. The X/Y k-points shouldn't really hamper convergence, as the KZ points can, unless you have way too few, and the Fermi level ends up somewhere it really doesn't belong, of course.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Why so many k-points in the Z direction?
« Reply #3 on: August 4, 2011, 19:38 »
Dear Anders Blom,

Thanks you very much for your detailed reply.
There is indeed no reply better than that of yours on this issue.

However, there is something misunderstanding from part of your reply.

Quote
We can, however, treat the semi-infinite system exactly, under certain assumptions, namely that the electrodes only have non-zero interactions with their nearest neighbor cells (this is why a single period of the electrode in Z is not always enough, such as in the case of a graphene ribbon).

I understand the rule to keep there are non-zero interactions only between the nearest neighbor cells. But what do you mean by "his is why a single period of the electrode in Z is not always enough"? Is this mean to use a smallest cell of the meterial is always not enough to construct the cell of the electrode? For instance, Au(111), ABC should be the samllest cell in the z direction. And in order to keep non-zero interactions only between the nearest neighbor cells, the cell for electrode should be ABCABC? If so, I think whether there are non-zero interactions only between the nearest neighbor cells or not, this is a matter that depends on the size of the basis. For example, if ABC for Au is enough for SZP basis, maybe it is not enough for DZP basis. So it is needed to investigate carefully. I saw in VNL-2008.10, there is some information like "Second order matrix elements will be igored", I only know, this means it is not precisely no interaction between the cell and its second nearest. I wonder to know what does it mean by "second order matrix". Further more, how we can know there is precisely (based on a given precision) no interation between the cell and its second nearest cell in practical calculation at on a given basis set?

Now return to the k point sampling. I think the band structre of the electode is very important to the transport results. So I think we could use the convergence of the band structure (or Fermi level of the electrode or the DOS of the electrode) to determine whether the k point sampling in each direction is enough. Is this method feasible?


Best regards.

Yours,

Guangping
« Last Edit: August 4, 2011, 19:41 by zhangguangping »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Why so many k-points in the Z direction?
« Reply #4 on: August 5, 2011, 11:41 »
You have a very good understanding of this and ask the right questions. It's a pleasure to discuss it with you.

1. Regarding the size of the electrodes, you are exactly right, it is basis set dependent. To be precise, the relevant quantity is the radius of the orbitals, not the size of the basis set. The different basis sets do have different orbital radii, although the difference is usually small compared to interatomic distances, so if one electrode size is good enough for SZP, it's usually good enough for any basis set. But it's easiest to test with the largest set, DZDP, for safety.

"Second order matrix elements" are contributions to the Hamiltonian arising from the interaction between two atoms via the pseudopotential of a third atom. These are usually quite small.

So, the crucial question: how can we know when the unit cell of the electrode is long enough in Z? There is, fortunately, a relatively easy way: use the Custom Builder available from here (later half).

There is a slightly more stringent way which requires a bit more Python, and also demands that your first perform a self-consistent test calculation of the electrode. I'll return to that in a separate tutorial, on complex band structures.

2. I agree you should use that method in X/Y. In reality, however, these things converge rather slowly in k-points. What you usually observe (at least I have tested it several times for the total energy) is oscillations with a amplitude that goes down slowly when the number of k-points are increased. So if you really want to converge in k-points to some accuracy like 1e-5 or so, you may find you need 25 k-points in X and Y as well, which you can't afford. But in Z we can afford it, and moreover - as described in the previous post - we need the accuracy more strongly there, because we don't have kZ-points in the device. So I rather throw a few extra kZ-points into the electrode for safety and go with 100 - also to actually not have to do the convergence study, which takes time in itself. If things converge well you can be quite sure you have enough kZ points.

Offline zhangguangping

  • QuantumATK Guru
  • ****
  • Posts: 193
  • Country: cn
  • Reputation: 2
    • View Profile
Re: Why so many k-points in the Z direction?
« Reply #5 on: August 6, 2011, 05:09 »
Quote
So, the crucial question: how can we know when the unit cell of the electrode is long enough in Z? There is, fortunately, a relatively easy way: use the Custom Builder available from here (later half).

Dear Anders Blom,

Thanks for your reply very much. It indeed clears out my question. Especially, the sript you written for 11.2 to check the electrode legth. And the mini-tutorial you provide is a very excellent tutorial for the newers as well as the older users to understand some technical methods used for electrode in ATK.

Thank you again for every useful reply to each user.

Best regards.

Guangping