How to search against a list of structure_ids?

User 5787a55225

23-08-2005 14:25:11

Hi, there.





I have been scanning trough the API and tried to find out a way to do a similarity search against a list of structure_ids(rather than against the whole structure table), without success.





Anyone can advice if there is a handy function out there in API can achieve this? If there aren't, what are practically available options?





Thanks,





Donald

ChemAxon 9c0afc9aaf

23-08-2005 14:39:03

Hi,





I suggest you JChemSearch.setFilterQuery() :





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





If your cd_id values are in memory (and not produced by constraints in an SQL query), then the SQL would be a bit "stupid", but this should work:





Code:
SELECT cd_id FROM mytable WHERE cd_id IN (2,3,4,7,9);






From JChem 3.1 a new method, setFilterIDList(int[]) will be available to provide more convenient filtering.





Best regards,





Szilard

User 5787a55225

23-08-2005 14:48:39

Thanks, Sziland.





The setFilterQuery() looks like the one I am looking for.





How couldI neglect it when I scanned throught the API?





Don