Dear all, There are several questions I want to ask for help.
1. When I read a molecular by MolFromSmiles and MolFromSmarts,it throw an exception,As shown below , the molecule “n1c(=O)nc(=O)cc1” can’t be read by MolFromSmiles while MolFromSmarts work well.So what the difference between MolFromSmiles and MolFromSmarts when read a molecular smiles?( I still expect MolFromSmarts is compatible with MolFromSmile and more advanced.) 2.The smiles “n1c(=O)nc(=O)cc1” and “N1C(=O)NC(=O)C=C1” is two kinds of ways to write the structure,when I use the HasSubStructureMatch test it ,I expect the one is contained within the other,but the result is inconsistent with my expect, I just want to know why? Did I misunderstand this function? >>> mfsmi = AllChem.MolFromSmiles >>> mfsma = AllChem.MolFromSmarts >>> asub = mfsma("n1c(=O)nc(=O)cc1") >>> a = mfsmi("n1c(=O)nc(=O)cc1") >>> a1 = mfsma("n1c(=O)nc(=O)cc1") >>> a.HasSubstructureMatch(asub) Traceback (most recent call last): File "<input>", line 1, in <module> a.HasSubstructureMatch(asub) AttributeError: 'NoneType' object has no attribute 'HasSubstructureMatch' >>> a1.HasSubstructMatch(asub) True >>> bsub = mfsma("N1C(=O)NC(=O)C=C1") >>> b = mfsmi("N1C(=O)NC(=O)C=C1") >>> b1 = mfsma("N1C(=O)NC(=O)C=C1") >>> b.HasSubstructMatch(bsub) False >>> b1.HasSubstructMatch(bsub) True >>> a1.HasSubstructMatch(bsub) False >>> b.HasSubstructMatch(asub) True >>> b1.HasSubstructMatch(asub) False
------------------------------------------------------------------------------
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss