SELECT dice_sml(rdkit_fp('c1ccccc1'::mol),rdkit_fp('c1ccncc1'::mol));
     dice_sml      
-------------------
 0.372093023255814
(1 row)

SELECT tversky_sml(rdkit_fp('c1ccccc1'::mol),rdkit_fp('c1ccncc1'::mol),0.5,0.5);
    tversky_sml    
-------------------
 0.372093023255814
(1 row)

SELECT tanimoto_sml(rdkit_fp('c1ccccc1'::mol),rdkit_fp('c1ccncc1'::mol));
   tanimoto_sml    
-------------------
 0.228571428571429
(1 row)

SELECT tversky_sml(rdkit_fp('c1ccccc1'::mol),rdkit_fp('c1ccncc1'::mol),1.0,1.0);
    tversky_sml    
-------------------
 0.228571428571429
(1 row)

SELECT dice_sml(atompair_fp('c1ccccc1'::mol),atompair_fp('c1ccncc1'::mol));
     dice_sml      
-------------------
 0.666666666666667
(1 row)

SELECT dice_sml(torsion_fp('c1ccccc1'::mol),torsion_fp('c1ccncc1'::mol));
     dice_sml      
-------------------
 0.333333333333333
(1 row)

SELECT dice_sml(morgan_fp('c1ccccc1'::mol,2),morgan_fp('c1ccncc1'::mol,2));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(morgan_fp('c1ccccc1'::mol),morgan_fp('c1ccncc1'::mol));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(morganbv_fp('c1ccccc1'::mol,2),morganbv_fp('c1ccncc1'::mol,2));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(morganbv_fp('c1ccccc1'::mol),morganbv_fp('c1ccncc1'::mol));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(featmorgan_fp('c1ccccc1'::mol,2),featmorgan_fp('c1ccncc1'::mol,2));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(featmorgan_fp('c1ccccc1'::mol),featmorgan_fp('c1ccncc1'::mol));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(featmorganbv_fp('c1ccccc1'::mol,2),featmorganbv_fp('c1ccncc1'::mol,2));
 dice_sml 
----------
      0.5
(1 row)

SELECT dice_sml(featmorganbv_fp('c1ccccc1'::mol),featmorganbv_fp('c1ccncc1'::mol));
 dice_sml 
----------
      0.5
(1 row)

SELECT tanimoto_sml(maccs_fp('c1ccccc1'::mol),maccs_fp('c1ccncc1'::mol));
 tanimoto_sml 
--------------
        0.375
(1 row)

SELECT dice_sml(maccs_fp('c1ccccc1'::mol),maccs_fp('c1ccncc1'::mol));
     dice_sml      
-------------------
 0.545454545454545
(1 row)

SET rdkit.tanimoto_threshold = 0.4;
SELECT
    id, tanimoto_sml(rdkit_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), f) AS sml
FROM
pgbfp
WHERE rdkit_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol) % f
ORDER BY sml DESC, id LIMIT 10;
    id    |        sml        
----------+-------------------
   698576 | 0.433663366336634
 16000816 | 0.423290203327172
  1959267 | 0.422750424448217
   576770 | 0.422310756972112
 16746067 | 0.420439844760673
  5770965 | 0.412478336221837
 24747640 | 0.412371134020619
 15945163 | 0.409246575342466
  5770966 | 0.408839779005525
   690546 | 0.408759124087591
(10 rows)

SET rdkit.tanimoto_threshold = 0.5;
SET rdkit.dice_threshold = 0.5;
SELECT
    id, dice_sml(torsion_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), f) AS sml
FROM
pgtorsfp
WHERE torsion_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol) # f
ORDER BY sml DESC, id;
   id    | sml 
---------+-----
 3790017 | 0.5
(1 row)

SELECT
    id, dice_sml(atompair_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), f) AS sml
FROM
pgpairfp
WHERE atompair_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol) # f
ORDER BY sml DESC, id LIMIT 10;
    id    |        sml        
----------+-------------------
   659725 | 0.636678200692042
   917183 | 0.595155709342561
 10713707 | 0.595092024539877
  3790017 | 0.588555858310627
   230488 | 0.576687116564417
 16193886 |  0.55012853470437
  3236648 |         0.5390625
  5359275 | 0.534201954397394
  6213987 | 0.532871972318339
   161167 |  0.52760736196319
(10 rows)

select tanimoto_sml(rdkit_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), rdkit_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.315398886827458
(1 row)

set rdkit.rdkit_fp_size = 512;
select tanimoto_sml(rdkit_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), rdkit_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
       sml        
------------------
 0.47103274559194
(1 row)

set rdkit.rdkit_fp_size = 1024;
select tanimoto_sml(rdkit_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), rdkit_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.315398886827458
(1 row)

select tanimoto_sml(layered_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), layered_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.724941724941725
(1 row)

set rdkit.layered_fp_size = 512;
select tanimoto_sml(layered_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), layered_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.788235294117647
(1 row)

set rdkit.layered_fp_size = 1024;
select tanimoto_sml(layered_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), layered_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.724941724941725
(1 row)

select tanimoto_sml(morganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), morganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
  sml  
-------
 0.325
(1 row)

set rdkit.morgan_fp_size = 512;
select tanimoto_sml(morganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), morganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
  sml  
-------
 0.325
(1 row)

set rdkit.morgan_fp_size = 1024;
select tanimoto_sml(morganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), morganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.317073170731707
(1 row)

select tanimoto_sml(featmorganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), featmorganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.205882352941176
(1 row)

set rdkit.featmorgan_fp_size = 512;
select tanimoto_sml(featmorganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), featmorganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.205882352941176
(1 row)

set rdkit.featmorgan_fp_size = 1024;
select tanimoto_sml(featmorganbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), featmorganbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.205882352941176
(1 row)

select tanimoto_sml(torsionbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), torsionbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.454545454545455
(1 row)

set rdkit.hashed_torsion_fp_size = 512;
select tanimoto_sml(torsionbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), torsionbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.476190476190476
(1 row)

set rdkit.hashed_torsion_fp_size = 1024;
select tanimoto_sml(torsionbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), torsionbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.454545454545455
(1 row)

select tanimoto_sml(atompairbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), atompairbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
       sml        
------------------
 0.56198347107438
(1 row)

set rdkit.hashed_atompair_fp_size = 512;
select tanimoto_sml(atompairbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), atompairbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.582608695652174
(1 row)

set rdkit.hashed_atompair_fp_size = 1024;
select tanimoto_sml(atompairbv_fp('O=C1CC(OC2=CC=CC=C12)C1=CC=CC=C1'::mol), atompairbv_fp('N=C1CC(NC2=CC=CC=C12)C1=CC=CC=C1'::mol)) AS sml;
        sml        
-------------------
 0.571428571428571
(1 row)

