problem to calculate the tanimoto coefficient with a query

User 247a2c5018

17-09-2013 09:55:43

dear support,


 


I have this sql query : 


 


 select distinct stru_id,CD_MOLWEIGHT, jc_tanimoto(cd_structure, :requ_smile) as tanimoto from sub_structure ,sub_substance a where a.subs_stru_id=stru_id and a.subs_etat_suppression in (0,1) and jc_compare(cd_structure, :requ_smile, 't:t simThreshold:0.95') = 1 order by CD_MOLWEIGHT asc,stru_id


 


 


I would like to calculate the tanimoto coefficient for each query result by similarity.


This query returns error when i add : jc_tanimoto(cd_structure, :requ_smile) as tanimoto


 


Thanks for your help


 


Kiet

ChemAxon aa7c50abf8

17-09-2013 10:14:24

Dear Kiet,


Please, could you post


(1) the error you get


(2) the output of the following SQL:


select jchem_core_pkg.getenvironment from dual;

Thanks


Peter

User 247a2c5018

17-09-2013 10:28:46

select jchem_core_pkg.getenvironment from dual;


 


GETENVIRONMENT


--------------------------------------------------------------------------------


Oracle environment:


Oracle Database 11g Release 11.2.0.3.0 - 64bit Production


PL/SQL Release 11.2.0.3.0 - Production


CORE    11.2.0.3.0      Production


TNS for Linux: Version 11.2.0.3.0 - Production


NLSRTL Version 11.2.0.3.0 - Production


 


JChem owner: SYSADMIN


 


JChem Server environment:


Java VM vendor: Oracle Corporation


 


GETENVIRONMENT


--------------------------------------------------------------------------------


Java version: 1.7.0_19


Java VM version: 23.7-b01


JChem version: 6.0.1


JChem Index version: 6000000


JDBC driver version: 11.1.0.7.0-Production






if I add  "jc_tanimoto(cd_structure, :requ_smile) as tanimoto" no results are obtained. If I remove "jc_tanimoto(cd_structure, :requ_smile) as tanimoto", I have 1 result.


ChemAxon aa7c50abf8

17-09-2013 11:16:54

Don't you get any error message? Just no rows are returned?


What happens if you execute the SQL from SQL*Plus or SQL Developer -- after replacing :requ_smile with the actual query structure?

User 247a2c5018

17-09-2013 13:49:05

select distinct stru_id,CD_MOLWEIGHT from sub_structure ,sub_substance a where a.subs_stru_id=stru_id and a.subs_etat_suppression in (0,1) and jc_compare(cd_structure, 'C1=CC2=C(C=C1)C=CC=C2', 't:t simThreshold:0.95') = 1 order by CD_MOLWEIGHT asc,stru_id;


 


STRU_ID              CD_MOLWEIGHT


-------------------- ------------


AB-00320330              128.1705





SQL> select distinct stru_id,CD_MOLWEIGHT, jc_tanimoto(cd_structure, 'C1=CC2=C(C=C1)C=CC=C2') as tanimoto from sub_structure ,sub_substance a where a.subs_stru_id=stru_id and a.subs_etat_suppression in (0,1) and jc_compare(cd_structure, 'C1=CC2=C(C=C1)C=CC=C2', 't:t simThreshold:0.95') = 1 order by CD_MOLWEIGHT asc,stru_id;

select distinct stru_id,CD_MOLWEIGHT, jc_tanimoto(cd_structure, 'C1=CC2=C(C=C1)C=CC=C2') as tanimoto from sub_structure ,sub_substance a where a.subs_stru_id=stru_id and a.subs_etat_suppression in (0,1) and jc_compare(cd_structure, 'C1=CC2=C(C=C1)C=CC=C2', 't:t simThreshold:0.95') = 1 order by CD_MOLWEIGHT asc,stru_id

                                      *

ERROR at line 1:

ORA-29900: operator binding does not exist

ORA-06553: PLS-306: wrong number or types of arguments in call to 'JC_TANIMOTO'

ChemAxon aa7c50abf8

17-09-2013 13:56:41

jc_tanimoto(cd_structure, utl_raw.cast_to_raw('C1=CC2=C(C=C1)C=CC=C2'))


?

User 247a2c5018

17-09-2013 13:58:53

thanks perfect!