Hi everyone,

I am looking for substructure match between a smarts and a smiles, but I
want any heteroatom from the smarts to match any heteroatom from a smiles:


[image: Inline images 1]





The following does not return what I would expect:

smarts1 = " [F,Cl,Br,I]C1=CC(C2[N,O,S]CC[N,O,S]C2)=CC=C1"smiles2 = "
ClC1=CC(C2NCCOC2)=C(C=CC=C3)C3=C1"

mol1 = Chem.MolFromSmarts(smarts1)mol2 = Chem.MolFromSmiles(smiles2)
*print*("mol1 is a substructure of mol2:
{}".format(mol2.HasSubstructMatch(mol1) *print*("mol2 is a
substructure of mol1: {}".format(mol1.HasSubstructMatch(mol2)))



ð  mol1 is a substructure of mol2: False

ð  mol2 is a substructure of mol1: False

How could I do that?



Thanks,



Alexis


>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to