Commit ec47af18 authored by Joseph Weston's avatar Joseph Weston

add 'parameters' property to abstract system API

Also require that 'leads' of FiniteSystems have a 'parameters'
property.
parent 65e0e29b
......@@ -31,6 +31,9 @@ class System(metaclass=abc.ABCMeta):
range. In addition, the final triple should have the form
``(len(graph.num_nodes), 0, tot_norbs)`` where ``tot_norbs`` is the
total number of orbitals in the system.
parameters : frozenset of strings
The names of the parameters on which the system depends. This attribute
is provisional and may be changed in a future version of Kwant
Notes
-----
......@@ -79,7 +82,11 @@ class FiniteSystem(System, metaclass=abc.ABCMeta):
leads : sequence of leads
Each lead has to provide a method ``selfenergy`` that has
the same signature as `InfiniteSystem.selfenergy` (without the
``self`` parameter). It may also provide ``modes`` that has the
``self`` parameter), and must have property ``parameters``:
a collection of strings that name the system parameters (
though this requirement is provisional and may be removed in
a future version of Kwant).
It may also provide ``modes`` that has the
same signature as `InfiniteSystem.modes` (without the ``self``
parameter).
lead_interfaces : sequence of sequences of integers
......@@ -89,6 +96,10 @@ class FiniteSystem(System, metaclass=abc.ABCMeta):
Each sub-sequence contains the indices of the system sites
that belong to the lead, and therefore have the same onsite as the lead
sites, and are connected by the same hoppings as the lead sites.
parameters : frozenset of strings
The names of the parameters on which the system depends. This does
not include the parameters for any leads. This attribute
is provisional and may be changed in a future version of Kwant
Notes
-----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment