Menu

#1369 Null bond in the Atomcontainer

cdk-1.6.x
open
nobody
None
1
2016-08-10
2015-08-13
No

Hi,
I am getting a null bond in the bond list when reading in the attached MOL file. I thought an easy way would be go through the list and remove the null bonds, but the AtomContainer's removeBond method has the following lines:

    IBond bond = bonds[position];
    bond.removeListener(this);

that also cause null pointer exception...

Cheers,
o.

1 Attachments

Discussion

  • John May

    John May - 2015-08-13

    Notes:

    • Molfile is invalid (bond lines) but should be parsable.
    • There should also be a null check in the AtomContainer.
     
  • John May

    John May - 2015-08-13

    Notes 2: very bad molfile, possible formating from HTML problem.

    58 551 0 0 0

     
  • John May

    John May - 2015-11-28

    Hmm.. solution here would be load as silent for clean up (listener would not be present). Marking for closure.

     
  • Egon Willighagen

    Oleg, do you have a better MDL molfile, or shall we close this bug?

     
MongoDB Logo MongoDB