Hi,
OK... I think I should learn Python better. Could You point me to some Python's topic which explains why in the case of syst[graphene.shape(stripe, (0,0))] = onsite _U argument is passed to the 'potential' function, and in the case of lead1[graphene.shape(lead1_shape, (0, 0))] = onsite _U=0 default value is passed to it?
I don't understand what you are asking. You defined a function def onsite( site, _U=0 ): return eps + potential( site, _U ) so in the example code I posted last time I just used the same signature (i.e. with a default for '_U') for my 'lead_onsite' function as you did for your 'onsite' function! Using default values for parameters in your Hamiltonian value functions is probably a bad idea because it's better to be explicit about what parameters you are using to avoid shooting yourself in the foot. Happy Kwanting, Joe