extract compounds based on id?

User 5095fcb72d

07-01-2008 16:30:59

hi all,





I have loaded my compounds into a mysql database and I was wondering if it is possible to extract a subset of them based on their id using JCSearch? I have a list of 10,000 compounds I would like to extract.





I could convert my sdf file to Smiles and use grep or run a mysql query to create a table of the compounds that I am interested in and then use JCSearch to return all of the compounds in that table. Neither of these two solutions seem very nice, so I was wondering if anyone could suggest a more elegant solution.





thanks for any help or advice :)





Iain

ChemAxon 9c0afc9aaf

07-01-2008 20:41:11

Hi Iain,





I suppose you are talking about ID values in the input file.





I suggest to add an appropriate database field in the JChem table for storing these IDs, and then import the structures.


The easiest to do this at table creation, where you can append your column to the displayed SQL CREATE text.


Please take care to specify for the import what file field goes to what DB field (e.g. in the "Connect Fields" dialog of JChemManager).





The you can use a Filter Query to narrow down the scope on which JChemSearch runs:


http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/JChemSearch.html#setFilterQuery(java.lang.String)





I also suggest to create an index on this column for efficiency (you have to do it manually)





You may also be interested in InstantJChem, where all of these are much easier with a few mouse clicks:





http://www.chemaxon.com/product/ijc.html





I hope this helps.





Best regards,





Szilard