Skip to content
Snippets Groups Projects
Commit 4a48b23d authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

mention HoppingKind in whatsnew

parent 7037a0c1
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,26 @@ What's New in kwant 0.3
This article explains the user-visible changes in kwant 0.3.
``possible_hoppings`` replaced by `~kwant.builder.HoppingKind`
--------------------------------------------------------------
The `~kwant.builder.Builder` method ``possible_hoppings`` has been rendered
obsolete. Where previously one would have had ::
for kind in lat.nearest:
sys[sys.possible_hoppings(*kind)] = t
now it suffices to write ::
sys[lat.nearest] = t
This is possible because `~kwant.builder.Builder` now accepts *functions* as
keys in addition to `~kwant.builder.Site` objects and tuples of them
(hoppings). These functions are expected to yield either sites or hoppings,
when given a builder instance as the sole argument. The use of such keys is to
implement sets of sites or hoppings that depend on what is already present in
the builder, such as `~kwant.builder.HoppingKind`. In the above example,
``lat.nearest`` is a list of ``HoppingKind`` objects.
Immutable site groups
---------------------
In order to make naming more consistent, `kwant.make_lattice` was renamed and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment