66 os .path .join (os .path .abspath (__file__ ), ".." , ".." , ".." , "common" )
77 )
88)
9- from env_indigo import * # noqa
9+ from env_indigo import Indigo # noqa
1010
1111indigo = Indigo ()
1212
@@ -66,6 +66,13 @@ def testTauSubFlags():
6666 mol2 = indigo .loadMolecule ("O=C1N=CNC2=C1C=NN2" )
6767 testSingleTauMatch (mol1 , mol2 , "TAU" , False , False )
6868 testSingleTauMatch (mol1 , mol2 , "TAU INCHI" , True , True )
69+ # Test INNER
70+ mol1 = indigo .loadQueryMolecule ("OC1=CC=CNC1" )
71+ mol2 = indigo .loadMolecule ("O=C1CNCC2=CC=CC=C12" )
72+ testSingleTauMatch (mol1 , mol2 , "TAU INNER" , False , False )
73+ mol1 = indigo .loadQueryMolecule ("C=C1CCC(=C)CC1" )
74+ mol2 = indigo .loadMolecule ("CC(C)=C1CCC(C)=CC1" )
75+ testSingleTauMatch (mol1 , mol2 , "TAU INNER" , True , True )
6976
7077
7178testTauSubFlags ()
@@ -86,3 +93,27 @@ def testTauSubFlags():
8693
8794mol3 = indigo .unserialize (mol2 .serialize ())
8895testSingleTauMatch (mol1 , mol3 , "TAU" , True , True )
96+
97+ # test performance
98+ indigo .clearTautomerRules ()
99+ mol1 = indigo .loadQueryMolecule ("CC(O)=CCC" )
100+ mol2 = indigo .loadMolecule (
101+ r"O(N1C=NC2C(N)=NC=NC1=2)C1CC(OP(=O)(O)OCC2C(OP(=O)(O)OCC3C(OP"
102+ r"(=O)(O)OCC4C(OP(=O)(O)OCC5C(OP(=O)(O)OCC6C(OP(=O)(O)OCC7C(OP"
103+ r"(=O)(O)OCC8C(OP(=O)(O)OCC9C(OP(=O)(O)OCC%10C(OP(=O)(O)OCC%11"
104+ r"C(OP(=O)(O)OCC%12C(OP(=O)(O)OCC%13C(OP(=O)(O)OCC%14C(OP(=O)("
105+ r"O)OCC%15C(OP(=O)(O)OCC%16C(OP(=O)(O)OCC%17C(OP(=O)(O)OCC%18C"
106+ r"(OP(=O)(O)OCC%19C(OP(=O)(O)OCC%20C(OP(=O)(O)OCC%21C(O)CC(ON%"
107+ r"22C=NC%23C(N)=NC=NC%22=%23)O%21)CC(ON%21C=CC(=O)NC%21=O)O%20"
108+ r")CC(ON%20C=NC%21C(=O)NC(N)=NC%20=%21)O%19)CC(ON%19C=CC(N)=NC"
109+ r"%19=O)O%18)CC(ON%18C=NC%19C(N)=NC=NC%18=%19)O%17)CC(ON%17C=C"
110+ r"C(=O)NC%17=O)O%16)CC(ON%16C=NC%17C(=O)NC(N)=NC%16=%17)O%15)C"
111+ r"C(ON%15C=CC(N)=NC%15=O)O%14)CC(ON%14C=NC%15C(N)=NC=NC%14=%15"
112+ r")O%13)CC(ON%13C=CC(=O)NC%13=O)O%12)CC(ON%12C=NC%13C(=O)NC(N)"
113+ r"=NC%12=%13)O%11)CC(ON%11C=CC(N)=NC%11=O)O%10)CC(ON%10C=NC%11"
114+ r"C(N)=NC=NC%10=%11)O9)CC(ON9C=CC(=O)NC9=O)O8)CC(ON8C=NC9C(=O)"
115+ r"NC(N)=NC8=9)O7)CC(ON7C=CC(N)=NC7=O)O6)CC(ON6C=NC7C(N)=NC=NC6"
116+ r"=7)O5)CC(ON5C=CC(=O)NC5=O)O4)CC(ON4C=NC5C(=O)NC(N)=NC4=5)O3)"
117+ r"CC(ON3C=CC(N)=NC3=O)O2)C(COP(O)(=O)O)O1"
118+ )
119+ testSingleTauMatch (mol1 , mol2 , "TAU INNER" , False , False )
0 commit comments