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

allow attaching a lead to a builder that contains sites that are not...

allow attaching a lead to a builder that contains sites that are not commensurate with the leads's symmetry
parent 5dfd67a3
No related branches found
No related tags found
No related merge requests found
......@@ -998,17 +998,24 @@ class Builder(object):
# Check if site families of the lead are present in the system (catches
# a common and a hard to find bug).
families = set(site.family for site in H)
lead_only_families = families.copy()
for site in self.H:
families.discard(site.family)
if not families:
lead_only_families.discard(site.family)
if not lead_only_families:
break
else:
msg = 'Sites with site families {0} do not appear in the system, ' \
'hence the system does not interrupt the lead.'
raise ValueError(msg.format(tuple(families)))
raise ValueError(msg.format(tuple(lead_only_families)))
all_doms = set()
for site in self.H:
if site.family not in families:
continue
ge = sym.which(site)
if sym.act(-ge, site) in H:
all_doms.add(ge[0])
all_doms = list(sym.which(site)[0]
for site in self.H if sym.to_fd(site) in H)
if origin is not None:
orig_dom = sym.which(origin)[0]
all_doms = [dom for dom in all_doms if dom <= orig_dom]
......
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