User dfeb81947d
13-05-2005 14:17:10
Dear Support,
I'd like to know if there is a fast possibility to find and erased molecules that are represented twice or more in the table, in order to keep a single representation of the molecule.
If I make a perfect JChemSearch on the whole table and delete all the hits. It means that I have to make as many search as there is molecules.
And With deleting a molecule from the structure search, it makes the cache to be load again.
So, I desactivated the use of cache... But each screen are long...
And for a database of 2 or 3 millions structures, it means that the whole table will be cleaned in several months.
Is there a fast way to find and erase structure that are represented twice (or more) in the database?
Actually I do like that:
Thank you very much for your help.
Kind regards.
Jacques
I'd like to know if there is a fast possibility to find and erased molecules that are represented twice or more in the table, in order to keep a single representation of the molecule.
If I make a perfect JChemSearch on the whole table and delete all the hits. It means that I have to make as many search as there is molecules.
And With deleting a molecule from the structure search, it makes the cache to be load again.
So, I desactivated the use of cache... But each screen are long...
And for a database of 2 or 3 millions structures, it means that the whole table will be cleaned in several months.
Is there a fast way to find and erase structure that are represented twice (or more) in the database?
Actually I do like that:
Code: |
//searcher is the JChemSearch object // id is the id of the query //pstmt is a PreparedStatement that update the id of the hit on an other table with the id of the query // query = UPDATE MY_TABLE SET ID = ? WHERE ID = ? pstmt = conn.PreparedStatement(query); searcher.setQueryStructure(mol); searcher.run(); for(i=0;i<searcher.getResultCount();i++) { if (id != searcher.getResult(i)) { pstmt.setInt(1, id); pstmt.setInt(2, searcher.getResult(i)); pstmt.execute(); UpdateHandler.deleteRows(ch, searchTable, "WHERE CD_ID="+String.valueOf(searcher.getResult(i)); commit(); } } |
Thank you very much for your help.
Kind regards.
Jacques