[Kwant] Updating Kwant
Dear Kwant developers, I want to implement the latest development of Kwant since I want to try to calculate Kubo conductivities with the KPM method (as it appears in the development version of the documentation). I tried to use Conda to update the packages (conda install -c kwant kwant) but I still get the message "AttributeError: module 'kwant.kpm' has no attribute 'conductivity'". Maybe this is not the way to go? Thanks a lot in advance! Bests, Marc Marc Vila Tusell La Caixa - Severo Ochoa PhD in the Theoretical and Computational Nanoscience Group Catalan Institute of Nanoscience and Nanotechnology (ICN2) Barcelona Institute of Science and Technology (BIST) Additional information: https://scholar.google.es/citations?user=h2V4iNIJ&hl=es http://icn2.cat/en/theoretical-and-computational-nanoscience-group https://www.researchgate.net/profile/Marc_Vila_Tusell https://www.becarioslacaixa.net/marc-vila-tusell-BI00042?nav=true https://orcid.org/-0001-9118-421X
Re: [Kwant] Updating Kwant
Hi Marc, If you can wait a little while: we are putting the final touches on a new release of Kwant (1.4). It should be done in under two weeks. Christoph smime.p7s Description: S/MIME cryptographic signature
[Kwant] Berry phase of a system periodic in 1 direction
Dear Kwant users and developers, Is there a way to calculate the integral(< u_nk | d_k(u_nk)>dk) across the 1D BZ of a system periodic in one direction. Here u_nk is the periodic part of the Bloch wave function corresponding to band n. I am trying to compute this for a simple system of graphene nanoribbon. I am trying compute the gauge independent value of the above integral using a "1D Wilsoon loop" where the integral is approximately equal to the product of for all k across the BZ. I defined the unit cell of the nanoribbon as a lead and tried to get the u_nk as the propagating modes using leads.modes() method (I have pasted the code below) but the resolution in k is too large - only 4 momenta across the BZ. How can we get u_n(k) with a good resolution of k, say for 100 points in the BZ ? Is this something which can be easily done in Kwant ? Code: def make_1D_zigzag(N=7,t=1): syst = kwant.Builder(kwant.TranslationalSymmetry(Zigzag.prim_vecs[0])) syst[Zigzag.shape((lambda pos: pos[1] >0 and pos[1] < get_width(N)),(0,0))] = 2*t syst[Zigzag.neighbors()] = -t return syst lead = make_1D_zigzag(N=N,t=2); lead = lead.finalized() prop_modes=lead.modes()[0] u_nk = prop_modes.wave_functions Thanks a lot for your help! Srilok Srinivasan Graduate Student Mechanical Engineering Iowa State University, Ames, IA
Re: [Kwant] Berry phase of a system periodic in 1 direction
Hi, On 2/15/19 6:42 PM, Srilok Srinivasan wrote: > Dear Kwant users and developers, > > Is there a way to calculate the integral(< u_nk | d_k(u_nk)>dk) > across the 1D BZ of a system periodic in one direction. Here u_nk is > the periodic part of the Bloch wave function corresponding to band n. > I am trying to compute this for a simple system of graphene nanoribbon. > > I am trying compute the gauge independent value of the above integral > using a "1D Wilsoon loop" where the integral is approximately equal to > the product of for all k across the BZ. I defined > the unit cell of the nanoribbon as a lead and tried to get the u_nk as > the propagating modes using leads.modes() method (I have pasted the > code below) but the resolution in k is too large - only 4 momenta > across the BZ. 'lead.modes' computes all the modes at a given energy (0 by default). This is probably not what you want. What you really want is to compute the eigenvectors of H(k) for different k. 'kwant.physics.Bands' does this internally, but in Kwant 1.3 it doesn't give you access to the eigenvectors (just an oversight on our part). We're in the process of releasing Kwant 1.4, where Bands has been modified to also return the eigenvectors, so you could wait to use that (you can track our progress here: https://gitlab.kwant-project.org/kwant/kwant/issues/275). Alternatively you can just construct H(k) = h + v exp(ik) + v^dagger exp(-ik) where h is 'lead.cell_hamiltonian()' and v is 'lead.inter_cell_hopping()' and diagonalize it yourself for different values of k. Having said that, you need to be careful. To the best of my knowledge numerical eigensolvers will typically give you the eigenvectors in different gauges at different k values (i.e. there will be an arbitrary phase factor), so naively calculating the derivative using some finite difference scheme might give nonsense (I'm not sure about this, though). Happy Kwanting, Joe signature.asc Description: OpenPGP digital signature
Re: [Kwant] Updating Kwant
Hi Marc, > I want to implement the latest development of Kwant since I want to > try to calculate Kubo conductivities with the KPM method (as it > appears in the development version of the documentation). I tried to > use Conda to update the packages (conda install -c kwant kwant) but I > still get the message"AttributeError: module 'kwant.kpm' has no > attribute 'conductivity'". > Unfortunately the development conda builds have been failing for some time and we didn't get round to fixing it (but Kwant itself still works). As Christoph says, we're in the process of making a release. You can track how we're doing in this issue: https://gitlab.kwant-project.org/kwant/kwant/issues/275. We'll probably be able to fix the development builds as part of/just after the release, but by then you'll be able to get a copy of Kwant 1.4 anyway. Happy Kwanting, Joe signature.asc Description: OpenPGP digital signature