Syntax Error (implicit multiplication not enabled)

User 1aff773a09

27-08-2013 03:11:19

Hi,


I'm trying to check for SMILES validity using the below query:


select jc_evaluate_x('CCOC', 'chemTerms:check("aromaticity..valence")') from dual;


But got the following error:


ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: Error while compiling expression:
check("aromaticity..valence")
    Syntax Error (implicit multiplication not enabled)
ORA-06512: at "JCMV53.JCHEM_CORE_PKG", line 135
ORA-06512: at "JCMV53.JCHEM_CORE_PKG", line 146
ORA-06512: at "JCMV53.EVALUATEX_FUNC", line 10


We are using JChem Cartridge 5.3 & our environment as below:


Oracle environment:
Oracle Database 11g Enterprise Edition 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 Server environment:
Java VM vendor: Sun Microsystems Inc.
Java version: 1.6.0_20
Java VM version: 16.3-b01
JChem version: 5.2.6
JChem Index version: 5020400
JDBC driver version: 11.1.0.7.0-Production


 


Thanks!



Regards,
Samantha

ChemAxon aa7c50abf8

27-08-2013 09:51:45

Hi Samantha,


Structure Checkers are available as Chemical Terms starting with Marvin/JChem version 5.4.0. I didn't check when the particular checker functions you need were released... Consider upgrading, if you need them...


Best Regards,


Peter

User 1aff773a09

28-08-2013 01:19:52

Hi Peter,


Is there any other way we can validate SMILES with cartridge v5.3 ?


Thanks.


Regards,


Samantha

ChemAxon aa7c50abf8

28-08-2013 11:33:37

Hi Samantha,


Before we get down to finding out the answer to your question, the question seems to be in order: why are you asking about JChem Cartridge 5.3 (an equally oldish version by ChemAxon standards), wheras you seem to have version 5.2.6?


Off the top of my head: there is no good solution with earlier JChem Cartridge versions for this.


Thanks,


Peter

ChemAxon aa7c50abf8

28-08-2013 11:50:17

Samantha,


Starting with 5.0.2, you can use the hasValenceError() Chemical Tems function (with jc_evaluate_x). Checking aromacity, however, was not exposed in JChem Cartridge before Structure Checker.


Peter

User 1aff773a09

29-08-2013 03:35:30

Hi,


I try the following statement:


select jc_evaluate_x('C1=CC=CC=C1', 'chemTerms:hasValenceError()') from dual;
JC_EVALUATE_X('C1=CC=CC=C1','CHEMTERMS:HASVALENCEERROR()')                      
--------------------------------------------------------------------------------
0                                                                               
1 row selected.


select jc_evaluate_x('Hahahhahaha', 'chemTerms:hasValenceError()') from dual;


ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: Problem importing query structure: Hahahhahaha: chemaxon.formats.MolFormatException: Cannot create record reader for the "chime" format
ORA-06512: at "JCMV53.JCHEM_CORE_PKG", line 135
ORA-06512: at "JCMV53.JCHEM_CORE_PKG", line 146
ORA-06512: at "JCMV53.EVALUATEX_FUNC", line 10


Is there a friendlier function that returns result like "valid" or "invalid"


Thanks!



Regards,


Samantha

ChemAxon 61b4fee994

29-08-2013 07:36:52

Hi,


The statement you tried threw an error, because it was not in the right format at alll. It didn't represent an invalid structure, but an unreadable structure. If you want to filter out all the structures that has a bad structure or valence errors, you can create a small PL/SQL function.


You have to add grants to use the jcf package directly to the user,
if you haven't done it yet (because the privilege handling of Oracle Db
requires it):


call <jchem_owner>.privman_pkg.grants_on_jcobjs(<jchem_owner>,<stored procedure owner>);


And the function (it returns 'valid'or ínvalid'):


create or replace
function ISVALIDFORMATANDVALENCE(structure in varchar2) return varchar2 is
res varchar2(1000);
begin
  begin
    res:=<jchem_owner>.jcf.EVALUATE_X(structure, 'chemTerms:hasValenceError()');
    if res='0'
    then return 'valid';
    else return 'invalid';
    end if;
  EXCEPTION
    when OTHERS then return 'invalid';
  end;
end;


/


And you can use it like this:


select ISVALIDFORMATANDVALENCE(<your structure>) isvalid from dual;


Regards,


Tamas