![](https://secure.gravatar.com/avatar/1f6ca2de133d0c1dba468959319d4f11.jpg?s=120&d=mm&r=g)
Hi, I want to calculate conductance between two different leads. This is what I have tried: 1. build an empty center area. This does not work because kwant doesn't know how to attach leads to an empty area. 2. use lead_1.attach_lead(lead_2). Kwant.plot does not correctly plot two leads, so I suppose it doesn't work. I don't want to build a center area that is the same with one of the leads, because my system is very large and I suppose this will be time-consuming. Best! Chong Wang Ph. D. candidate Institute of Advanced Study, Tsinghua University, Beijing 100084
![](https://secure.gravatar.com/avatar/f91a084b9135f6cc0828fb97c644dc3c.jpg?s=120&d=mm&r=g)
Hi Chong Wang, You just need to create a scattering region that corresponds to a unit cell of one of the leads. Cheers, Anton On Wed, May 11, 2016 at 1:59 PM, Chong Wang <ch-wang@outlook.com> wrote:
Hi,
I want to calculate conductance between two different leads. This is what I have tried:
1. build an empty center area. This does not work because kwant doesn't know how to attach leads to an empty area.
2. use lead_1.attach_lead(lead_2). Kwant.plot does not correctly plot two leads, so I suppose it doesn't work.
I don't want to build a center area that is the same with one of the leads, because my system is very large and I suppose this will be time-consuming.
Best!
Chong Wang
Ph. D. candidate
Institute of Advanced Study, Tsinghua University, Beijing 100084
![](https://secure.gravatar.com/avatar/c8275c19b5ce84c305f5093973daf5f7.jpg?s=120&d=mm&r=g)
Dear Chong Wang, I suppose that empty scattering centre with leads mean transport takes place between the two reservoirs in ballistic regime; because the leads act as the 1D or 2D conductors without any potential barrier in the path of the transport. In my idea, should we not model such system as a 1D QWR or 2D QW? The unit cell copied from any of the leads would ensure the continuity of the conductor in which ballistic transport without any scattering takes place. Cheers! K.K.Ghosh On Wed, 11 May 2016 17:51:55 +0530 Anton Akhmerov wrote
Hi Chong Wang,
You just need to create a scattering region that corresponds to a unit cell of one of the leads. Cheers, Anton On Wed, May 11, 2016 at 1:59 PM, Chong Wang wrote:
Hi,
I want to calculate conductance between two different leads. This is what I
have tried:
1. build an empty center area. This does not work because kwant doesn't know
how to attach leads to an empty area.
2. use lead_1.attach_lead(lead_2). Kwant.plot does not correctly plot two
leads, so I suppose it doesn't work.
I don't want to build a center area that is the same with one of the leads,
because my system is very large and I suppose this will be time-consuming.
Best!
Chong Wang
Ph. D. candidate
Institute of Advanced Study, Tsinghua University, Beijing 100084
![](https://secure.gravatar.com/avatar/8c242917680bffd3a50af4ae0f1b6c1d.jpg?s=120&d=mm&r=g)
Hi, I want to calculate conductance between two different leads. This is what I
have tried:
1. build an empty center area. This does not work because kwant doesn't know how to attach leads to an empty area.
2. use lead_1.attach_lead(lead_2). Kwant.plot does not correctly plot two leads, so I suppose it doesn't work.
I don't want to build a center area that is the same with one of the leads, because my system is very large and I suppose this will be time-consuming.
I'm afraid that the way Kwant works at the moment means that you will need to build a central system if you want to calculate transport properties! On some level this makes sense, as you need to define how the two leads are coupled. If this is really inhibiting your ability to actually solve problems, then the only short-term solution would be to use Kwant to calculate the modes in the leads and then set up the scattering problem manually. This would probably be exponentially more work for *you*, however. How wide are your leads that this is really a problem? Did you benchmark the runtime? Happy Kwanting, Joe
![](https://secure.gravatar.com/avatar/1f6ca2de133d0c1dba468959319d4f11.jpg?s=120&d=mm&r=g)
Hi, Thanks for the reply. I am calculating a real system, with 32 orbitals per unit cell. Moreover, I need to use supercells so that I can simulate periodical boundary conditions. For example, I want to scatter along x direction. Also, I want z direction to be finite and y direction to be periodical. Since kwant does not allow hoppings beyond nearest unit cell in leads, I have to make a supercell that contains all unit cells in y direction! Best! Chong Wang ________________________________ From: Joseph Weston <joseph.weston08@gmail.com> Sent: Wednesday, May 11, 2016 8:24 PM To: Chong Wang Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] scatter without a center area Hi, I want to calculate conductance between two different leads. This is what I have tried: 1. build an empty center area. This does not work because kwant doesn't know how to attach leads to an empty area. 2. use lead_1.attach_lead(lead_2). Kwant.plot does not correctly plot two leads, so I suppose it doesn't work. I don't want to build a center area that is the same with one of the leads, because my system is very large and I suppose this will be time-consuming. I'm afraid that the way Kwant works at the moment means that you will need to build a central system if you want to calculate transport properties! On some level this makes sense, as you need to define how the two leads are coupled. If this is really inhibiting your ability to actually solve problems, then the only short-term solution would be to use Kwant to calculate the modes in the leads and then set up the scattering problem manually. This would probably be exponentially more work for *you*, however. How wide are your leads that this is really a problem? Did you benchmark the runtime? Happy Kwanting, Joe
![](https://secure.gravatar.com/avatar/8c242917680bffd3a50af4ae0f1b6c1d.jpg?s=120&d=mm&r=g)
Hello again, I am calculating a real system, with 32 orbitals per unit cell. Moreover, I
need to use supercells so that I can simulate periodical boundary conditions. For example, I want to scatter along x direction. Also, I want z direction to be finite and y direction to be periodical. Since kwant does not allow hoppings beyond nearest unit cell in leads, I have to make a supercell that contains all unit cells in y direction!
Ok, I think we've got mixed in our nomenclature somewhere. My basic question still stands, though. Have you tried doing as Anton and I suggested and just putting a single "slice" of one of the leads as a central region, and seeing how long it takes to compute whatever you are interested in? This solution is the easiest, and my guess is that the cost will not be inhibitive. Joe
![](https://secure.gravatar.com/avatar/1f6ca2de133d0c1dba468959319d4f11.jpg?s=120&d=mm&r=g)
Thanks again:) I have (stupidly) tried to copy two slices in central region (one for each lead). After 3 hours, the memory blows up. My workstation has 128Gb DDR4 memory. (kwant is compiled against mumps 5.0.1 and multithreading is working) I am now trying to use only one slice in central region and I will keep you informed whether this will work. Best! Chong Wang ________________________________ From: Joseph Weston <joseph.weston08@gmail.com> Sent: Wednesday, May 11, 2016 8:44 PM To: Chong Wang Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] scatter without a center area Hello again, I am calculating a real system, with 32 orbitals per unit cell. Moreover, I need to use supercells so that I can simulate periodical boundary conditions. For example, I want to scatter along x direction. Also, I want z direction to be finite and y direction to be periodical. Since kwant does not allow hoppings beyond nearest unit cell in leads, I have to make a supercell that contains all unit cells in y direction! Ok, I think we've got mixed in our nomenclature somewhere. My basic question still stands, though. Have you tried doing as Anton and I suggested and just putting a single "slice" of one of the leads as a central region, and seeing how long it takes to compute whatever you are interested in? This solution is the easiest, and my guess is that the cost will not be inhibitive. Joe
![](https://secure.gravatar.com/avatar/8c242917680bffd3a50af4ae0f1b6c1d.jpg?s=120&d=mm&r=g)
Hi again,
I have (stupidly) tried to copy two slices in central region (one for each lead). After 3 hours, the memory blows up. My workstation has 128Gb DDR4 memory. (kwant is compiled against mumps 5.0.1 and multithreading is working)
This is not probably not normal. I don't think reducing the problem size by 50% is going to help you; how many degrees of freedom do you have in 1 lead slice?! i.e. what is the dimension of the matrix returned by `lead.cell_hamiltonian()`? Joe
![](https://secure.gravatar.com/avatar/1f6ca2de133d0c1dba468959319d4f11.jpg?s=120&d=mm&r=g)
Hi, `lead.cell_hamiltonian()` gives 32000. The thickness of my slab is 50. Is this something not possible to calculate? Best! Chong Wang ________________________________ From: Joseph Weston <joseph.weston08@gmail.com> Sent: Wednesday, May 11, 2016 9:02 PM To: Chong Wang Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] scatter without a center area Hi again, I have (stupidly) tried to copy two slices in central region (one for each lead). After 3 hours, the memory blows up. My workstation has 128Gb DDR4 memory. (kwant is compiled against mumps 5.0.1 and multithreading is working) This is not probably not normal. I don't think reducing the problem size by 50% is going to help you; how many degrees of freedom do you have in 1 lead slice?! i.e. what is the dimension of the matrix returned by `lead.cell_hamiltonian()`? Joe
![](https://secure.gravatar.com/avatar/8c242917680bffd3a50af4ae0f1b6c1d.jpg?s=120&d=mm&r=g)
Hi,
`lead.cell_hamiltonian()` gives 32000. The thickness of my slab is 50. Is this something not possible to calculate?
Ok, now it certainly makes sense that the memory blows up; the kwant paper[1] indicates that the memory requirement for solving this sort of size should be ~ 100GB. Anton reminded me of a workaround written by Christoph for dealing with periodic systems. You can find the code over here[2] (if you don't want to download it using git you can get the raw python module here[3]). You should be able to use this instead of replicating your unit cell in the y direction, which should drastically reduce your memory/runtime requirements. Thanks, Joe [1]: http://downloads.kwant-project.org/doc/kwant-paper.pdf [2]: https://gitlab.kwant-project.org/cwg/wraparound [3]: https://gitlab.kwant-project.org/cwg/wraparound/raw/master/wraparound.py
![](https://secure.gravatar.com/avatar/1f6ca2de133d0c1dba468959319d4f11.jpg?s=120&d=mm&r=g)
Thanks for your reply. In the kwant paper, I think fig 7 indicates ~1000GB memory is needed for such a system. Also, I only replicated my unit cell twice in the y direction. It seems that I need to figure out some tricks to work around this. Chong ________________________________ From: Joseph Weston <joseph.weston08@gmail.com> Sent: Wednesday, May 11, 2016 9:53 PM To: Chong Wang Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] scatter without a center area Hi, `lead.cell_hamiltonian()` gives 32000. The thickness of my slab is 50. Is this something not possible to calculate? Ok, now it certainly makes sense that the memory blows up; the kwant paper[1] indicates that the memory requirement for solving this sort of size should be ~ 100GB. Anton reminded me of a workaround written by Christoph for dealing with periodic systems. You can find the code over here[2] (if you don't want to download it using git you can get the raw python module here[3]). You should be able to use this instead of replicating your unit cell in the y direction, which should drastically reduce your memory/runtime requirements. Thanks, Joe [1]: http://downloads.kwant-project.org/doc/kwant-paper.pdf Kwant: a software package for quantum transport<http://downloads.kwant-project.org/doc/kwant-paper.pdf> downloads.kwant-project.org Kwant: a software package for quantum transport Christoph W. Groth,1 Michael Wimmer,2 Anton R. Akhmerov,2,3 and Xavier Waintal1 1CEA-INAC/UJF Grenoble 1, SPSMS UMR-E ... [2]: https://gitlab.kwant-project.org/cwg/wraparound [3]: https://gitlab.kwant-project.org/cwg/wraparound/raw/master/wraparound.py
![](https://secure.gravatar.com/avatar/0725ee8d9569075b9ca5372a36683687.jpg?s=120&d=mm&r=g)
Hi Chong Wang, For an example use of wraparound please see this notebook: https://github.com/topocm/topocm_content/blob/master/w6_3dti/bhz.ipynb Here we have a 2D slab connected to a 3D infinite system, the relevant code is in make_scatter_sys. Best, Bas Nijholt On Wed, 11 May 2016 at 16:47 Chong Wang < mailto:Chong Wang <ch-wang@outlook.com>
wrote:
<!-- P {margin-top:0;margin-bottom:0;} --> Thanks for your reply. In the kwant paper, I think fig 7 indicates ~1000GB memory is needed for such a system. Also, I only replicated my unit cell twice in the y direction. It seems that I need to figure out some tricks to work around this. Chong From: Joseph Weston <joseph.weston08@gmail.com> Sent: Wednesday, May 11, 2016 9:53 PM To: Chong Wang Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] scatter without a center area Hi, `lead.cell_hamiltonian()` gives 32000. The thickness of my slab is 50. Is this something not possible to calculate? Ok, now it certainly makes sense that the memory blows up; the kwant paper[1] indicates that the memory requirement for solving this sort of size should be ~ 100GB. Anton reminded me of a workaround written by Christoph for dealing with periodic systems. You can find the code over here[2] (if you don't want to download it using git you can get the raw python module here[3]). You should be able to use this instead of replicating your unit cell in the y direction, which should drastically reduce your memory/runtime requirements. Thanks, Joe [1]: http://downloads.kwant-project.org/doc/kwant-paper.pdf http://downloads.kwant-project.org/doc/kwant-paper.pdf downloads.kwant-project.org Kwant: a software package for quantum transport Christoph W. Groth,1 Michael Wimmer,2 Anton R. Akhmerov,2,3 and Xavier Waintal1 1CEA-INAC/UJF Grenoble 1, SPSMS UMR-E ... [2]: https://gitlab.kwant-project.org/cwg/wraparound [3]: https://gitlab.kwant-project.org/cwg/wraparound/raw/master/wraparound.py
participants (5)
-
Anton Akhmerov
-
Bas Nijholt
-
Chong Wang
-
Joseph Weston
-
kamal ghosh