I'm using 1.4 because I'm using SmartCYP that was from that generation.
>From memory there was a reason why I had to stick with 1.4, but I can't
recall the details.
The error I'm seeing with the attached molecule is this:

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at
org.openscience.cdk.graph.invariant.EquivalentClassPartitioner.checkDiffNumber(EquivalentClassPartitioner.java:398)
at
org.openscience.cdk.graph.invariant.EquivalentClassPartitioner.findTopoEquivClass(EquivalentClassPartitioner.java:470)
at
org.openscience.cdk.graph.invariant.EquivalentClassPartitioner.getTopoEquivClassbyHuXu(EquivalentClassPartitioner.java:98)
at smartcyp.MoleculeKU.setSymmetryNumbers(MoleculeKU.java:643)
at smartcyp.MoleculeKU.sortAtoms(MoleculeKU.java:564)
at squonk.jobs.smartcyp.Predictor.calculateMol(Predictor.java:303)
at squonk.jobs.smartcyp.Predictor.lambda$run$0(Predictor.java:226)
at
java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:441)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at
java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:257)
at
java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:248)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.count(ReferencePipeline.java:605)
at squonk.jobs.smartcyp.Predictor.run(Predictor.java:244)
at squonk.jobs.smartcyp.PredictorTest.test ibuprofen
v3000(PredictorTest.groovy:55)

Using the same molecule in V2000 format works OK.

On Thu, Jan 11, 2024 at 8:56 AM John Mayfield <john.wilkinson...@gmail.com>
wrote:

> Hi Tim,
>
> Why are you forced to use 1.4? I remember I made lots of improvements to
> the SDF reading over a decade ago (1.4 is now 10.5 years old) but these
> would have been in 1.5 onwards. It doesn't look like you're doing anything
> wrong but you could try adding skip=true to your constructor. This means if
> it sees something it doesn't like it continues rather than stops iterating.
>
> Best,
> John
>
> On Wed, 10 Jan 2024 at 16:31, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> I'm having difficulty reading V3000 SDF files.
>> The IteratingMDLReader docs (
>> https://cdk.github.io/cdk/1.4/docs/api/org/openscience/cdk/io/iterator/IteratingMDLReader.html)
>> seem to suggest that it will read V3000, but maybe it has to be
>> specifically told to use V3000 format (which would be a pain to work out)?
>>
>> I'm using it like this:
>>
>>     File sdfFile = new File(file);
>>     IteratingMDLReader reader = new IteratingMDLReader(
>>             new FileInputStream(sdfFile),
>>             DefaultChemObjectBuilder.getInstance()
>>     );
>>
>> BTW, I'm forced into using an old 1.4 version for reasons out of my
>> control.
>> _______________________________________________
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>

Attachment: Ibuprofen_V3000.sdf
Description: Binary data

_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to