diff --git a/kwant/builder.py b/kwant/builder.py index ff71e1a644719626c3efa1b99ed8a3e46515c187..93fcdc236e0fa6101d259fe676ffb8bd75f01b7f 100644 --- a/kwant/builder.py +++ b/kwant/builder.py @@ -812,7 +812,12 @@ class Builder(object): return chain(self.H, self.hoppings()) def sites(self): - """Return a read-only set over all sites.""" + """Return a read-only set over all sites. + + The sites that are returned belong to the fundamental domain of the + `Builder` symmetry, and are not necessarily the ones that were set + initially (but always the equivalent ones). + """ try: return self.H.viewkeys() except AttributeError: @@ -824,7 +829,12 @@ class Builder(object): yield site, hvhv[1] def hoppings(self): - """Return an iterator over all hoppings.""" + """Return an iterator over all Builder hoppings. + + The hoppings that are returned belong to the fundamental domain of the + `Builder` symmetry, and are not necessarily the ones that were set + initially (but always the equivalent ones). + """ for tail, hvhv in self.H.iteritems(): for head, value in edges(hvhv): if value is other: continue diff --git a/kwant/lattice.py b/kwant/lattice.py index f0b0bf4afadaf22abcf341b70ab486402ff4bc51..bc578039921227ce14b82af7712ba672b69e4877 100644 --- a/kwant/lattice.py +++ b/kwant/lattice.py @@ -225,6 +225,9 @@ class TranslationalSymmetry(builder.Symmetry): produced. A certain flexibility in choice of the fundamental domain can be achieved by calling manually the `add_site_group` method and providing it the `other_vectors` parameter. + + The fundamental domain for hoppings are all hoppings ``(a, b)`` with site + `a` in fundamental domain of sites. """ def __init__(self, periods): self.periods = ta.array(periods)