File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,22 @@ getatomdictsmiles(smiles) = getatomdictfromrdkit(Chem.AddHs(Chem.MolFromSmiles(s
165
165
export getatomdictsmiles
166
166
getatomdictinchi (inchi) = getatomdictfromrdkit (Chem. AddHs (Chem. MolFromInchi (inchi)))
167
167
export 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
169
184
export getatomdictadjlist
170
185
171
186
function getspeciesradius (atomdict,nbonds:: Int64 )
You can’t perform that action at this time.
0 commit comments