PREPARE dummy AS SELECT rdkit_version();
SET rdkit.ignore_reaction_agents=false;
SET rdkit.agent_FP_bit_ratio=0.2;
SET rdkit.difference_FP_weight_agents=1;
SET rdkit.difference_FP_weight_nonagents=10;
SET rdkit.move_unmmapped_reactants_to_agents=true;
SET rdkit.threshold_unmapped_reactant_atoms=0.2;
SET rdkit.init_reaction=true;
SELECT reaction_from_smiles('c1ccccc1>>c1cccnc1');
 reaction_from_smiles 
----------------------
 c1ccccc1>>c1ccncc1
(1 row)

SELECT reaction_from_smiles('c1ccccc1>CC(=O)O>c1cccnc1');
   reaction_from_smiles    
---------------------------
 c1ccccc1>CC(=O)O>c1ccncc1
(1 row)

SELECT reaction_from_smarts('[c1:1][c:2][c:3][c:4]c[c1:5]>CC(=O)O>[c1:1][c:2][c:3][c:4]n[c1:5]');
                              reaction_from_smarts                               
---------------------------------------------------------------------------------
 c([cH:4][cH:3][cH:2][cH2:1])[cH2:5]>CC(=O)O>n([cH:4][cH:3][cH:2][cH2:1])[cH2:5]
(1 row)

SELECT reaction_from_smarts('C(F)(F)F.[c1:1][c:2][c:3][c:4]c[c1:5]>CC(=O)O>[c1:1][c:2][c:3][c:4]n[c1:5]');
                                  reaction_from_smarts                                  
----------------------------------------------------------------------------------------
 c([cH:4][cH:3][cH:2][cH2:1])[cH2:5]>CC(=O)O.FC(F)F>n([cH:4][cH:3][cH:2][cH2:1])[cH2:5]
(1 row)

SELECT reaction_from_smarts('c1ccc[n,c]c1>>c1nccnc1');
 reaction_from_smarts 
----------------------
 *1ccccc1>>c1cnccn1
(1 row)

SELECT reaction_to_smiles(reaction_from_smiles('c1ccccc1>>c1cccnc1'));
 reaction_to_smiles 
--------------------
 c1ccccc1>>c1ccncc1
(1 row)

SELECT reaction_to_smiles(reaction_from_smarts('c1ccc[n,c]c1>>c1nccnc1'));
 reaction_to_smiles 
--------------------
 *1ccccc1>>c1cnccn1
(1 row)

SELECT reaction_to_smarts(reaction_from_smarts('c1ccc[n,c]c1>>c1nccnc1'));
   reaction_to_smarts   
------------------------
 c1ccc[n,c]c1>>c1nccnc1
(1 row)

SELECT reaction_to_smarts('c1cccnc1>>c1nccnc1'::reaction);
                         reaction_to_smarts                         
