Pretty much the only way you can get that is to get positions for all the sites in the system, and then do reverse lookup, such as: site_numbers = {tuple(site.pos(i)): i for i in xrange(sys.graph.num_nodes)} site_numbers[(1, 1)] # Find the number of the site with coordinates (1, 1). There are several cases when this won't work nicely (if e.g. there are sites that have identical positions). Best, Anton On Mon, Dec 2, 2013 at 3:29 PM, Sebastien Guissart <sebastien.guissart1@u-psud.fr> wrote:
Sorry Anton, I would say the opposite, how know where is a position on the lattice in the matrix hamiltonian, or it's eigenvector. Best, Sebastien
Le 02/12/2013 14:56, Anton Akhmerov a écrit :
Hi Sebastien,
You should just use sys.pos(site_number), where sys is the finalized system you used to create the Hamiltonian.
Best, Anton
On Mon, Dec 2, 2013 at 2:52 PM, Sebastien Guissart <sebastien.guissart1@u-psud.fr> wrote:
Hi, Kwant is very helpful for define a hamiltonian matrix (with .hamiltonian_submatrix()) and plot a wave function (with .plotter.map()). But how know where is a site in the matrix? for example for do a 1D plot of wave function in a special direction?
Thanks in advance, Sebastien