For what it's worth, this one works too: m.GetSubstructMatches(Chem.MolFromSmarts('P1->[Zr+3]<-C1'))
It looks like a problem in the way ring closure bonds are being handled in the SMARTS parser. Jan: would you mind creating an issue for this in github? -greg On Wed, Mar 20, 2024 at 3:30 PM Jan Halborg Jensen <jhjen...@chem.ku.dk> wrote: > The following finds no matches: > > m = Chem.MolFromSmiles('C1P->[Zr+3]<-1') > m.GetSubstructMatches(Chem.MolFromSmarts('C1P->[Zr+3]<-1’)) > > But all these work: > > m.GetSubstructMatches(Chem.MolFromSmiles('C1P->[Zr+3]<-1’)) > > m.GetSubstructMatches(Chem.MolFromSmarts('[*]->[Zr+3]’)) > > m = Chem.MolFromSmiles('C1P-[Zr+3]-1') > m.GetSubstructMatches(Chem.MolFromSmarts('C1P-[Zr+3]-1’)) > > > Is this a bug, or is there something I’m missing with regard to the first > case? > > Best regards, Jan > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss