From 40b896505831f4c73942c1049945cbaecd0e525f Mon Sep 17 00:00:00 2001 From: Christoph Groth <christoph.groth@cea.fr> Date: Fri, 18 May 2018 15:36:44 +0200 Subject: [PATCH] correctly reference finalized builders when appropriate Thanks to Alexandre Bernard for reporting this. https://mailman-mail5.webfaction.com/pipermail/kwant-devel/2018-May/000088.html --- doc/source/reference/kwant.system.rst | 5 +++++ kwant/builder.py | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/source/reference/kwant.system.rst b/doc/source/reference/kwant.system.rst index 3fc95f49..3b6f2627 100644 --- a/doc/source/reference/kwant.system.rst +++ b/doc/source/reference/kwant.system.rst @@ -14,6 +14,11 @@ Any system which is provided to a solver should be derived from the appropriate class in this module, and every solver can assume that its input corresponds to the interface defined here. +In practice, very often Kwant systems are finalized +`builders <kwant.builder.Builder>` (i.e. +`kwant.builder.FiniteSystem` or `kwant.builder.InfiniteSystem`) and offer some +additional attributes. + .. autosummary:: :toctree: generated/ diff --git a/kwant/builder.py b/kwant/builder.py index 1418b40a..ccb8f82f 100644 --- a/kwant/builder.py +++ b/kwant/builder.py @@ -538,9 +538,10 @@ class Lead(metaclass=abc.ABCMeta): Notes ----- - The finalized lead must be an object that can be used as a lead in a - `kwant.system.FiniteSystem`. It could be an instance of - `kwant.system.InfiniteSystem` for example. + The finalized lead must be an object that can be used as a lead + in a `kwant.system.FiniteSystem`, i.e. an instance of + `kwant.system.InfiniteSystem`. Typically it will be a finalized + builder: `kwant.builder.InfiniteSystem`. The order of sites for the finalized lead must be the one specified in `interface`. @@ -584,7 +585,7 @@ class BuilderLead(Lead): self.interface = tuple(sorted(interface)) def finalized(self): - """Return a `kwant.system.InfiniteSystem` corresponding to the + """Return a `kwant.builder.InfiniteSystem` corresponding to the compressed lead. The order of interface sites is kept during finalization. @@ -1603,9 +1604,9 @@ class Builder: Returns ------- - finalized_system : `kwant.system.FiniteSystem` + finalized_system : `kwant.builder.FiniteSystem` If there is no symmetry. - finalized_system : `kwant.system.InfiniteSystem` + finalized_system : `kwant.builder.InfiniteSystem` If a symmetry is present. Notes -- GitLab