Skip to content
Snippets Groups Projects
Commit 6adf7afd authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

extra check for attaching leads

parent b6cb7dd4
No related branches found
No related tags found
No related merge requests found
......@@ -1070,6 +1070,9 @@ class Builder(object):
The lead numbering starts from zero and increments from there, i.e.
the leads are numbered in the order in which they are attached.
"""
if self.symmetry.num_directions:
raise ValueError("Can only attach leads to finite systems")
if add_cells < 0 or int(add_cells) != add_cells:
raise ValueError('add_cells must be an integer >= 0.')
......
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