Highlight substructure hits using JChem cartridge only

User 952e1d9361

05-05-2009 09:03:20

Hi all


I am using JChem 5.2 to perform substructure searches and would like to highlight the matching part of the structure using JChem cartridge functionality only.  Ideally i'd like to generate a BLOB (png / jpeg) in the database and then display it externally later.


Is this possible?  I have done a search on the forums for this and can't seem to see a way of doing it in JChem only.


Many thanks,


Steve H

ChemAxon aa7c50abf8

05-05-2009 10:50:30

Hi Steve,


You can use the hitColorAndAlign function which is part of the jcf package. This function will return the highlighted structure in MRV format. You can feed the returned structure into the jc_molconvertb operator (or to the molconvertb function in the jcf package) to generate the image.


Let me know, if you need any more help.


Peter

User 952e1d9361

05-05-2009 12:30:36

That's great, thanks Peter for the quick reply which works fine.


One quick question however. Why do I need to create the structure index on the table given that presumably it is being accessed by ROWID?  If I don't have a structure index I get an error...


Is there a way around this?  (It's not a big deal but would make things ever so slightly easier for me).


Steve


 

ChemAxon aa7c50abf8

05-05-2009 13:31:03

Steve,


The idea with the currently available variant of jcf.hitColorAndAlign is that it is used as part of structure searching in the table: first you execute the structure search (with, say, jc_compare) and then pass the returned ROWIDs to jcf.hitColorAndAlign for the colored/aligned representation. To execute the first step (structure search), you need a jchem index for performance reasons.


We plan to make available a variant wich doesn't rely on tables, ROWIDs et al and accepts just three parameters: the target structure, the query structure and the search options. Would this variant better fit your requirements?


To answer your question directly: there is currently no way around this.


Thanks


Peter

User 952e1d9361

05-05-2009 13:40:44

Hello again Peter,


Thanks again for the quick reply.  This variant sounds ideal.  Currently I am using jc_compare to do a search and the results are stored in an intermediate table and I am then using hitColorAndAlign to generate BLOBs that show the highlighted search term.  (This is why building the index is a minor annoyance).


Doing all this one one step somehow would be great.  However thanks again for the suggestions earlier, this was very helpful and I am impressed with what JChem can do!


Steve