Error with IUPAC name calculation

User dfeb81947d

25-10-2012 14:41:14

Dear support,

While generating IUPAC Name for some molecules I was reading from a sdfile, I got different kind of error.
To show you the different kind of error I made a new SDFile with the structures and a field in which I pu the EXception generated.
It's not that I need a correction, but I wanted to show you those issues in case you haven't got already them.

Some structures are too big to be named and shouldn't be discribed as molfile but rather as sequence. So I shouldn't have added them, I apologize for running out of time, and to haven't removed those structures from SDFile.


I thought this SDFile could be of an interest for you.


I'm using JChem 5.11.3 with JDK 1.6.0_26 on Windows XP SP3.


I wish you a nice end of afternoon and a good evening.

All the Best,

Jacques



My Code


String CRLF = System.getProperty("line.separator");
StringBuilder BUILDER = new StringBuilder();
String iupac = null;
Exception exception = null;
String molfile = ... // get molfile from SDFile
try {
    Molecule mol = (new MolImporter(new MolInputStream(new ByteArrayInputStream(molfile.getBytes())))).read();
    if(mol!=null) {
        iupac = MolExporter.exportToFormat(m, "name");
    }
} catch (Exception e) {
    exception = e;
}
if(exception!=null) {
    
    BUILDER.setLength(0);
    BUILDER.append(exception.getLocalizedMessage()).append(CRLF);
    StackTraceElement[] stackTrace = exception.getStackTrace();
    for (int i=0;i<stackTrace.length;i++) {
        BUILDER.append(stackTrace);
        if(i<stackTrace.length-1) {BUILDER.append(CRLF);}
    }
}
// here I write in a new SDFile the molfile and add the BUILDER.toString() to show the Exception

ChemAxon d26931946c

25-10-2012 16:31:02

Hi Jacques,


Thanks for the report, we will investigate the errors. 


May I ask you what program generated these files? 


Good evening to you too.


Regards, 


Peter

User dfeb81947d

26-10-2012 09:12:49

Dear Peter,


Some of those mofiles are generated by an activeX component within a VB6 application. The activeX component is Accord ActiveX Chemistry Control 4.0. It opens MDL Isis Draw 3.2 to sketch the structures and send the structure to ActiveX control.


The sdfile is generated by reading those molfile from an oracle database and constructed using a java PrintWriter object.


I hope this helps.


Have a nice day and nice week-end.


Kind Regards,


Jacques

ChemAxon d26931946c

27-10-2012 08:12:01

Dear Jacques,


 


Thanks for the information.


Regards,


Peter



ChemAxon e7b9408ca1

21-11-2012 13:31:27

Dear Jacques,


Thanks for your report. Indeed, besides the expected timeout on very large structures, your file shows a few cases where name generation still fails. One of those, corresponding to structure 5 and 6, has been fixed and will be released in 5.12. We will keep fixing the remaining ones in the future.


Best regards,


Daniel