Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Cause of Molecule "exportToFormat" exceptions
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
James

Joined: 28 Oct 2011
Posts: 47

View user's profile

Back to top
Link to postPosted: Fri Oct 28, 2011 11:26 amPost subject: Cause of Molecule "exportToFormat" exceptions Reply with quote

Hi,

I'm currently generating names from Molecules in ChemAxon (java) using mol.exportToFormat("name:i"). I've noticed that the interface to this method throws MolExportException, however it isn't clear under what circumstances this would be thrown when generating a name.

I've noticed that the exception can be generated when exporting to SMILES, for example when a feature of the chemical cannot be represented as SMILES, but could this happen with name generation? The key question is whether this exception will actually be thrown for names, and how it should be intepreted if thrown...

On a related note, does anyone know what 'traditional' means when exporting names?

Thanks :)

James Siddle

dbonniot
ChemAxon personnel
Joined: 20 Mar 2006
Posts: 494

View user's profile

Back to top
Link to postPosted: Mon Oct 31, 2011 12:35 pmPost subject: Reply with quote

Hi James,

MolExportException can indeed be thrown when generating names. One reason can be that the molecule object contains query features (for instance R groups or atom lists), in which case generating a name does not make sense. For non-query molecules, this is indeed rare (i.e. less than 0.1% of cases on typical datasets), but can still happen for very large molecules, very specific cases that are not handled yet, etc. Therefore I would advise to prepare for the occasional exception as well. Feel free to report any failure that you think should not happen.

The "traditional" option does two things. First, it will use common names when possible. For instance, it will generate 'aspirin' instead of '2-(acetyloxy)benzoic acid' for input 'CC(=O)OC1=CC=CC=C1C(O)=O'. Second, in some cases, when a systematic name is generated, it will be sligthly simpler/shorter, by using traditionally used conventions instead of strictly applying IUPAC rules.

By the way, I would recommend using just "name" instead of "name:i" for the IUPAC (non-traditional) mode, though they currently have the same behaviour. I was thinking to deprecate "name:i" to replace it with something more explicit. Is "name:i" documented somewhere?

Best regards,

Daniel

James

Joined: 28 Oct 2011
Posts: 47

View user's profile

Back to top
Link to postPosted: Wed Nov 09, 2011 2:31 pmPost subject: Iupac names Reply with quote

Hi Daniel,

Thanks for the reply - very helpful, we'll prepare for potential exceptions when generating names.

BTW I seem to remember seeing the "name:i" option documented on one of the pages linked from here:

http://www.chemaxon.com/marvin/help/formats/formats.html

However now that I look I can't find anything...but I definitely saw the option documented somewhere :)

Thanks,

Jim

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum