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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Joseph Weston
kwant
Commits
bc881111
Commit
bc881111
authored
11 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
builder: make docs for += visible
parent
4866a9aa
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
+5
-8
5 additions, 8 deletions
kwant/builder.py
with
5 additions
and
8 deletions
kwant/builder.py
+
5
−
8
View file @
bc881111
...
...
@@ -531,6 +531,11 @@ 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`.
`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 appended to the leads
of the system being extended.
.. warning::
If functions are used to set values in a builder with a symmetry, then
...
...
@@ -893,14 +898,6 @@ class Builder(object):
return
self
.
_out_neighbors
(
a
)
def
__iadd__
(
self
,
other_sys
):
"""
Add `other_sys` to the system.
Sites and hoppings present in both systems are overwritten by those in
`other_sys`. The leads of `other_sys` are appended to the leads of the
system being extended.
"""
if
self
.
symmetry
!=
other_sys
.
symmetry
:
raise
ValueError
(
'
System to be added has a different symmetry.
'
)
for
site
,
value
in
other_sys
.
site_value_pairs
():
self
[
site
]
=
value
for
hop
,
value
in
other_sys
.
hopping_value_pairs
():
...
...
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