Highlight superstructure & similarity search fail JChem5.5.1

User bb0bf41f20

16-02-2012 15:31:40

Hi there,


We are experiencing a problem using JChem 5.5.1 for highlighting superstructure and similarity searches. This problem is not seen when using JChem 5.2.6.


Here is what we are trying to run:


update REQUEST_STRUCTURES_4204 t 


    set vdb_image = (select jcf.molconvertb(b, 'jpeg:w120,setcolors') 


                             from table(jcf.hitColorAndAlign(t.db_name, t.structure_table, 'structure', 


                                                              '


  Marvin  02161213422D          


 


 21 23  0  0  0  0            999 V2000


    0.0000   -1.6500    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0


    0.7145   -1.2375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    0.7145   -0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    1.4289    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    1.4289    0.8250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0


    2.1434   -0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    2.8579    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    3.5724   -0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    4.2868    0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0


    3.5724   -1.2375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    2.8579   -1.6500    0.0000 O   0  3  0  0  0  0  0  0  0  0  0  0


    2.1434   -1.2375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    1.4289   -1.6500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    4.2868   -1.6500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    5.0013   -1.2375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    5.7158   -1.6500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    5.7158   -2.4750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    6.4302   -2.8875    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0


    5.0013   -2.8875    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    5.0013   -3.7125    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0


    4.2868   -2.4750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


  1  2  1  0  0  0  0


  2  3  4  0  0  0  0


  3  4  4  0  0  0  0


  4  5  1  0  0  0  0


  4  6  4  0  0  0  0


  6  7  4  0  0  0  0


  7  8  4  0  0  0  0


  8  9  1  0  0  0  0


  8 10  4  0  0  0  0


 10 11  4  0  0  0  0


 11 12  4  0  0  0  0


  6 12  4  0  0  0  0


 12 13  4  0  0  0  0


  2 13  4  0  0  0  0


 10 14  1  0  0  0  0


 14 15  4  0  0  0  0


 15 16  4  0  0  0  0


 16 17  4  0  0  0  0


 17 18  1  0  0  0  0


 17 19  4  0  0  0  0


 19 20  1  0  0  0  0


 19 21  4  0  0  0  0


 14 21  4  0  0  0  0


M  CHG  1  11   1


M  END


',


                                                              ora_rowid,  


                                                              't:u', 'alignmentMode:off coloring:y hitColor:cyan'))),


         vdb_highlighted = 1 


   where vdb_highlighted = 0


 


raises  :


 


ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 


      java.rmi.RemoteException


 


Running the SQL in SQL Developer gives a bit more info :


 


SQL Error: ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 


      chemaxon.jchem.cartridge.rmi.StructureFormatException: Cannot recognize format (?)


Unrecognized file contents:


 


  Marvin  02161213562D           


 21 23  0  0  0  0            999 V2000 


    0.0000   -1.6500    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0 


    0.7145   -1.2375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 


    0.7145   -0.4125    0.0000 C  ...


...


ORA-06512: at "JCHEM.JCHEM_CLOB_PKG", line 63


ORA-06512: at "JCHEM.JCF", line 387


 


Any information on this issue would be appreciated


Thanks

ChemAxon 61b4fee994

17-02-2012 15:26:29

Hello,


We are investigating the problem. The structure in the query looks like a valid molecule, I checked it, but it still looks a problem with the format.


1. Could you send the log from jchem/cartridge/logs/ to tvarga81 at chemaxon dot com?


2. Perhaps you could try using the smiles format of the same molecule: Oc1cc(O)c2cc(O)c([o+]c2c1)-c1ccc(O)c(O)c1 . Please tell us if it helps.


Regards,


Tamas

User 952e1d9361

20-02-2012 22:23:11

Hi,


Here is the exception from the jcart1.log :



[RMI TCP Connection(122)-127.0.0.1/13]: Feb 20, 2012 9:28:39 PM chemaxon.jchem.cartridge.rmi.impl.RmiExceptionHandler handleError


SEVERE: null


