Skip to content

Commit

Permalink
Fixed missing "start_node_idxs" pass to DISCERNMENTSolver
Browse files Browse the repository at this point in the history
  • Loading branch information
timbernat committed Jul 20, 2024
1 parent 41b1762 commit 224dabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polymerist/polymers/monographs.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _validate_start_node_idxs(self, start_node_idxs : Optional[Union[int, Sequen

# 2) check that there exists a 1:1 mapping between the provided node collection and DISTINCT connected components
cc_order_planner = DISCERNMENTSolver(nx.connected_components(self))
if not cc_order_planner.solution_exists(unique_bins=True):
if not cc_order_planner.solution_exists(start_node_idxs, unique_bins=True):
raise ValueError('Starting node indices provided do not uniquely correspond to distinct chains')
else:
cc_order = next(cc_order_planner.enumerate_choices(start_node_idxs, unique_bins=True))
Expand Down

0 comments on commit 224dabc

Please sign in to comment.