Re: [Rdkit-discuss] HasSubstructMatch method with useChirality argument

2022-01-04 Thread Alexis Parenty
Hello Paolo, Many thanks for your detailed explanation. I think it is all clear now. I was not aware that a C with a single @ would always be tagged as CCW in a Smarts due to the missing implicit H. Pity I cannot add a H to get the correct CW tag since it would no longer match the

Re: [Rdkit-discuss] HasSubstructMatch method with useChirality argument

2022-01-04 Thread Paolo Tosco
Hi Alexis, The chiral substructure match does not look at the CIP labels, but rather at the atom parities, as you expected. In the examples below I have reordered your mol_structure as it makes things easier to understand. Let's work with a fragment constructed from SMILES rather than from

Re: [Rdkit-discuss] HasSubstructMatch method with useChirality argument

2022-01-04 Thread Alexis Parenty
Hi Shani, Many thanks for your response. Good observation! I did not realise that the stereoisomer nomenclature had swap on removing the amine. However, is it the intended behaviour of the method? To me, in that case, the S stereoisomer fragment should match the R stereoisomer super structure but

Re: [Rdkit-discuss] HasSubstructMatch method with useChirality argument

2022-01-04 Thread Shani Zev
Hi Alexis, I think that the reason for this is because in the first case you are comparing S and R stereoisomer and hence it is false while in the second you are comparing R and R. best, Shani [image: q.gif] On Tue, Jan 4, 2022 at 1:22 PM Alexis Parenty wrote: > Hi everyone, > > Why is it that

[Rdkit-discuss] HasSubstructMatch method with useChirality argument

2022-01-04 Thread Alexis Parenty
Hi everyone, Why is it that the following smarts C[C@]1CCCN(C1)C(C)=O does not match the following structure C[C@]1(CCCN(C1)C(C)=O)N when using the chirality argument in the HasSubstructMatch method? mol_frag = Chem.MolFromSmarts("C[C@]1CCCN(C1)C(C)=O") mol_structure =