Hi, I am new to rdkit, sorry if I am missing something obvious. I am trying to pair matching substructures for a list of molecules. The plan is to:1) do MCS on a list of molecules2) use GetSubstructMatch to get pairing for each molecule and MCS result However, GetSubstructMatch returns empty tuple, despite an obvious match. Here is a toy example: from rdkit import Chemfrom rdkit.Chem import MCSfrom rdkit.Chem.Draw import IPythonConsole mol1 = Chem.MolFromSmiles("Cc1ccccc1")mol2 = Chem.MolFromSmiles( "CCc1ccccc1" )mol3 = Chem.MolFromSmiles( "Oc1ccccc1" )mol4 = Chem.MolFromSmiles( "COc1ccccc1" ) res = MCS.FindMCS([mol1,mol2,mol3,mol4])# MCS is a benzenemy_mcs = Chem.MolFromSmiles(res.smarts)# turn MCSResult into Mol object benzene = Chem.MolFromSmiles("c1ccccc1") # build benzene manually Chem.Draw.MolsToGridImage([mol1,mol2,mol3,mol4,my_mcs,benzene]).show() # All molecules share a benzene ring. Mol #5 is an actual MCS result. Mol #6 is a benzene built manually. Mol #5 and #6 seem identical mol1.HasSubstructMatch(my_mcs)mol2.HasSubstructMatch(my_mcs) mol3.HasSubstructMatch(my_mcs) mol4.HasSubstructMatch(my_mcs) # Returns false mol1.HasSubstructMatch(benzene) mol2.HasSubstructMatch(benzene) mol3.HasSubstructMatch(benzene) mol4.HasSubstructMatch(benzene) # returns true my_mcs.HasSubstructMatch(benzene)# truebenzene.HasSubstructMatch(my_mcs)# false What am I missing? Thanks!Ondrej.
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss