Error when displaying structure

User eda6f877b4

08-03-2013 20:17:30

Hi,


I have a spcific structure that reports an error when I am trying to display it using the marvin applet.


I am not sure how to figure out what the problem is, and hope for assistance.


The error message is:



What data will be needed to investigate this..?


The application is running on Marvin Applet: 5.4.0.1 and JChem version is: 5.4.0.1015.


Application is running on windows server 2008R2, MSSQL 2008R2.


Dann

ChemAxon abe887c64e

09-03-2013 07:30:18

Hi Dann,


I move your question to the forum of Marvin topics.


Best regards,


Krisztina

ChemAxon 5433b8e56b

11-03-2013 11:59:44

Hi Dann,


it seems the error message is missing from your post, can you re-attach it to the topic please?


Regards,
Istvan 

User eda6f877b4

11-03-2013 12:02:15

.. sure should be attached to this message

ChemAxon 5433b8e56b

11-03-2013 13:26:22

It seems from the message that you are trying to load a molecule in smiles format, but that #ffffffff is disturbing me at the end.


Can you please send me the code snippet where the applet is embedded, and the file you are trying to open? 

User eda6f877b4

13-03-2013 13:08:34

Hi István


Sorry for the late reply!


I have the data in sql database, a small insert script of the datarow:


 



SET IDENTITY_INSERT [dbo].[ci_structures] ON


INSERT [dbo].[ci_structures] ([cd_id], [cd_structure], [cd_smiles], [cd_formula], [cd_sortable_formula], [cd_molweight], [cd_hash], [cd_flags], [cd_timestamp], [cd_fp1], [cd_fp2], [cd_fp3], [cd_fp4], [cd_fp5], [cd_fp6], [cd_fp7], [cd_fp8], [cd_fp9], [cd_fp10], [cd_fp11], [cd_fp12], [cd_fp13], [cd_fp14], [cd_fp15], [cd_fp16], [cd_pre_calculated]) VALUES (354, 0x0A20204D72763035343020303330383133313131363244202020202020202020200A0A2031392031382020302020302020302020302020202020202020202020203939392056323030300A20202020312E343238392020202D332E3330303020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020312E343238392020202D322E3437353020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020322E323533392020202D322E3437353020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E363033392020202D322E3437353020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020312E343238392020202D312E3635303020202020302E30303030204F202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E373134352020202D312E3233373520202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E303030302020202D312E3635303020202020302E30303030204F202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E373134352020202D302E3431323520202020302E30303030204E202020302020302020302020302020302020302020302020302020302020302020302020300A2020202D302E3030303020202020302E3030303020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E3030303020202020302E3832353020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E3731343520202020312E3233373520202020302E30303030204E202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E3731343520202020322E3036323520202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E3030303020202020322E3437353020202020302E303030302042202020302020352020302020302020302020302020302020302020302020302020302020300A2020202D302E3731343520202020322E3838373520202020302E303030302046202020302020302020302020302020302020302020302020302020302020302020302020300A20202020302E3431323520202020332E3138393520202020302E303030302046202020302020302020302020302020302020302020302020302020302020302020302020300A2020202D302E3431323520202020312E3736303520202020302E303030302046202020302020302020302020302020302020302020302020302020302020302020302020300A20202020312E3432383920202020302E3832353020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A20202020312E3432383920202020302E3030303020202020302E303030302043202020302020302020302020302020302020302020302020302020302020302020302020300A2020202D322E393137302020202D302E3835343520202020302E30303030204B202020302020332020302020302020302020302020302020302020302020302020302020300A2020312020322020312020302020302020302020300A2020322020332020312020302020302020302020300A2020322020342020312020302020302020302020300A2020322020352020312020302020302020302020300A2020352020362020312020302020302020302020300A2020362020372020322020302020302020302020300A2020362020382020312020302020302020302020300A2020382020392020312020302020302020302020300A2020392031302020312020302020302020302020300A2031302031312020312020302020302020302020300A2031312031322020312020302020302020302020300A2031322031332020312020302020302020302020300A2031332031342020312020302020302020302020300A2031332031352020312020302020302020302020300A2031332031362020312020302020302020302020300A2031312031372020312020302020302020302020300A2031372031382020312020302020302020302020300A2020382031382020312020302020302020302020300A4D20204348472020322020313320202D3120203139202020310A4D2020454E440A, N'[K+].CC(C)(C)OC(=O)N1CCN(C(F)(F)F)CC1', N'C10H19BF3KN2O2', N'C00010H00019B00001F00003K00001N00002O00002', 306.175, -265106661, NULL, CAST(0x0000A17B014DD188 AS DateTime), 151061056, 543166465, 806650114, 805307937, 143654913, 1073745056, 847249536, -1609841664, 5898240, -2139094976, 369164297, 69206080, 16779522, 134234129, 3489936, 268436616, 0)