java.lang.NullPointerException


        at chemaxon.jchem.interop.core.InteropMiscellanious.exportMoleculesToArray(InteropMiscellanious.java:1027)


        at chemaxon.jchem.cartridge.rmi.impl.JchemSearchImpl.hitColorAndAlign(JchemSearchImpl.java:189)


        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)


        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


        at java.lang.reflect.Method.invoke(Method.java:597)


        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)


        at sun.rmi.transport.Transport$1.run(Transport.java:159)


        at java.security.AccessController.doPrivileged(Native Method)


        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)


        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)


        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)


        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)


        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)


        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)


        at java.lang.Thread.run(Thread.java:680)



 


Also, I've managed to create a small test-case which is SMILES based (so the problem isn't MOL related) as follows :




drop table ECR4467;

create table ECR4467 (structure varchar2(4000), casno varchar2(32), vdb_image blob);

insert into ECR4467 (structure, casno) values ('[H]C([H])([H])[H]', '74-82-8');

commit;

create index ecr4467_idx on ecr4467 (structure)

  indextype is jchem.jc_idxtype parameters ('tableType=anyStructures,haltOnError=n,duplicateFiltering=n'); 

update ECR4467 t 

    set vdb_image = (select jcf.molconvertb(b, 'jpeg:w120,setcolors') 

                             from table(jcf.hitColorAndAlign(USER, 'ECR4467', 'structure', 'Oc1cc(O)c2cc(O)c([o+]c2c1)-c1ccc(O)c(O)c1',

                                                              rowid,  

                                                              't:u', 'alignmentMode:off coloring:y hitColor:cyan')));


Which raises this :



Error report:

SQL Error: ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 

java.rmi.RemoteException

ORA-06512: at "JCHEM.JCHEM_CLOB_PKG", line 63

ORA-06512: at "JCHEM.JCF", line 387

29532. 00000 -  "Java call terminated by uncaught Java exception: %s"

*Cause:    A Java exception or error was signaled and could not be

           resolved by the Java code.

*Action:   Modify Java code, if this behavior is not intended.



with the exception as above in jcart1.log.


The problem appears to be related to these two structures, as the 'update' works against other structures.  So I'm not sure if the problem is the 'search' or 'match' structure.


Hope this helps,


Steve H



 


 

ChemAxon 61b4fee994

21-02-2012 14:09:41

Thank you Steve, your example helped a lot!


We found out that this happens when the search structure can't be found in the molecule selected by the rowid. We assumed that the rowids come from a previous successful search.


The fix will be ready for version 5.10, the search will return a null value in these cases. If you want to show the original molecule in the vdb_image field and not null, you can use nvl(..., structure) in the inner select.


We also found a workaround until the fix. If you add a where clause to the query to run the coloring only on molecules that match the search query, we think the update will run perfectly. To do this, add this line to the end of your query:


where jc_compare('Oc1cc(O)c2cc(O)c([o+]c2c1)-c1ccc(O)c(O)c1',structure,'t:u')=1


You can also combine it with nvl command as mentioned above.


I hope this helps.


Regards,


Tamas

User 952e1d9361

21-02-2012 14:19:49

Thank you Tamas.


My understanding is that this is being applied to a previous search result but I'll need to check that to be 100% sure it's working correctly.  I believe that this was a 'super-structure' search and this was an attempt to colour the match.


Steve

User 952e1d9361

21-02-2012 14:46:15

Hi


I've tested this and the results are from a previous superstructure search.  In fact this can be 'proved' by running :



select *

   from ECR4467 

  where  jc_compare(STRUCTURE, 'Oc1cc(O)c2cc(O)c([o+]c2c1)-c1ccc(O)c(O)c1', 't:u') = 1

which returns the row in question (74-82-8).


Steve


 


ChemAxon 61b4fee994

22-02-2012 12:31:02

Hi,


We checked and reproduce this problem and the problem is with the explicit hydrogens in the structure. We will try to find a fix for it. Until then we have a workaround: add implicitHMatching:i to the search options in the jcf.hitColorAndAlign function and the query will be working like in the jc_compare function.


Regards,


Tamas

ChemAxon 42004978e8

22-08-2012 07:40:33

Hi Steve,


The problem occured because the search and the hitdisplay process used different targets. In case of any or molecule tables explicit hydrogens are removed during standardization, which structure is then used for searching. During hitdisplay the target was standardized but the hydrogens not removed which had the effect that there was no hit during display.


Now we have fixed this bug display and search uses the same targets and they both find/display  the structures.


Bye,


Robert