We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c529dae commit 17da0c2Copy full SHA for 17da0c2
1 file changed
src/Parse.jl
@@ -161,7 +161,16 @@ function getatomdictfromrmg(mol)
161
molecularweight = mol.get_molecular_weight()
162
return atmD,nbonds,molecularweight
163
end
164
-getatomdictsmiles(smiles) = getatomdictfromrdkit(Chem.AddHs(Chem.MolFromSmiles(smiles)))
+function getatomdictsmiles(smiles)
165
+ if occursin(r"R", smiles) || occursin(r"L", smiles)
166
+ mol = fragment.Fragment().from_smiles_like_string(smiles)
167
+ mol.assign_representative_molecule()
168
+ getatomdictfromrmg(mol.mol_repr)
169
+ else
170
+ getatomdictfromrdkit(Chem.AddHs(Chem.MolFromSmiles(smiles)))
171
+ end
172
+end
173
+
174
export getatomdictsmiles
175
getatomdictinchi(inchi) = getatomdictfromrdkit(Chem.AddHs(Chem.MolFromInchi(inchi)))
176
export getatomdictinchi
0 commit comments