Dear Christoph, Thank you so much for your email and for your advice. I have attached the full code for my carbon nanotube system (simplified slightly) which, when run, should output the animation I have also attached. The system is evolved for 5 time steps over a short period of time (0 to 0.5e-8s). It seems that when I increase the number of lattice points, the probability density function becomes 'spiky' over time and the resolution of the graph deteriorates. However, this might just be a problem with my code. Thank you again for any help with this. Best wishes, Isobel ________________________________ From: Christoph Groth Sent: Thursday, December 01, 2022 15:34 To: Clarke, Isobel Cc: kwant-discuss@python.org; Buitelaar, Mark Subject: Re: [Kwant] Resolution of Tkwant Clarke, Isobel wrote:
I was wondering if there is a limit on the resolution of Kwant and Tkwant when calculating the density of an evolved wavefunction.
Hi, I’m not aware of any particular issue where a Tkwant simulation “explodes” after some time. Obviously, the numerical calculations have a limited precision. It would be most helpful if you could provide a complete example that demonstrates the problem that you experience. It doesn’t have to be the same physical system that you use in research. It’s actually better if it’s simpler, but one should be able to observe the concrete problems that trouble you.
In addition, I was wondering if you had any advice for making the code run faster? I ran the simulation for 10 time steps over a very short time period to obtain the attached animation and it took around 4 hours on my desktop.
As a vague rule of thumb, one needs to step up to a a computing cluster for tkwant when a laptop/desktop is sufficient with kwant alone. (This assumes that one wants to treat similar systems with comparable numbers of orbitals.) Or one has to wait longer... Tkwant calculations need to be integrated over many energies, while with Kwant at zero temperature that’s not necessary. So there’s literally more to do. There are bottlenecks and problems that could be improved in both Kwant and Tkwant, and there may be also possible workarounds. It can help to profile a run to see where time is actually spent. Having a small but representative running example (that ideally does not take four hours!) would help here as well. Cheers Christoph
participants (1)
-
Clarke, Isobel