jcf.hitColorAndAlign, inconsistent results

User 952e1d9361

08-07-2010 15:44:22

Hello,


We're having a problem where sometimes jcf.hitColorAndAlign does not return a coloured result.  It may be platform related as it seems to work on some machines but not others, when using the same data.


It works on Windows Server 2003 and Linux (Oracle Enterprise Linux) but seems to fail on Windows Server 2008 and Mac OS X 10.6.  This may of course be a red herring so I'm not saying this is definitely the problem.


When I run this query :


select count(*)

   from TEST_DB.STRUCTURES 

  where  jc_compare(TEST_DB.STRUCTURES.STRUCTURE, 'C1=CC=CC=C1', 't:s') = 1

looking in the log I can see :

Search mode: SUBSTRUCTURE
Structure table: TEST_DB.STRUCT_JCHEM_IDX_JCX
Query: C1=CC=CC=C1
Screened: 3
Hits: 3
Total time: 50 ms Screening: 0 ms
Processing threads: 2
Current / peak / maximum searches per minute: 2 / 4 / Unlimited

which is correct.

But when I run :

select subst_id, jcf.molconvertb(b, 'jpeg:w240')
from test_db.structures,
table(jcf.hitColorAndAlign('TEST_DB', 'STRUCTURES', 'structure',
'C1=CC=CC=C1',
rowid,
't:s', 'alignmentMode:rotate coloring:y hitColor:cyan')) x
where jc_compare(TEST_DB.STRUCTURES.STRUCTURE, 'C1=CC=CC=C1', 't:s') = 1

I can see the where clause generating : (same as above)

Thu Jul 08 16:38:48 BST 2010
Search mode: SUBSTRUCTURE
Structure table: TEST_DB.STRUCT_JCHEM_IDX_JCX
Query: C1=CC=CC=C1
Screened: 3
Hits: 3
Total time: 22 ms Screening: 0 ms
Processing threads: 2
Current / peak / maximum searches per minute: 9 / 9 / Unlimited

but then later in the log file :
Search mode: SUBSTRUCTURE
Structure table: TEST_DB.STRUCT_JCHEM_IDX_JCX
Query: C1=CC=CC=C1
Screened: 0
Hits: 0

Total time: 17 ms Screening: 0 ms
Processing threads: 2
Current / peak / maximum searches per minute: 10 / 10 / Unlimited


which doesn't look right to me?

Or am I going about this all wrong?

Any help on tracking this down is much appreciated.

JChem release is 5.2.6 across all platforms and Oracle is always 10.2.0.4. Java is 1.6.0_20 or 1.6.0_13.

Thanks,
Steve H

User 952e1d9361

08-07-2010 16:14:41

In addition here is the MRV file returned by the hitColorAndAlign.  I know nothing about MRV format but this may help diagnose if the issue is with the hitColorAndAlign or molconvertb.


 


 


<?xml version="1.0" ?>


<cml>


<MDocument atomSetRGB="0:#000000,1:#00ffff" bondSetRGB="0:N,1:#000000">


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20"


          elementType="C N C C N C C C C C C C C N C O N C C O"


          mrvSetSeq="0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0"


          x2="2.746794604623371 1.2404472994933107 0.764561128155891 -0.7417861769741696 -0.9027600104063567 -2.236439132234393 -2.236439132234394 -0.9027600104063559 -0.9027600104063583 -2.2364391322343957 -3.5701182540624297 -3.570118254062429 0.5040999943632486 1.5345611281558904 -1.772247310766812 -3.2785946158968726 -1.2963611394293926 -2.3268222732220347 0.20998616570066797 0.6858723370380851"


          y2="4.9872616941052765 4.667077690245928 3.202450655151387 2.882266651292038 1.3507029324248974 0.5807029324248985 -0.9592970675751016 -1.7292970675751052 -3.2692970675751054 -4.039297067575102 -3.269297067575102 -1.729297067575102 0.7243285020881638 1.868771533323351 4.026709682527225 3.7065256786678766 5.491336717621762 6.635779748856949 5.811520721481113 7.276147756575651"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a2 a3" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a3 a4" order="2" mrvSetSeq="1" />


        <bond atomRefs2="a4 a5" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a5 a6" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a6 a7" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a7 a8" order="2" />


        <bond atomRefs2="a8 a9" order="1" />


        <bond atomRefs2="a9 a10" order="2" />


        <bond atomRefs2="a10 a11" order="1" />


        <bond atomRefs2="a11 a12" order="2" />


        <bond atomRefs2="a7 a12" order="1" />


        <bond atomRefs2="a5 a13" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a13 a14" order="2" mrvSetSeq="1" />


        <bond atomRefs2="a3 a14" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a4 a15" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a15 a16" order="2" mrvSetSeq="1" />


        <bond atomRefs2="a15 a17" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a17 a18" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a17 a19" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a2 a19" order="1" mrvSetSeq="1" />


        <bond atomRefs2="a19 a20" order="2" mrvSetSeq="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>


</cml>


Regards,

 


Steve H


 

ChemAxon aa7c50abf8

08-07-2010 17:57:04

Hello Steve,


Is this the MRV file which doesn't appear to be colored?


Pasting it into msketch (on Linux), I can see the benzene ring colored in turquoise.


When you write that coloring doesn't always work on Windows and OS X, do you mean that


(a) displaying the MRV on these platforms doesn't work or 


(b) the result generated by JChem Cartridge on these platforms doesn't appear colored?


In short: does this appear a client side or a server side problem?


Regards,


Peter

User 952e1d9361

08-07-2010 18:05:01

Sorry Peter, I should have made myself clearer.


The problem is that the BLOB returned by molconvertb() when using hitColorAndAlign() does not return a JPEG with the ring coloured cyan.


I included the MRV as presumably this is the 'input' to molconvertb() from the hitColorAndAlign function.


Given your steps it sounds like molconvertb is the problem, not hitColorAndAlign.


When I run the 2nd query above (with the hitColorAndAlign) and inspect the BLOB I can see the structure but there is no colouring.


In short 'b)' is what appears to be happening, and is a server side problem.


Does this help?


Steve

ChemAxon 9c0afc9aaf

08-07-2010 18:15:24

Hi,


 


I suggest replacing 'jpeg:w240' with 'jpeg:w240:setcolors' in the image format string.


The "setcolors" option allows atom/bond send coloring othwerwise the CPK color scheme is used by default.


https://www.chemaxon.com/marvin/help/formats/images-doc.html


 


Best regards,


Szilard

User 952e1d9361

08-07-2010 19:27:50

Thank you.


I have used 'jpeg:w240,setcolors' (I had to use a comma instead of a colon) and it seems to be working on one of the 'problem' machines.


Why would this be necessary on some machines and not others?


Thanks again,


Steve

ChemAxon 9c0afc9aaf

08-07-2010 20:30:05

 


(I had to use a comma instead of a colon)

Yes, sorry, of course the colon is th separator between options.


 


Why would this be necessary on some machines and not others?

Is it possible that some of the machines run a different  (older) JChem version ?


I suspect in some older versions set colors were displayed automatically if present, now only if explicitly allowed.


 


Szilard