--------------------------------------------------------------------
 [#6]1:[#6]:[#6]:[#6]:[#7]:[#6]:1>>[#6]1:[#7]:[#6]:[#6]:[#7]:[#6]:1
(1 row)

SELECT reaction_to_ctab(reaction_from_smiles('c1ccccc1>>c1cccnc1'));
                           reaction_to_ctab                            
-----------------------------------------------------------------------
 $RXN                                                                 +
                                                                      +
       RDKit                                                          +
                                                                      +
   1  1                                                               +
 $MOL                                                                 +
                                                                      +
      RDKit          2D                                               +
                                                                      +
   6  6  0  0  0  0  0  0  0  0999 V2000                              +
     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+
    -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  2  4  0                                                         +
   2  3  4  0                                                         +
   3  4  4  0                                                         +
   4  5  4  0                                                         +
   5  6  4  0                                                         +
   6  1  4  0                                                         +
 M  END                                                               +
 $MOL                                                                 +
                                                                      +
      RDKit          2D                                               +
                                                                      +
   6  6  0  0  0  0  0  0  0  0999 V2000                              +
     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+
    -0.7500    1.2990    0.0000 N   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  2  4  0                                                         +
   2  3  4  0                                                         +
   3  4  4  0                                                         +
   4  5  4  0                                                         +
   5  6  4  0                                                         +
   6  1  4  0                                                         +
 M  END                                                               +
 
(1 row)

SELECT reaction_numreactants(reaction_from_smiles('[Cl].c1ccccc1>>c1cccnc1.[OH2]'));
 reaction_numreactants 
-----------------------
                     2
(1 row)

SELECT reaction_numproducts(reaction_from_smiles('[Cl].c1ccccc1>>c1cccnc1.[OH2]'));
 reaction_numproducts 
----------------------
                    2
(1 row)

SELECT reaction_numagents(reaction_from_smiles('[Cl].c1ccccc1>CC(=O)O.[Na+]>c1cccnc1.[OH2]'));
 reaction_numagents 
--------------------
                  2
(1 row)

SELECT reaction_numagents(reaction_from_smarts('C(F)(F)F.[c1:1][c:2][c:3][c:4]c[c1:5]>CC(=O)O>[c1:1][c:2][c:3][c:4]n[c1:5]'));
 reaction_numagents 
--------------------
                  2
(1 row)

SET rdkit.move_unmmapped_reactants_to_agents=false;
SELECT reaction_numagents(reaction_from_smarts('C(F)(F)F.[c1:1][c:2][c:3][c:4]c[c1:5]>CC(=O)O>[c1:1][c:2][c:3][c:4]n[c1:5]'));
 reaction_numagents 
--------------------
                  1
(1 row)

SET rdkit.move_unmmapped_reactants_to_agents=true;
SET rdkit.threshold_unmapped_reactant_atoms=0.9;
SELECT reaction_numagents(reaction_from_smarts('C(F)(F)F.[c1:1][c:2][c:3][c:4]c[c1:5]>CC(=O)O>[c1:1][c:2][c:3][c:4]n[c1:5]'));
 reaction_numagents 
--------------------
                  3
(1 row)

SET rdkit.threshold_unmapped_reactant_atoms=0.2;
SELECT 'c1ccccc1>>c1cccnc1'::reaction @= 'c1ccccc1>>c1cccnc1'::reaction;
 ?column? 
----------
 t
(1 row)

SELECT 'c1ccccc1>>c1cccnc1'::reaction @= 'c1ccccc1>>c1cncnc1'::reaction;
 ?column? 
----------
 f
(1 row)

SELECT reaction_from_ctab('$RXN                                                                 
                                                                     
      RDKit                                                          
                                                                     
  1  1                                                               
$MOL                                                                 
                                                                     
     RDKit                                                           
                                                                     
  6  6  0  0  0  0  0  0  0  0999 V2000                              
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  4  0                                                         
  2  3  4  0                                                         
  3  4  4  0                                                         
  4  5  4  0                                                         
  5  6  4  0                                                         
  6  1  4  0                                                         
M  END                                                               
$MOL                                                                 
                                                                     
     RDKit                                                           
                                                                     
  6  6  0  0  0  0  0  0  0  0999 V2000                              
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  4  0                                                         
  2  3  4  0                                                         
  3  4  4  0                                                         
  4  5  4  0                                                         
  5  6  4  0                                                         
  6  1  4  0                                                         
M  END');
 reaction_from_ctab 
--------------------
 c1ccccc1>>c1ccncc1
(1 row)

CREATE TABLE tmp (id integer, tmprxn text);
\copy tmp from 'data/reaction_test_data.out.rsmi';
select * into pgreactions from (select id,reaction_from_smiles(tmprxn::cstring) rxn from tmp) as r where r is not null;
SET rdkit.move_unmmapped_reactants_to_agents=false;
select * into pgreactions_unchanged from (select id,reaction_from_smiles(tmprxn::cstring) rxn from tmp) as r where r is not null;
DROP table tmp;
SET rdkit.move_unmmapped_reactants_to_agents=true;
SELECT count(*) FROM pgreactions;
 count 
-------
  1000
(1 row)

SELECT count(*) FROM pgreactions_unchanged;
 count 
-------
  1000
(1 row)

SELECT SUM(reaction_numreactants(rxn)) FROM pgreactions;
 sum  
------
 1898
(1 row)

SELECT SUM(reaction_numreactants(rxn)) FROM pgreactions_unchanged;
 sum  
------
 3517
(1 row)

SELECT SUM(reaction_numproducts(rxn)) FROM pgreactions;
 sum  
------
 1157
(1 row)

SELECT SUM(reaction_numproducts(rxn)) FROM pgreactions_unchanged;
 sum  
------
 1157
(1 row)

SELECT SUM(reaction_numagents(rxn)) FROM pgreactions;
 sum  
------
 2528
(1 row)

SELECT SUM(reaction_numagents(rxn)) FROM pgreactions_unchanged;
 sum 
-----
 909
(1 row)

CREATE INDEX rxnidx ON pgreactions USING gist(rxn);
SET enable_indexscan=off;
SET enable_bitmapscan=off;
SET enable_seqscan=on;
SELECT count(*) FROM pgreactions WHERE rxn@>'c1ccccc1>>c1ccncc1';
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1cnccc1>>c1ccccc1';
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>c1ccncc1'<@rxn;
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>c1ccccc1'<@rxn;
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1ccccc1>>';
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1cnccc1>>';
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>'<@rxn;
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>'<@rxn;
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'>>c1ccncc1';
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'>>c1ccccc1';
 count 
-------
   650
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccncc1'<@rxn;
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccccc1'<@rxn;
 count 
-------
   650
(1 row)

SET enable_indexscan=on;
SET enable_bitmapscan=on;
SET enable_seqscan=off;
SELECT count(*) FROM pgreactions WHERE rxn@>'c1ccccc1>>c1ccncc1';
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1cnccc1>>c1ccccc1';
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>c1ccncc1'<@rxn;
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>c1ccccc1'<@rxn;
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1ccccc1>>';
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'c1cnccc1>>';
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>'<@rxn;
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>'<@rxn;
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'>>c1ccncc1';
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn@>'>>c1ccccc1';
 count 
-------
   650
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccncc1'<@rxn;
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccccc1'<@rxn;
 count 
-------
   650
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'c1ccccc1>>c1ccncc1';
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'c1cnccc1>>c1ccccc1';
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>c1ccncc1'?<rxn;
 count 
-------
    47
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>c1ccccc1'?<rxn;
 count 
-------
    50
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'c1ccccc1>>';
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'c1cnccc1>>';
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1ccccc1>>'?<rxn;
 count 
-------
   667
(1 row)

SELECT count(*) FROM pgreactions WHERE 'c1cnccc1>>'?<rxn;
 count 
-------
    83
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'>>c1ccncc1';
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE rxn?>'>>c1ccccc1';
 count 
-------
   650
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccncc1'?<rxn;
 count 
-------
    79
(1 row)

SELECT count(*) FROM pgreactions WHERE '>>c1ccccc1'?<rxn;
 count 
-------
   650
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ccccc1>>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ncccc1>>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.636363636363636
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.603448275862069
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',2), reaction_difference_fp('c1ccccc1>>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',2), reaction_difference_fp('c1ncccc1>>c1ncncc1',2));
 tanimoto_sml 
--------------
          0.2
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',2));
 tanimoto_sml 
--------------
          0.2
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',3), reaction_difference_fp('c1ccccc1>>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',3), reaction_difference_fp('c1ncccc1>>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.454545454545455
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.444933920704846
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',1), reaction_structural_bfp('c1ccccc1>>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',1), reaction_structural_bfp('c1ncccc1>>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.620689655172414
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.514285714285714
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',2), reaction_structural_bfp('c1ccccc1>>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',2), reaction_structural_bfp('c1ncccc1>>c1ncncc1',2));
   tanimoto_sml    
-------------------
 0.461538461538462
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',2));
   tanimoto_sml    
-------------------
 0.461538461538462
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',3), reaction_structural_bfp('c1ccccc1>>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',3), reaction_structural_bfp('c1ncccc1>>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.409090909090909
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',3));
   tanimoto_sml   
------------------
 0.32258064516129
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',4), reaction_structural_bfp('c1ccccc1>>c1ccncc1',4));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',4), reaction_structural_bfp('c1ncccc1>>c1ncncc1',4));
   tanimoto_sml   
