Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-11 Thread Greenpharma S.A.S.
Dear Paolo, Thank you very much. I'll test this and revert to you. Have a nice day. Best regards, Quoc-Tuan > Le 10 mai 2020 à 13:09, Paolo Tosco mailto:paolo.tosco.m...@gmail.com > a écrit : > > > Dear Quoc-Tuan, > > I think I have come with a reasonably fast algorithm that seems to

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-10 Thread Paolo Tosco
Dear Quoc-Tuan, I think I have come with a reasonably fast algorithm that seems to be more robust: https://gist.github.com/ptosco/dc4d27153e6e8e45aed654761e4d7409 Cheers, p. On 06/05/2020 09:11, Quoc-Tuan DO wrote: Dear Paolo, Thank you again for your code. Sorry for bothering you again.

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-06 Thread Quoc-Tuan DO
Dear Paolo, Thank you again for your code. Sorry for bothering you again. It works all fine for monoterpenes but not for diterpenes, sesquiterpenes nor triterpenes. pattern: C~C~C(~C)~C mol1: CC(=O)O[C@H]1CC[C@]2([C@H](C1(C)C)CC=C([C@@H]2CC/C(=C/C(=O)O)/C)C)C => ((17, 18, 19, 20, 23), (16,

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-05 Thread Jean-Marc Nuzillard
Dear Paolo, this answers my question as well, but in an unexpected way. Best, Jean-Marc Le 05/05/2020 à 14:52, Paolo Tosco a écrit : Dear Quoc-Tuan, this should do what you need: https://gist.github.com/ptosco/dc4d27153e6e8e45aed654761e4d7409 Cheers, p. On 05/05/2020 11:52, Quoc-Tuan

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-05 Thread Paolo Tosco
Dear Quoc-Tuan, this should do what you need: https://gist.github.com/ptosco/dc4d27153e6e8e45aed654761e4d7409 Cheers, p. On 05/05/2020 11:52, Quoc-Tuan DO wrote: Dear Paolo, Thank you for your reply. I understand now... I did not use uniquify option first then only uniquify=True. I

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-05 Thread Quoc-Tuan DO
Dear Paolo, Thank you for your reply. I understand now... I did not use uniquify option first then only uniquify=True. I thought the default would be uniquify=False. Actually my problem is to find 2 distinct units of isoprene (pattern) in the borneol (smiles) as

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-04 Thread Jean-Marc Nuzillard
Dear Quoc-Tuan, GetSubstructMatches() tries to find isoprene at all positions where this is possible. You may want to test your SMARTS and its matching with structures at this great place: https://smartsview.zbh.uni-hamburg.de/ Maybe you would prefer to known whether borneol follows the

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-04 Thread Paolo Tosco
Dear Quoc-Tuan, On 04/05/2020 09:10, Greenpharma S.A.S. wrote: Dear All, Please could you help with the following problem (I could not find answers in discussion list) ? pattern='C~C~C(~C)~C' smiles='O[C@H]1C[C@H]2C([C@@]1(C)CC2)(C)C' pat = Chem.MolFromSmiles(pattern) mol =