Commit 4ef33db4 authored by Christoph Groth's avatar Christoph Groth
Browse files

Merge tag 'v1.1.2'

parents c4865980 d3d0c8a0
......@@ -4,19 +4,22 @@ Authors of Kwant
The principal developers of Kwant are
* Christoph W. Groth (SPSMS-INAC-CEA Grenoble)
* Christoph W. Groth (INAC/CEA Grenoble)
* Michael Wimmer (TU Delft)
* Anton R. Akhmerov (TU Delft)
* Xavier Waintal (SPSMS-INAC-CEA Grenoble)
* Xavier Waintal (INAC/CEA Grenoble)
The authors can be reached at
Other people that have contributed to Kwant include
Other contributors to Kwant include
* Daniel Jaschke (SPSMS-INAC-CEA Grenoble)
* Joseph Weston (SPSMS-INAC-CEA Grenoble)
* Mathieu Istas (INAC/CEA Grenoble)
* Daniel Jaschke (INAC/CEA Grenoble)
* Michał Nowak (TU Delft)
* Adrien Sorgniard (INAC/CEA Grenoble)
* Joseph Weston (INAC/CEA Grenoble)
We thank Christoph Gohlke for the creation of Windows installers.
We thank Christoph Gohlke for the creation of installers for Microsoft Windows.
`CEA <>`_ is the French Commissariat à l'énergie atomique et aux
énergies alternatives. The CEA is the copyright holder for the contributions of
......@@ -9,76 +9,6 @@ leaving room for growth, and plan to keep extending it.
External contributions to Kwant are highly welcome. You can help to advance
the project not only by writing code, but also by reporting bugs, and
fixing/improving the documentation. A `mailing list
<>`_ is available for discussions.
If you have some code that works well with Kwant, or extends it in some useful
way, please consider sharing it. Any external contribution will be clearly
marked as such, and relevant papers will be added to the list of
:doc:`suggested acknowledgements <citing>`. The complete development history
is also made available through a `web interface
<>`_. If you plan to contribute, it is best
to coordinate with us in advance either through the `mailing list
<>`__, or directly by `email
<>`_ for matters that you prefer to not discuss
Reporting bugs
If you encounter a problem with Kwant, first try to reproduce it with as simple
a system as possible. Double-check with the documentation that what you
observe is actually a bug in Kwant. If you think it is, please check whether
the problem is already known by searching the `mailing list
If the problem is not known yet, please email a bug report to the `Kwant mailing
list <>`__. A report should contain:
* The versions of software you are using (Kwant, Python, operating system, etc.)
* A description of the problem, i.e. what exactly goes wrong.
* Enough information to reproduce the bug, preferably in the form of a simple
How to contribute
We use the version control system `Git <>`_ to coordinate the
development of Kwant. If you are new to Git, we invite you to learn its basics.
(There's a plethora of information available on the Web.) Kwant's Git
repository contains not only the source code, but also all of the reference
documentation and the tutorial.
It is best to base your work on the latest version of Kwant::
git clone
Then you can modify the code, and build Kwant and the documentation as described
in the :doc:`installation instructions <install>`.
Some things to keep in mind:
* Please keep the code consistent by adhering to the prevailing naming and
formatting conventions. We generally follow the `"Style Guide for Python
Code" <>`_ For docstrings, we follow
`NumPy's "Docstring Standard"
<>`_ and
`Python's "Docstring Conventions"
* Write tests for all the important functionality you add. Be sure not to
break existing tests.
A useful trick for working on the source code is to build in-place so that there
is no need to re-install after each change. This can be done with the following
command ::
python build_ext -i
The ``kwant`` subdirectory of the source distribution will be thus turned into
a proper Python package that can be imported. To be able to import Kwant from
within Python, one can either work in the root directory of the distribution
(where the subdirectory ``kwant`` is located), or make a (symbolic) link from
somewhere in the Python search path to the the package subdirectory.
fixing/improving the documentation. Please see the `Kwant website
<>`_ for information on how to get in touch
with the Kwant community.
This diff is collapsed.
......@@ -28,10 +28,14 @@ Kwant can calculate
Other computations involving tight-binding Hamiltonians can be implemented
See the `Kwant web site <>`_ for the latest version. A
`mailing list <>`_ is available for
discussions, questions, and reporting bugs. The development of Kwant can be
followed via the `public git repository <>`_.
See the `Kwant web site <>`_ for the latest stable
version. The current development version is available via the `Kwant gitlab
instance <>`_. Contributions are
A `mailing list <>`_ exists for general
discussions related to Kwant. Please report bugs and other issues using the
`issue tracker <>`_.
See also in this directory: `<INSTALL.rst>`_, `<LICENSE.rst>`_, `<AUTHORS.rst>`_,
`<CITING.rst>`_, `<CONTRIBUTE.rst>`_.
......@@ -1156,6 +1156,12 @@ def plot(sys, num_lead_cells=2, unit='nn',
end_pos = resize_to_dim(end_pos)
start_pos = resize_to_dim(start_pos)
# Apply transformations to the data
if pos_transform is not None:
sites_pos = np.apply_along_axis(pos_transform, 1, sites_pos)
end_pos = np.apply_along_axis(pos_transform, 1, end_pos)
start_pos = np.apply_along_axis(pos_transform, 1, start_pos)
# Determine the reference length.
if unit == 'pt':
reflen = None
......@@ -1187,12 +1193,6 @@ def plot(sys, num_lead_cells=2, unit='nn',
raise ValueError('Invalid value of unit argument.')
# Apply transformations to the data
if pos_transform is not None:
sites_pos = np.apply_along_axis(pos_transform, 1, sites_pos)
end_pos = np.apply_along_axis(pos_transform, 1, end_pos)
start_pos = np.apply_along_axis(pos_transform, 1, start_pos)
# make all specs proper: either constant or lists/np.arrays:
def make_proper_site_spec(spec, fancy_indexing=False):
if callable(spec):
......@@ -11,6 +11,15 @@
from __future__ import print_function
import sys
v = sys.version_info
if v[:2] not in [(2, 7), (2, 6)]:
error = "This version of Kwant requires Python 2.6 or 2.7.\n"
if v[0] >= 2:
error += "Please use Kwant 1.2 or above."
print(error, file=sys.stderr)
import re
import os
import glob
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