User dfeb81947d
05-07-2004 15:59:52
Hello,
I use Marvin Applet 3.3.0 as editor I make a substructure search.
Molfile is send to a servlet as a String with MDL Molfile format which send it to an Object which process the search as:
But the use of "Any" Atom, of Bond gives an error for the substructure search. Does the use of the Atom or Bond query does not work with MDL molfile as structure query?
with following exception:
Does MDL molfile support atom or bond query?
Do I need to use Smart molecule format instead?
Will I loose informations in using Smart instead of MDL molfile (for example stereochemistry) for sending the structure to the servlet?
I use Marvin Applet 3.3.0 as editor I make a substructure search.
Molfile is send to a servlet as a String with MDL Molfile format which send it to an Object which process the search as:
Code: |
public ArrayList getMoleculeIdsByStructureViaJCHEM(String molfile, String type, Connection conn, String tableName) { ArrayList list=new ArrayList(); try{ int searchType = SearchConstants.SUBSTRUCTURE; if (type.equals("similarity")) { searchType = SearchConstants.DISSIMILARITY; } if (type.equals("exact")) { searchType = SearchConstants.EXACT; } String structureTableName = tableName; JChemSearch searcher = new JChemSearch(); searcher.setStructureCaching(true); ConnectionHandler ch = null; ch = new ConnectionHandler(); ch.setConnection(conn); searcher.setQueryStructure(molfile); searcher.setConnectionHandler(ch); searcher.setStructureTable(structureTableName); searcher.setSearchType(searchType); if (searchType == SearchConstants.DISSIMILARITY) { searcher.setDissimilarityThreshold(treshold); } searcher.setWaitingForResult(true); searcher.setResultTableMode(DatabaseSearch.NO_RESULT_TABLE); searcher.setMaxResultCount(0); searcher.run(); for (int i = 0; ((i<searcher.getResultCount())); i++) { list.add((new Integer(searcher.getResult(i))).toString()); } searcher=null; } catch (MaxSearchFrequencyExceededException he){ he.printStackTrace(); } return list; } |
But the use of "Any" Atom, of Bond gives an error for the substructure search. Does the use of the Atom or Bond query does not work with MDL molfile as structure query?
with following exception:
Quote: |
ava.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at chemaxon.sss.screen.ScreenMol.ringcalculation(ScreenMol.java:431) at chemaxon.sss.screen.ScreenGraph.getFingerprint(ScreenGraph.java:77) at chemaxon.util.MolHandler.getFingerprintInBytes(MolHandler.java:392) at chemaxon.jchem.db.DatabaseSearch.getFingerprint(DatabaseSearch.java:779) at chemaxon.jchem.db.DatabaseSearch.init(DatabaseSearch.java:378) at chemaxon.jchem.db.DatabaseSearch.search1(DatabaseSearch.java:1542) at chemaxon.jchem.db.DatabaseSearch.search(DatabaseSearch.java:1861) at chemaxon.jchem.db.JChemSearch.setRunning(JChemSearch.java:777) at chemaxon.jchem.db.JChemSearch.run(JChemSearch.java:796) |
Do I need to use Smart molecule format instead?
Will I loose informations in using Smart instead of MDL molfile (for example stereochemistry) for sending the structure to the servlet?