Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Wimmer
kwant
Commits
e8e4f316
Commit
e8e4f316
authored
11 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
document how to manually attach leads
parent
0ba0ac48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kwant/builder.py
+18
-0
18 additions, 0 deletions
kwant/builder.py
with
18 additions
and
0 deletions
kwant/builder.py
+
18
−
0
View file @
e8e4f316
...
...
@@ -378,9 +378,14 @@ class HermConjOfFunc(object):
class
Lead
(
object
):
"""
Abstract base class for leads that can be attached to a `Builder`.
To attach a lead to a builder, append it to the builder
'
s `~Builder.leads`
instance variable. See the documentation of `kwant.builder` for the
concrete classes of leads derived from this one.
Attributes
----------
interface : sequence of sites
"""
__metaclass__
=
abc
.
ABCMeta
...
...
@@ -565,6 +570,9 @@ class Builder(object):
tags which are sequences of integers. It *makes sense* only when these
sites live on a regular lattice, like the ones provided by `kwant.lattice`.
Attaching a lead manually (without the use of `~Builder.attach_lead`)
amounts to creating a `Lead` object and appending it to this list.
``builder0 += builder1`` adds all the sites, hoppings, and leads of
``builder1`` to ``builder0``. Sites and hoppings present in both systems
are overwritten by those in ``builder1``. The leads of ``builder1`` are
...
...
@@ -576,6 +584,11 @@ class Builder(object):
they must satisfy the same symmetry. There is (currently) no check and
wrong results will be the consequence of a misbehaving function.
Attributes
----------
leads : list of `Lead` instances
The leads that are attached to the system.
Examples
--------
Define a site.
...
...
@@ -594,6 +607,11 @@ class Builder(object):
>>>
del
builder
[
site3
]
Detach the last lead. (This does not remove the sites that were added to
the scattering region by `~Builder.attach_lead`.)
>>>
del
builder
.
leads
[
-
1
]
"""
def
__init__
(
self
,
symmetry
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment