Skip to content
Snippets Groups Projects
Commit 787e75fe authored by Christoph Groth's avatar Christoph Groth
Browse files

clean-up docs after introduction of neighbors()

parent 30c3d08a
No related branches found
No related tags found
No related merge requests found
......@@ -373,27 +373,6 @@ The result of the example should be identical to the previous one.
.. specialnote:: Technical details
- In
.. literalinclude:: quantum_wire_revisited.py
:start-after: #HIDDEN_BEGIN_nooi
:end-before: #HIDDEN_END_nooi
we write ``*hopping`` instead of ``hopping``. The reason is as follows:
`~kwant.builder.HoppingKind` expects the hopping to
be defined using three parameters (in particular, a tuple
containing a relative lattice vector, and two (sub)lattice objects that
indicate the start and end lattice, more about that in
a :ref:`later tutorial <tutorial_spinorbit>`). ``lat.nearest``
is a list of tuples, with every tuple containing the three
parameters expected by `~kwant.builder.HoppingKind`.
Hence, ``hopping`` is a tuple. But passing it to
`~kwant.builder.HoppingKind` would fail,
as three parameters are expected (not a single tuple). ``*hopping``
unpacks the tuple into these three separate parameters (see
<http://docs.python.org/tutorial/controlflow.html#unpacking-argument-lists>)
- We have seen different ways to add lattice points to a
`~kwant.builder.Builder`. It allows to
......
......@@ -4,6 +4,25 @@ What's New in kwant 0.3
This article explains the user-visible changes in kwant 0.3.
Lattice and shape improvements
------------------------------
Lattices now have a method `~kwant.lattice.Polyatomic.neighbors`,
which calculates all the n-th shortest possible hoppings on this lattice. This
replaces the ``nearest`` attribute that some lattices used to have.
`~kwant.lattice.Polyatomic.shape` uses an improved flood-fill algorithm, making
it work better on narrow ribbons (which were sometimes buggy before with
non-square lattices). Additionally, it was made symmetry-aware: If
`~kwant.lattice.Polyatomic.shape` is used with a lead, the shape does not have
to be limited along the lead direction anymore. In fact, if the shape function
does not have the same symmetry as the lead, the result may be unexpected, so
it is highly recommended to use shape functions that have the same symmetry as
the lead.
`~kwant.lattice.Monoatomic.closest` now returns an exact, and not approximate
closest point. A new method `~kwant.lattice.Monoatomic.n_closest` was added,
which returns the n closest lattice points.
``possible_hoppings`` replaced by `~kwant.builder.HoppingKind`
--------------------------------------------------------------
The `~kwant.builder.Builder` method ``possible_hoppings`` has been rendered
......@@ -22,7 +41,7 @@ keys in addition to `~kwant.builder.Site` objects and tuples of them
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.
``lat.neighbors()`` is a list of ``HoppingKind`` objects.
Some renames
------------
......@@ -119,18 +138,3 @@ collection could be a dictionary, or a class instance, for example::
Arguments can be passed in an equivalent way to
`~kwant.solvers.default.wave_function`,
`~kwant.system.System.hamiltonian_submatrix`, etc.
Lattice and shape improvements
------------------------------
`~kwant.lattice.Monoatomic.closest` now returns an exact, and not approximately
closest point. A new method `~kwant.lattice.Monoatomic.n_closest` was added,
which returns n closest lattice points.
Likewise `~kwant.lattice.Polyatomic.shape` has acquired an improved flood-fill
algorithm, making it work better on narrow ribbon (which were sometimes buggy
before with non-square lattices). Additionally, it was made symmetry-aware, so
if a shape is used for a lead, no conditions with regard to coordnate parallel
to the lead period are required.
Finally, lattices now have a method `~kwant.lattice.Polyatomic.neighbors`,
which calculates all the n-th shortest possible hoppings on this lattice.
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