User f05f6b8c05
09-03-2011 02:21:58
Hi,
When we run the attached java code against the attached mol file, we see the below exception. Is there a way to run the query as to prevent this problem?
We are using java version "1.5.0_17" and JChem 5.4.1.1.
Many thanks for any guidance.
Cheers,
Andrew
chemaxon.sss.search.SearchException: An error occured during search:java.lang.ArrayIndexOutOfBoundsException: -1
Query:Cl
Target:
<?xml version="1.0" ?>
<cml>
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray
atomID="a1 a2 a3 a4 a5 a6 a7"
elementType="* C C * C O O"
formalCharge="0 0 0 0 0 -1 0"
sgroupRef="0 sg1 sg1 0 sg1 sg1 sg1"
x2="0.32999999999999874 -0.44000000000000083 0.33000000000000007 1.87 -0.4399999999999995 0.33000000000000096 -1.9799999999999995"
y2="2.8578838324886475 1.5242047106606114 0.1905255888325761 0.19052558883257698 -1.1431535329954596 -2.4768326548234953 -1.1431535329954596"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a2 a3" order="1" />
<bond atomRefs2="a3 a5" order="1" />
<bond atomRefs2="a3 a4" order="1" />
<bond atomRefs2="a5 a6" order="1" />
<bond atomRefs2="a5 a7" order="2" />
</bondArray>
<molecule id="sg1" role="SruSgroup" title="n" molID="m2"
atomRefs="a2 a3 a5 a6 a7 a8" correspondence="" bondList="" connect="ht">
<MBracket type="SQUARE" orientation="SINGLE">
<MPoint x="-2.7499999999999996" y="3.017190917350883" />
<MPoint x="-2.3649999999999993" y="3.017190917350883" />
<MPoint x="-2.3649999999999993" y="-3.2468326548234954" />
<MPoint x="-2.7499999999999996" y="-3.2468326548234954" />
</MBracket>
<MBracket type="SQUARE" orientation="SINGLE">
<MPoint x="6.82" y="-3.2468326548234954" />
<MPoint x="6.4350000000000005" y="-3.2468326548234954" />
<MPoint x="6.4350000000000005" y="3.017190917350883" />
<MPoint x="6.82" y="3.017190917350883" />
</MBracket>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>
Caused by:
-1
at chemaxon.sss.search.MolSearch.getWrapperSearchException(MolSearch.java:697)
at chemaxon.sss.search.MolSearch.findFirstHit(MolSearch.java:732)
at chemaxon.sss.search.MolSearch.findAllHits(MolSearch.java:795)
at chemaxon.sss.search.Search.findAll(Search.java:649)
at polyprob.<init>(polyprob.java:53)
at polyprob.main(polyprob.java:18)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at chemaxon.sss.search.BracketComparator.setAtomsSgData(BracketComparator.java:239)
at chemaxon.sss.search.BracketComparator.initSgroupData(BracketComparator.java:184)
at chemaxon.sss.search.bracket.PolymerMatcher.removeStarAtoms(PolymerMatcher.java:245)
at chemaxon.sss.search.bracket.PolymerMatcher.transform(PolymerMatcher.java:224)
at chemaxon.sss.search.StructureSearch.transformPolymers(StructureSearch.java:1612)
at chemaxon.sss.search.StructureSearch.transformPolymers(StructureSearch.java:1596)
at chemaxon.sss.search.StructureSearch.handlePolymers(StructureSearch.java:1582)
at chemaxon.sss.search.StructureSearch.initSearch(StructureSearch.java:1477)
at chemaxon.sss.search.StructureSearch.findFirst0(StructureSearch.java:6308)
at chemaxon.sss.search.StructureSearch.findFirstHit(StructureSearch.java:6297)
at chemaxon.sss.search.MolSearch.findNextEnumeratedHit(MolSearch.java:1024)
at chemaxon.sss.search.MolSearch.findNextFilteredHit(MolSearch.java:877)
at chemaxon.sss.search.MolSearch.findFirstHit(MolSearch.java:724)
... 4 more