From 021934ce8866ffa923057722740d2b2ef7b45fa1 Mon Sep 17 00:00:00 2001
From: Joseph Weston <joseph.weston08@gmail.com>
Date: Mon, 4 Dec 2017 13:08:10 +0100
Subject: [PATCH] clarify connection between lead modes and lead sites

Previously it was never explicitly stated that the wavefunctions
returned by modes() are only defined over the unit cell of the
infinite system. This was confusing, as syst.sites contains
not only the unit cell sites, but also the connected sites in
neighboring cells.

Closes #178.
---
 kwant/system.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kwant/system.py b/kwant/system.py
index 62158d41..dfa28558 100644
--- a/kwant/system.py
+++ b/kwant/system.py
@@ -224,6 +224,12 @@ class InfiniteSystem(System, metaclass=abc.ABCMeta):
 
         See documentation of `~kwant.physics.PropagatingModes` and
         `~kwant.physics.StabilizedModes` for the return format details.
+
+        The wave functions of the returned modes are defined over the
+        *unit cell* of the system, which corresponds to the degrees of
+        freedom on the first ``cell_sites`` sites of the system
+        (recall that infinite systems store first the sites in the unit
+        cell, then connected sites in the neighboring unit cell).
         """
         from . import physics   # Putting this here avoids a circular import.
         ham = self.cell_hamiltonian(args, params=params)
-- 
GitLab