Re: [Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Greg Landrum
Hi Eduardo, If I'm understanding what you want to do correctly, then you could try extending your SMARTS pattern to include a ring bond to a neighbor from each atom in the ring: *@*~1~*(@*)~*(@*)~*(@*)~*(@*)~*~1@* If you only want the indices of the ring atoms, you can then just pick those out

Re: [Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Wim Dehaen
The above solution with !r4 doesn't work because for sssr reasons these atoms are considered to be in a 4 membered ring also if the 4 membered ring is "exo" to the central 6 membered one. AFAIK there is no good way to do a general ring size filter in an atom definition using SMARTS. Below is a

Re: [Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Geoffrey Hutchison
> Nevermind, x3 won't exclude the fused 4-atom rings from your first example. > I'll let you know if I think of some other way. :-) I think you'd want something like this, perhaps - to exclude atoms in ring size 4? [*;R2!r4]~1~[*;R2!r4]~[*;R2!r4]~[*;R2!r4]~[*;R2!r4]~[*;R2!r4]~1 I also don't

Re: [Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Ivan Tubert-Brohman
On Tue, Jun 7, 2022 at 1:39 PM Ivan Tubert-Brohman < ivan.tubert-broh...@schrodinger.com> wrote: > Perhaps using x3 instead (means "number of ring bonds") would work for > your purposes? > Nevermind, x3 won't exclude the fused 4-atom rings from your first example. I'll let you know if I think of

Re: [Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Ivan Tubert-Brohman
Hi Eduardo, I believe the problem is that r6 means "in *smallest* SSSR ring of size ", where "smallest" in this context means that, for example, for an atom at the ring fusion between a 5-member ring and a 6-member ring, r5 would match that atom but r6 wouldn't. Perhaps using x3 instead (means

[Rdkit-discuss] Problem with Mol type in PostgreSQL and asyncpg

2022-06-07 Thread Katarzyna Rzęsikowska
Hi, I want to insert a compound to table Substance. The table has id, smiles(varchar) and structure(Mol). I used Mol class from https://github.com/rvianello/razi repository. When I try to execute SQL query using asyncpg: insert into substance (smiles, structure) (select r.smiles,

[Rdkit-discuss] SMARTS pattern

2022-06-07 Thread Eduardo Mayo
Greetings!! I hope this email finds you well. I need a SMARTS pattern that matches this molecule fragment [image: image.png] The first pattern I used was: [*;R2]~1~[*;R2]~[*;R2]~[*;R2]~[*;R2]~[*;R2]~1 However, it also matches this fragment. This is not the expected behavior but it agrees with