Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bionetgen/modelapi/xmlparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def resolve_xml(self, bonds_xml):
if bond_partner_1 not in self.bonds_dict:
self.bonds_dict[bond_partner_1] = [ibond + 1]
else:
self.bonds_dict[bond_partner_1].append([ibond + 1])
# B13: must append the int, not a [int] list — the
# rendered Component.__str__ emits ``f"!{bond}"`` per
# entry, so a list ``[2]`` would render as ``![2]``,
# which BNG2.pl reads as a compartment specifier.
self.bonds_dict[bond_partner_1].append(ibond + 1)
if bond_partner_2 not in self.bonds_dict:
self.bonds_dict[bond_partner_2] = [ibond + 1]
else:
Expand Down
Loading