Skip to content

Commit 76bd4a8

Browse files
committed
Generalize fluxdiagram to handle both mol and fragment smiles
1 parent d844ee8 commit 76bd4a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/fluxdiagrams.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ function drawspc(spc::Species,path::String=".")
5151
elseif spc.inchi != ""
5252
mol = molecule.Molecule().from_inchi(spc.inchi)
5353
elseif spc.smiles != ""
54-
mol = molecule.Molecule().from_smiles(spc.smiles)
54+
if occursin(r"R", spc.smiles) || occursin(r"L", spc.smiles)
55+
mol = fragment.Fragment().from_smiles_like_string(spc.smiles)
56+
else
57+
mol = molecule.Molecule().from_smiles(spc.smiles)
58+
end
5559
else
5660
throw(error("no smiles or inchi for molecule $name"))
5761
end

0 commit comments

Comments
 (0)