Replies: 4 comments 8 replies
-
|
I found out myself that by using the ResonanceMolSupplier the follwing test could be done: def getResonanceStructureSMILES(SMILES, flags = 0):
mol = Chem.MolFromSmiles(SMILES)
suppl = Chem.ResonanceMolSupplier(mol, flags)
return [Chem.MolToSmiles(mol_) for mol_ in suppl]
smiles1 = getResonanceStructureSMILES('CC[n+]1ccn(C)c1')
smiles2 = getResonanceStructureSMILES('CCn1cc[n+](C)c1')
set(smiles1) == set(smiles2) # returns TrueIs this the proper way to test if two ionic SMILES with resonance structures are equal? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @greglandrum, I found something weird. When I run the following on windows 10, conda environment, rdkit version 2021.03.4: m1 = Chem.MolFromSmiles('CC[n+]1ccn(C)c1')
suppl = Chem.ResonanceMolSupplier(m1, 0)
f = list(suppl)execution of the program freezes on generating the list in the third line. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, @greglandrum, I found an example where also in 2021.09.4, Win 10, conda-forge the execution of the program freezes. m1 = Chem.MolFromSmiles('Nc1ccc2nc3ccc(N)cc3[s+]c2c1')
suppl = Chem.ResonanceMolSupplier(m1, 0)
f = list(suppl) |
Beta Was this translation helpful? Give feedback.
-
|
Hi @greglandrum and @ptosco, since this issue #4491 has not been fixed yet, I am considering using the molhash solution instead. Is either one of the approaches a superset of the other? Meaning would resonance structures be a superset of tautomers, or the other way around, or would there be an intersection of the structures but some might be in the resonance structures set and others in the tautomers set? My background is testing whether two ionic structures are the same with respect to quantum chemistry calculations, which don't care about where the charge is. But I don't want tautomers to be considered equal. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to standardize ionic SMILES? One example follows where the charge is on a different nitrogen in same the ring.
In such a way that both are equal?
Beta Was this translation helpful? Give feedback.
All reactions