I'm trying to convert MDL mol files to CML using JUMBO.
For some of my molfiles JUMBO throws a NullPointer when
I use the org.xmlcml.cml.legacy.molecule.MDLConverter.
I have tracked it down to no default "dimensionalCode"
attribute being initialised. It looks to read this
attribute from the header when I call the 'readMol'
method but because it is not a required attribute in
the header of the molfile it will sometimes be missing.
I have read the MDL molfile documentation and it seems
perfectly valid to have 3 blank lines in the header.
This causes a NullPointer later on in the 'readAtoms'
Apologies if I am using the wrong java package to
convert from molfile to CML - I realise that this is in
the legacy package.
I've included the code snippet that I have used and the
molfile that I am trying to parse.
Reader inputReader = new FileReader(inputDir+filename);
OutputStream os = new FileOutputStream(new
MDLConverter converter = new MDLConverter();