Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atom coordinates in CXSMILES disrupt exact matches when do_enhanced_stereo_sss==true #7268

Open
someonetookmyname opened this issue Mar 17, 2024 · 0 comments
Labels

Comments

@someonetookmyname
Copy link

If the CXSMILES used to query the cartridge has atom coordinates, then the query will return nothing unless do_enhanced_stereo_sss==false.

See this discussion for more details: #7190

To reproduce:

drop table if exists tst;
DROP TABLE
create table tst (pk integer, m mol);
CREATE TABLE
create index tstidx on tst using gist(m);
CREATE INDEX
insert into tst (pk, m) values (1, mol_from_ctab('
     RDKit          2D

  8  8  0  0  0  0  0  0  0  0999 V2000
    3.0000    0.0000    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0
    1.5000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.7500   -1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7500   -1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.5000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.0000    0.0000    0.0000 Br  0  0  0  0  0  0  0  0  0  0  0  0
   -0.7500    1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.7500    1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  2  1  1  1
  2  3  1  0
  3  4  1  0
  4  5  1  0
  5  6  1  6
  5  7  1  0
  7  8  1  0
  8  2  1  0
M  END'));
INSERT 0 1
set rdkit.do_chiral_sss=true;
SET
set rdkit.do_enhanced_stereo_sss=true;
SET
select pk from tst where m @= 'Cl[C@H]1CC[C@H](Br)CC1'::mol;
 pk 
----
  1
(1 row)

select pk from tst where m @= 'Cl[C@H]1CC[C@H](Br)CC1 |(3,0,;1.5,0,;0.75,-1.29904,;-0.75,-1.29904,;-1.5,0,;-3,0,;-0.75,1.29904,;0.75,1.29904,)|'::mol;
 pk 
----
(0 rows)

set rdkit.do_enhanced_stereo_sss=false;
SET
select pk from tst where m @= 'Cl[C@H]1CC[C@H](Br)CC1'::mol;
 pk 
----
  1
(1 row)

select pk from tst where m @= 'Cl[C@H]1CC[C@H](Br)CC1 |(3,0,;1.5,0,;0.75,-1.29904,;-0.75,-1.29904,;-1.5,0,;-3,0,;-0.75,1.29904,;0.75,1.29904,)|'::mol;
 pk 
----
  1
(1 row)

Each above select statement would be expected to return 1 row, but 0 rows are returned when do_enhanced_stereo==true and CXSMILES contains atom coordinates.

Configuration (please complete the following information):

  • RDKit version: 2023_09_6
  • OS: Debian bookworm
  • Python version (if relevant): n/a
  • Are you using conda? No
  • If you are using conda, which channel did you install the rdkit from? n/a
  • If you are not using conda: how did you install the RDKit? Compiled from source

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant