Dear Kwant Developers, I am trying to use KPM conductance method and getting a low precision, complex results and overflow if I put temperature too low. Is there a way to add moments or to improve in other ways? I have tried add_moments, but it produced errors and ate almost all memory. cond = kwant.kpm.conductivity(sys,alpha=component1,beta=component2,params=params) cond.add_moments(100) return cond(mu=energy,temperature=0.002) The LDOS calculation with 10000 moments worked very well in my prior experince. Shall I also add spectrum boundaries by hands (as I did before)? Best wishes, Sergey
Hi Sergey, The error you got is `ValueError: Cannot increase the number of moments if 'accumulate_vectors' is 'False'.`. This error is solved by passing `accumulate_vectors=True` to `kwant.kpm.conductivity()` as ``` cond = kwant.kpm.conductivity(sys,alpha=component1,beta=component2,params=params, accumulate_vectors=True) cond.add_moments(100) ``` Beware that the implementation here is the quickest version in terms of computation time, but is the most expensive in terms of RAM. Both of them scale as `N*M^2`, where N is the Hamiltonian size (total number of orbitals in the system), times the number of moments squared. If before you could do an LDoS with `10^4` moments, the conductivity will use `10^4` times the RAM and computation time, which is a lot for medium to large system sizes, and likely undoable in a laptop, you would need a node in a cluster with dozens or hundreds of GBs of RAM. There are other implementations that discard vectors, and recompute them on-the-fly, this approach takes much less memory and much more computation time, and it is *not* implemented in Kwant. I hope the information helps, best regards, Pablo
participants (2)
-
pablo.perez.piskunow@gmail.com
-
Sergey Slizovskiy