HI,
> > I am trying to reproduce the QHE bar device calculations > > http://nbviewer.jupyter.org/github/topocm/topocm_content/blob/master/w3_pump_QHE/Laughlinargument.ipynb > > > However, I am having difficulty with the onsite and hopping values as > I am using TBModels > > https://github.com/Z2PackDev/TBmodels > > and therefore the values are not the same for all sites. I am unsure of the output format of TBModels. Glancing at their documentation I can't see any way of getting the raw matrix elements from a "Model". Looking into the source code it seems that they are stored in a format that will be annoying to query manually. > The problem is that after the scalar values have been passed on to the > Builder, these will then be overriden when using functions for the > position-dependent Hamiltonian. > > I tried making a deep copy of the model, which would then serve as a > data structure where to draw the scalar values from when calling the > Onsite and Hopping functions. The problem with this is > > a) I am getting a KeyError which I am still not sure why it happens > b) It does not feel very memory-efficient. > > I am wondering if there is another way that this could be done on the > Kwant side that I have not been able to think of. I can't think of a better way to accomplish this. Using TBModels' internal datastructures directly is IMO too much hassle unless your systems are really big. Did you check that the symmetry of your Kwant system and the TBModels Model are compatible? Joe
