File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,7 +165,22 @@ getatomdictsmiles(smiles) = getatomdictfromrdkit(Chem.AddHs(Chem.MolFromSmiles(s
165165export getatomdictsmiles
166166getatomdictinchi (inchi) = getatomdictfromrdkit (Chem. AddHs (Chem. MolFromInchi (inchi)))
167167export getatomdictinchi
168- getatomdictadjlist (adjlist) = getatomdictfromrmg (molecule. Molecule (). from_adjacency_list (adjlist))
168+ function getatomdictadjlist (adjlist)
169+ _ , cutting_label_list = fragment. Fragment (). detect_cutting_label (adjlist)
170+ if isempty (cutting_label_list)
171+ mol = molecule. Molecule (). from_adjacency_list (adjlist)
172+ else
173+ mol = fragment. Fragment (). from_adjacency_list (adjlist)
174+ end
175+ if pybuiltin (:isinstance )(mol, molecule. Molecule)
176+ getatomdictfromrmg (mol)
177+ elseif pybuiltin (:isinstance )(mol, fragment. Fragment)
178+ mol. assign_representative_molecule ()
179+ getatomdictfromrmg (mol. mol_repr)
180+ else
181+ @error (" Unrecognizable molecule type $mol " )
182+ end
183+ end
169184export getatomdictadjlist
170185
171186function getspeciesradius (atomdict,nbonds:: Int64 )
You can’t perform that action at this time.
0 commit comments