Commit a5259676 authored by Rayan Chikhi's avatar Rayan Chikhi
Browse files

allow deeper recursions and fixed min_mol_idx init

parent b15e9b3c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import sys import sys
sys.setrecursionlimit(10000)
import argparse import argparse
from termcolor import colored from termcolor import colored
import networkx as nx import networkx as nx
...@@ -318,7 +319,7 @@ def recursive_longest_path(current_node, current_molecule, next_nodes, longest_p ...@@ -318,7 +319,7 @@ def recursive_longest_path(current_node, current_molecule, next_nodes, longest_p
longest = 0 longest = 0
longest_next = None longest_next = None
min_mol_idx = current_molecule + 10000 min_mol_idx = float('inf')
# Recursively compute the longest path # Recursively compute the longest path
for mol_idx, node in next_nodes[current_node][current_molecule]: for mol_idx, node in next_nodes[current_node][current_molecule]:
size, _, _ = recursive_longest_path(node, mol_idx, next_nodes, longest_paths) size, _, _ = recursive_longest_path(node, mol_idx, next_nodes, longest_paths)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment