Hi, An addition to Joseph’s reply: If all you want to do is to save the wave function, you will probably not want to build a dictionary, but simply loop over the wave function array and the list of sites while writing both to a file. For example like this (with spin): sites = fsys.leads[lead].sites psi = modes[lead].wave_functions[:, mode_nr] for site, value in zip(sites, psi.reshape(-1, 2)): tag = site.tag print tag[0], tag[1], value[0], value[1] Note how I used NumPy’s “reshape” to be able to iterate over the spins. Also, bear in mind that the coordinates of the sites that make up a lead are most likely not the ones that you have set, but equivalent ones (under that leads’ symmetry). Best, Christoph
participants (1)
-
christoph.groth@cea.fr