Skip to content

Commit

Permalink
make deepcopy when merging
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrunewald committed Jul 9, 2024
1 parent 16af54a commit 77a58ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgsmiles/graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def merge_graphs(source_graph, target_graph, max_node=None):
correspondence = {}
for idx, node in enumerate(target_graph.nodes(), start=offset + 1):
correspondence[node] = idx
new_atom = copy.copy(target_graph.nodes[node])
new_atom = copy.deepcopy(target_graph.nodes[node])
new_atom['fragid'] = [(new_atom.get('fragid', 0) + fragment_offset)]
source_graph.add_node(idx, **new_atom)

Expand Down

0 comments on commit 77a58ed

Please sign in to comment.