Unrecognized file contents..??

User eda6f877b4

10-12-2010 13:04:01

Hi,


I have a structure registered using the marvin applet. Afterwards the same structure is retrived for display in the viewer, but yeilds the following error:


chemaxon.formats.MolFormatException: Cannot recognize format (?)
Unrecognized file contents:
CC(C)[N ]([O-])=O
    at chemaxon.formats.recognizer.RecognitionSubsystem.getFormat(Unknown Source)
    at chemaxon.formats.MolInputStream.b(Unknown Source)
    at chemaxon.formats.MolInputStream.a(Unknown Source)
    at chemaxon.formats.MolInputStream.<init>(Unknown Source)
    at chemaxon.marvin.util.MolLoader.a(Unknown Source)
    at chemaxon.marvin.util.MolLoader.run(Unknown Source)
    at chemaxon.marvin.common.swing.MolPanel.startLoader(Unknown Source)
    at chemaxon.marvin.view.swing.ViewPanel.startstop(Unknown Source)
    at chemaxon.marvin.applet.JMView.createGUI(Unknown Source)
    at chemaxon.marvin.applet.AbstractMarvinApplet.init(Unknown Source)
    at chemaxon.marvin.applet.JMViewLaunch.showApplet(Unknown Source)
    at chemaxon.marvin.applet.AppletLaunch$2.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)


I am using marvin/jchem version 5.3.3..


Please advise what further info, you will need to give feedback on this issue..


Regards


Dann

ChemAxon 7c2d26e5cf

13-12-2010 13:28:38

Can you show the embedded applet code where this problem occured?


I am wonder how you have passed the structure to the applet.


Do you pass it as an applet parameter?


Do you use JMView.setM(...) method?


Do you embed the SMILES string directly into the code?

User eda6f877b4

13-12-2010 14:48:16











Hi Tamas,


Here is mark up for the applet: 


<script language="JavaScript1.1" type="text/javascript">
mview_name = "MView";
mview_begin("../Tools/marvin", 380, 380);
mview_param("molbg""#f9f9fb");
mview_param("mol""<%= GetMolForDisplay() %>");
mview_end();        
</script>

    public string GetMolForDisplay() {

        if (compound.CompoundStructure != null && compound.CompoundStructure.Molfile != null)
            return HTMLTools.convertForJavaScript(Server.UrlDecode(compound.CompoundStructure.Molfile));
        else
            return "";
    }

(The site is a .Net implementation)

MolFile has the value of the cd_smiles column..

It works beuitifully in other cases, I have only seen a few examples of this giving an error. :-(



ChemAxon 7c2d26e5cf

13-12-2010 16:14:46

Hi,


Thanks for info.


The problem is that an invalid SMILES has been tried to load in. Your SMILES includes a space character (after N).


CC(C)[N ]([O-])=O

Since it is not a valid SMILES, auto format recognition could not assign any supported format for the input stream.


If you remove restricted character (space) from your SMILES string, Marvin can load it in.


The correct form is:


CC(C)[N]([O-])=O