Skip to content

Commit d844ee8

Browse files
committed
Generalize fluxdiagram to handle both mol and fragment adjlist
1 parent 288be53 commit d844ee8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/fluxdiagrams.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ function drawspc(spc::Species,path::String=".")
4242
end
4343
end
4444
if spc.adjlist != ""
45-
mol = molecule.Molecule().from_adjacency_list(spc.adjlist)
45+
_ , cutting_label_list = fragment.Fragment().detect_cutting_label(spc.adjlist)
46+
if isempty(cutting_label_list)
47+
mol = molecule.Molecule().from_adjacency_list(spc.adjlist)
48+
else
49+
mol = fragment.Fragment().from_adjacency_list(spc.adjlist)
50+
end
4651
elseif spc.inchi != ""
4752
mol = molecule.Molecule().from_inchi(spc.inchi)
4853
elseif spc.smiles != ""

0 commit comments

Comments
 (0)