Skip to content

Commit

Permalink
#1446 Dearomatization does not work with query features
Browse files Browse the repository at this point in the history
Add UTs
  • Loading branch information
AliaksandrDziarkach committed Dec 26, 2023
1 parent 20bdea8 commit 88c7c7e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/tests/integration/ref/arom/query_dearom.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ Dearomatized: [#6]1-[#6]=[#6]-[#6]=[#6]-[#6;h0]=1
Aromatic: c1cccc[c;X4]1
Dearomatized: [#6]1-[#6]=[#6]-[#6]=[#6]-[#6;X4]=1

Aromatic: [#6]12:[#6]:[#6]:[#6]:[#6]:[#6]:1:[#6]:[#7]:[#7;h1]:2
Dearomatized: [#6]12-[#6]=[#6]-[#6]=[#6]-[#6]-1=[#6]-[#7]-[#7;h1]=2

Aromatic: [#6]12:[#6]:[#6]:[#6]:[#6]:[#6]:1:[#6]:[#7]:[#7;h0]:2
Dearomatized: [#6]12-[#6]=[#6]-[#6]=[#6]-[#6]-1=[#6]-[#7]-[#7;h0]=2

Aromatic: [#6]12:[#6]:[#6]:[#6]:[#6]:[#6]:1:[#6]:[#7;h0]:[#7]:2
Dearomatized: [#6]12-[#6]=[#6]-[#6]=[#6]-[#6]=1-[#6]=[#7;h0]-[#7]-2

Aromatic: [#6]12:[#6]:[#6]:[#6]:[#6]:[#6]:1:[#6]:[#7;h0]:[#7;h0]:2
Cannot be dearomatized: [#6]12:[#6]:[#6]:[#6]:[#6]:[#6]:1:[#6]:[#7;h0]:[#7;h0]:2

22 changes: 22 additions & 0 deletions api/tests/integration/tests/arom/query_dearom.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,25 @@
print("Aromatic: %s" % m.smarts())
m.dearomatize()
print("Dearomatized: %s\n" % m.smarts())

m = indigo.loadSmarts("[#6]12:[#7;h1]:[#7]:[#6]:[#6]:1:[#6]:[#6]:[#6]:[#6]:2")
print("Aromatic: %s" % m.smarts())
m.dearomatize()
print("Dearomatized: %s\n" % m.smarts())

m = indigo.loadSmarts("[#6]12:[#7;h0]:[#7]:[#6]:[#6]:1:[#6]:[#6]:[#6]:[#6]:2")
print("Aromatic: %s" % m.smarts())
m.dearomatize()
print("Dearomatized: %s\n" % m.smarts())

m = indigo.loadSmarts("[#6]12:[#7]:[#7;h0]:[#6]:[#6]:1:[#6]:[#6]:[#6]:[#6]:2")
print("Aromatic: %s" % m.smarts())
m.dearomatize()
print("Dearomatized: %s\n" % m.smarts())

m = indigo.loadSmarts(
"[#6]12:[#7;h0]:[#7;h0]:[#6]:[#6]:1:[#6]:[#6]:[#6]:[#6]:2"
)
print("Aromatic: %s" % m.smarts())
m.dearomatize()
print("Cannot be dearomatized: %s\n" % m.smarts())

0 comments on commit 88c7c7e

Please sign in to comment.