SET IDENTITY_INSERT [dbo].[ci_structures] OFF


Will you be able to work with this..?


ChemAxon 5433b8e56b

25-03-2013 10:59:47

Hi Dann,


sorry for the late reaction, I have missed your answer and just got notified on it.


From the SQL as I see the cd_smiles field content is: "N'[K+].CC(C)(C)OC(=O)N1CCN(C(F)(F)F)CC1" and this is invalid because of the apostrophe character after the starting N. Or the starting N' is being cropped before it is given to the applet where the error occurs?


Regards,
Istvan 

User eda6f877b4

25-03-2013 11:02:05

Hi, Thanks for this, I will try to investigate..


 


Dann

User eda6f877b4

25-03-2013 11:22:53

Hi


The actual content of the cd_smiles is not N'[K+].CC(C)(C)OC(=O)N1CCN(C(F)(F)F)CC1'


the sql server puts N'' around the string, which makes the correct content of the col:


[K+].CC(C)(C)OC(=O)N1CCN(C(F)(F)F)CC1


Dann

ChemAxon 5433b8e56b

26-03-2013 13:52:42

This smiles can be imported by Marvin easily. So I assume the problem is how the structure is specified for the applet. Can you send me the html code example where you add the molecule as a parameter for the applet, that may help a bit more to find out the problem.


If you feel that code is confidential, or just do not want to paste it into a public forum, feel free to contact me in e-mail.


Thanks,
Istvan 

User eda6f877b4

26-03-2013 20:14:33

Hi,


This is the setup of the marvin applet:


 


<div id="AppletDiv" style="width: 380px; height: 380px; padding-top: 5px; display: block;
text-align: center">
<!-- Structure area. -->
<script language="JavaScript1.1" type="text/javascript">
mview_name = "MView";
mview_begin("../Tools/marvin", 380, 380);
mview_param("molbg", "#f9f9fb");
mview_param("mol", "[K ].CC(C)(C)OC(=O)N1CCN(C(F)(F)F)CC1");
mview_end();
</script>
</div>

.. wil this do..?

ChemAxon 5433b8e56b

27-03-2013 15:36:03

Yes it have helped.


I have copied this into a web page and tested with Marvin, it turned out, in your html code, the structure string has a space character instead of the plus sign after the K atom symbol. If this is true in your environment, and somehow the plus sign is changed to a space character, then that will be the problem since in this case the string is not a valid smiles string.


Can you please confirm this?

User eda6f877b4

28-03-2013 19:10:50

Hi,


 


It turned out I was url escaping the string.. I can't remember why, but this was causing the problem:


Server.UrlDecode(compound.CompoundStructure.Molfile)


removing this solved the problem.


Thanks for the help!

ChemAxon 5433b8e56b

02-04-2013 11:16:39

Hi,


I am glad to hear it. If you have any further issues, please do not hesitate to contact us.


Regards,
Istvan