------------------
 0.27710843373494
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',4));
   tanimoto_sml    
-------------------
 0.237113402061856
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>>c1ncncc1',5));
   tanimoto_sml    
-------------------
 0.793388429752066
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',5));
   tanimoto_sml    
-------------------
 0.604938271604938
(1 row)

SET rdkit.agent_FP_bit_ratio=0.5;
SET rdkit.difference_FP_weight_agents=-3;
SET rdkit.difference_FP_weight_nonagents=7;
SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ccccc1>>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ncccc1>>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.636363636363636
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.515789473684211
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',2), reaction_difference_fp('c1ccccc1>>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',2), reaction_difference_fp('c1ncccc1>>c1ncncc1',2));
 tanimoto_sml 
--------------
          0.2
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',2));
 tanimoto_sml 
--------------
          0.2
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',3), reaction_difference_fp('c1ccccc1>>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',3), reaction_difference_fp('c1ncccc1>>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.454545454545455
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.403314917127072
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',1), reaction_structural_bfp('c1ccccc1>>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',1), reaction_structural_bfp('c1ncccc1>>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.620689655172414
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.514285714285714
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',2), reaction_structural_bfp('c1ccccc1>>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',2), reaction_structural_bfp('c1ncccc1>>c1ncncc1',2));
   tanimoto_sml    
