Error with handling SGroupData in MDL Molfile

User dfeb81947d

10-10-2012 15:11:07

Dear support,


I have found, while running through a database, a molecule for which the method MoleculeGraph.getChirality(int) has a problem with NullPointerException


I'm using this code on a 3 millions compounds and found this error on two compounds (I attached one of the compound in SDFile)


According to the documentation of the database source, it says the molecules are drawn using Marvin Sketch (But I have the feeling that it's not the case for many of them).


I'm using JChem API 5.11.1 with jdk1.6 under eclipse Indigo release 2 on Windows XP


ResultSet rs = connection.getStatement().executeQuery("SELECT MOLFILE FROM TABLE");
if(rs.next()) {
    Molecule m = (new MolImporter(new MolInputStream(new ByteArrayInputStream(DatabaseTools.readBytes(rs, index))))).read();

    MolAtom[] tabAtoms = m.getAtomArray();
    for(int j=0; j<tabAtoms.length; j++) {
        MolAtom molAtom = tabAtoms[j];
        int chirality = m.getChirality(j);
        ...
    }
}
rs.close();

The error is as follow:


java.lang.NullPointerException
    at chemaxon.core.calculations.Parity.orderCIPConstitutional(Unknown Source)
    at chemaxon.core.calculations.Parity.calculateTHChirality(Unknown Source)
    at chemaxon.core.calculations.Parity.stereogenicCenterCalculation(Unknown Source)
    at chemaxon.core.calculations.Parity.getChirality(Unknown Source)
    at chemaxon.struc.MoleculeGraph.getChirality(Unknown Source)


When I open the sdf (attached in this post) using Marvin View 5.11.1, the GUI seems like to freeze, and not being thread safe (as if graphical thread is freezing). The GUI is printed with the application in background, in my case a web browser on JChem API Javadoc  (see attached picture).


The fact is, if I remove all the SGroupData (of MDL Extended Molfile representation), the line starting with "M..." (but "M  END"), the molecule open fine and is computed perfectly.


As it is two or three molecules over several millions, it's not blocking. But I wanted to check with you where the problem could be. It's helpful for me to understand.


Thank you for your helps,


Kind Regards


Jacques

ChemAxon d26931946c

10-10-2012 16:27:19

Hi Jacques,


Thanks for the report, this is a known issue. We are working on the fix and will notify you when it's released.


Regards,


Peter

User dfeb81947d

11-10-2012 07:47:43

Dear Peter,


Sorry for my message about a known issue.


Thank you very much for your message.


Good Luck!


Kind Regards,


Jack

ChemAxon d26931946c

11-10-2012 19:53:21

Dear Jacques,


 


I would like to inform you that we managed to fix the issue.


Marvin 5.11.2 will contain the fix, scheduled to be released next week.


 


Regards, 


Peter



User dfeb81947d

12-10-2012 07:51:03

Hi Peter,


Thank you very much for that good news. Chemaxon's teams are really efficients.


Thank you so far,


Kind Regards,


Jacques

ChemAxon d26931946c

15-10-2012 15:23:26


Dear Jacques,


We would like to notify you that Marvin 5.11.2 is released.


It can be downloaded here.


 


Regards, 


Peter


User dfeb81947d

15-10-2012 16:26:58

Dear Peter,


Thank you very much, I'm downloading it.


Kind Regards,


Jacques

User dfeb81947d

16-10-2012 09:10:21

Dear Peter,


I tested JChem 5.11.2.


Everything is working fine as far as I know. That's wonderful.


Thank you fo far.


Kind regards,


Jacques