User 870ab5b546
31-05-2007 17:53:58
The code:
The log output:
We're using JChem 3.2.4. Any ideas what's going wrong? The code and the substrates look fine to me.
Code: |
public static boolean matchPrecise_JChem(Molecule respMol, Molecule authMol) throws MolFileException { try { MolSearch s1 = new MolSearch(); s1.setSearchType(SearchConstants.PERFECT); // required for comparing nonaromatized aromatic rings s1.setOption(SearchConstants.OPTION_VAGUE_BOND, SearchConstants.VAGUE_BOND_OFF); s1.setOption(SearchConstants.OPTION_STEREO_MODEL, SearchConstants.STEREO_MODEL_GLOBAL); // JChem 3.2.2 s1.setTarget(respMol); s1.setQuery(authMol); System.out.println("matchPrecise_JChem: Match resp " + respMol.toFormat("mrv")); System.out.println("matchPrecise_JChem: Match struct " + authMol.toFormat("mrv")); boolean res1 = s1.isMatching(); println("matchPrecise_JChem: search result is " + res1); return res1; } catch (SearchException e2) { System.out.println("Error in matchPrecise_JChem "); e2.printStackTrace(); throw new MolFileException("MolFile error " + e2.getMessage()); } } // matchPrecise_JChem(Molecule, Molecule) |
The log output:
Code: |
matchPrecise_JChem: Match resp <?xml version="1.0" ?> <MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6" elementType="C C C C C O" x2="49.467529296875 48.133859955826736 50.801198637923264 52.13486797897153 53.46853732001979 52.13486797897153" y2="61.61229187672355 60.84227493616451 60.84227493616451 61.61229187672355 60.84227493616451 63.15229187672355" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="2" /> <bond atomRefs2="a4 a3" order="1" /> <bond atomRefs2="a4 a5" order="1" /> <bond atomRefs2="a4 a6" order="2" /> </bondArray> </molecule> </MChemicalStruct> </MDocument> matchPrecise_JChem: Match struct <?xml version="1.0" ?> <MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6" elementType="C C C C C O" formalCharge="0 0 0 0 0 1" x2="61.75486633925228 60.1691904674423 63.088535680300545 64.42220502134882 65.75587436239707 64.42220502134882" y2="61.7246171332027 61.14205823097373 60.95460019264365 61.7246171332027 60.95460019264365 63.2646171332027" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a1 a3" order="2" /> <bond atomRefs2="a4 a3" order="1" /> <bond atomRefs2="a4 a5" order="1" /> <bond atomRefs2="a4 a6" order="2"> <bondStereo>C</bondStereo> </bond> </bondArray> </molecule> </MChemicalStruct> </MDocument> java.lang.ArrayIndexOutOfBoundsException: -1 at chemaxon.sss.search.StructureSearch.initMolecule(StructureSearch.java:1873) at chemaxon.sss.search.StructureSearch.initSearch(StructureSearch.java:1430) at chemaxon.sss.search.StructureSearch.findFirst0(StructureSearch.java:5163) at chemaxon.sss.search.StructureSearch.isMatching0(StructureSearch.java:5656) at chemaxon.sss.search.StructureSearch.isMatching(StructureSearch.java:5648) at chemaxon.sss.search.MolSearch.isMatching(MolSearch.java:856) at com.prenhall.epoch.chem.MolFunctions.matchPrecise_JChem(MolFunctions.java:211) at com.prenhall.epoch.chem.MolFunctions.areResonanceStructures(MolFunctions.java:2064) |
We're using JChem 3.2.4. Any ideas what's going wrong? The code and the substrates look fine to me.