-------------------
 0.444444444444444
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',2), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',2));
   tanimoto_sml    
-------------------
 0.444444444444444
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',3), reaction_structural_bfp('c1ccccc1>>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',3), reaction_structural_bfp('c1ncccc1>>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.428571428571429
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',3), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',3));
   tanimoto_sml    
-------------------
 0.344827586206897
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',4), reaction_structural_bfp('c1ccccc1>>c1ccncc1',4));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',4), reaction_structural_bfp('c1ncccc1>>c1ncncc1',4));
   tanimoto_sml    
-------------------
 0.285714285714286
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',4), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',4));
   tanimoto_sml    
-------------------
 0.244897959183673
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>>c1ncncc1',5));
 tanimoto_sml 
--------------
          0.8
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',5));
   tanimoto_sml    
-------------------
 0.608695652173913
(1 row)

SET rdkit.ignore_reaction_agents=true;
SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ccccc1>>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>>c1ccncc1',1), reaction_difference_fp('c1ncccc1>>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.636363636363636
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_difference_fp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',1), reaction_difference_fp('c1ncccc1>[Na+]>c1ncncc1',1));
   tanimoto_sml    
-------------------
 0.636363636363636
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>>c1ncncc1',5));
 tanimoto_sml 
--------------
          0.8
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5));
 tanimoto_sml 
--------------
            1
(1 row)

SELECT tanimoto_sml(reaction_structural_bfp('c1ccccc1>CC(=O)O.[Na+]>c1ccncc1',5), reaction_structural_bfp('c1ncccc1>[Na+]>c1ncncc1',5));
 tanimoto_sml 
--------------
          0.8
(1 row)

SELECT reaction_to_svg('[C:1][O:2].[C:3][C:4]>>[C:1][O:2][C:3][C:4]'::reaction) svg;
                                                                                                  svg                                                                                                  
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 <?xml version='1.0' encoding='iso-8859-1'?>                                                                                                                                                          +
 <svg version='1.1' baseProfile='full'                                                                                                                                                                +
               xmlns='http://www.w3.org/2000/svg'                                                                                                                                                     +
                       xmlns:rdkit='http://www.rdkit.org/xml'                                                                                                                                         +
                       xmlns:xlink='http://www.w3.org/1999/xlink'                                                                                                                                     +
                   xml:space='preserve'                                                                                                                                                               +
 width='400px' height='200px' viewBox='0 0 400 200'>                                                                                                                                                  +
 <!-- END OF HEADER -->                                                                                                                                                                               +
 <rect style='opacity:1.0;fill:#FFFFFF;stroke:none' width='400' height='200' x='0' y='0'> </rect>                                                                                                     +
 <path class='bond-0' d='M 47.583,100 L 53.3461,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                +
 <path class='bond-0' d='M 53.3461,100 L 59.1092,100' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />               +
 <path class='bond-1' d='M 121.036,100 L 132.915,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />               +
 <path class='bond-2' d='M 288.928,98.6943 L 293.434,96.7767' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />       +
 <path class='bond-2' d='M 293.434,96.7767 L 297.94,94.8591' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />        +
 <path class='bond-3' d='M 315.069,95.7853 L 320.672,100' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />           +
 <path class='bond-3' d='M 320.672,100 L 326.276,104.215' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />           +
 <path class='bond-4' d='M 343.052,105.291 L 352.417,101.306' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />       +
 <text x='27.9822' y='105.247' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:1</tspan></text>+
 <text x='59.1092' y='105.247' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O:2</tspan></text>+
 <text x='101.435' y='105.247' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:3</tspan></text>+
 <text x='132.915' y='105.247' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:4</tspan></text>+
 <text x='269.327' y='108.111' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:1</tspan></text>+
 <text x='297.94' y='95.7853' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O:2</tspan></text> +
 <text x='323.451' y='114.708' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:3</tspan></text>+
 <text x='352.417' y='102.382' style='font-size:10px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>C:4</tspan></text>+
 <text x='81.8359' y='112' style='font-size:24px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>+</tspan></text>      +
 <path d='M 163.702,100 L 247.647,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                              +
 <path d='M 247.647,100 L 244.012,97.9014' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                          +
 <path d='M 247.647,100 L 244.012,102.099' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                          +
 </svg>                                                                                                                                                                                               +
 
(1 row)

SELECT reaction_to_svg('[C:1][O:2].[C:3][C:4]>>[C:1][O:2][C:3][C:4]'::reaction, true) svg;
                                                                                                 svg                                                                                                 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 <?xml version='1.0' encoding='iso-8859-1'?>                                                                                                                                                        +
 <svg version='1.1' baseProfile='full'                                                                                                                                                              +
               xmlns='http://www.w3.org/2000/svg'                                                                                                                                                   +
                       xmlns:rdkit='http://www.rdkit.org/xml'                                                                                                                                       +
                       xmlns:xlink='http://www.w3.org/1999/xlink'                                                                                                                                   +
                   xml:space='preserve'                                                                                                                                                             +
 width='400px' height='200px' viewBox='0 0 400 200'>                                                                                                                                                +
 <!-- END OF HEADER -->                                                                                                                                                                             +
 <rect style='opacity:1.0;fill:#FFFFFF;stroke:none' width='400' height='200' x='0' y='0'> </rect>                                                                                                   +
 <path d='M 27.1278,100 L 60.6752,100' style='fill:none;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:14px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                           +
 <path d='M 105.405,100 L 138.952,100' style='fill:none;fill-rule:evenodd;stroke:#FFCC99;stroke-width:14px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                           +
 <path d='M 284.324,103.053 L 315.193,89.9173' style='fill:none;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:14px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                   +
 <path d='M 342.003,110.083 L 372.872,96.9472' style='fill:none;fill-rule:evenodd;stroke:#FFCC99;stroke-width:14px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                   +
 <ellipse cx='27.1278' cy='100' rx='8.94597' ry='8.94597' style='fill:#FFFFAA;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />      +
 <ellipse cx='60.6752' cy='100' rx='8.94597' ry='8.94597' style='fill:#FFFFAA;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />      +
 <ellipse cx='105.405' cy='100' rx='8.94597' ry='8.94597' style='fill:#FFCC99;fill-rule:evenodd;stroke:#FFCC99;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />      +
 <ellipse cx='138.952' cy='100' rx='8.94597' ry='8.94597' style='fill:#FFCC99;fill-rule:evenodd;stroke:#FFCC99;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />      +
 <ellipse cx='284.324' cy='103.053' rx='8.94597' ry='8.94597' style='fill:#FFFFAA;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />  +
 <ellipse cx='315.193' cy='89.9173' rx='8.94597' ry='8.94597' style='fill:#FFFFAA;fill-rule:evenodd;stroke:#FFFFAA;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />  +
 <ellipse cx='342.003' cy='110.083' rx='8.94597' ry='8.94597' style='fill:#FFCC99;fill-rule:evenodd;stroke:#FFCC99;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />  +
 <ellipse cx='372.872' cy='96.9472' rx='8.94597' ry='8.94597' style='fill:#FFCC99;fill-rule:evenodd;stroke:#FFCC99;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />  +
 <path class='bond-0' d='M 27.1278,100 L 41.2905,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />             +
 <path class='bond-0' d='M 41.2905,100 L 55.4531,100' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />             +
 <path class='bond-1' d='M 105.405,100 L 138.952,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />             +
 <path class='bond-2' d='M 284.324,103.053 L 297.148,97.5961' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />     +
 <path class='bond-2' d='M 297.148,97.5961 L 309.971,92.1394' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />     +
 <path class='bond-3' d='M 320.415,93.8451 L 331.209,101.964' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />     +
 <path class='bond-3' d='M 331.209,101.964 L 342.003,110.083' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />     +
 <path class='bond-4' d='M 342.003,110.083 L 372.872,96.9472' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />     +
 <text x='55.4531' y='105.591' style='font-size:11px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O</tspan></text>+
 <text x='309.971' y='95.5085' style='font-size:11px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O</tspan></text>+
 <text x='74.6271' y='112' style='font-size:23px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000' ><tspan>+</tspan></text>    +
 <path d='M 161.317,100 L 250.777,100' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                            +
 <path d='M 250.777,100 L 246.903,97.7635' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                        +
 <path d='M 250.777,100 L 246.903,102.236' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />                        +
 </svg>                                                                                                                                                                                             +
 
(1 row)

SET enable_indexscan=on;
SET enable_bitmapscan=on;
SET enable_seqscan=on;
DROP INDEX rxnidx;
