atomSetColor fails in multi-cell with 5.6.0.2

User 2a3dba2aa7

19-10-2011 16:05:00

Using the 5.6.0.2 (and older version 5's, haven't tested all) I can't get this to work as expected, just get a monochrome picture.  If I omit layout and param and just use mol instead of cell0, it works OK.  Bug or my error?  This type of code used to work OK (though I've tweaked this a bit to make it consistent with the latest documentation).  Problem exists in IE under winXP with java 1.6.0.20 and in firefox under Linux with java 1.6.0.29.  Under firefox I've opened the error console and get 5 repeats of the same error : "propertyChange is not defined".  A similar error gets picked up in the debugger running this in IE under WinXP.


<HTML>
<BODY>
<P>
TOP
</p>
<script LANGUAGE="JavaScript1.1" SRC="/path/to/marvin/marvin.js"> </script>
<script LANGUAGE="JavaScript1.1">
<!--
mview_begin("/path/to/marvin/", 400, 215);
mview_param("rows", "1");
mview_param("cols", "1");
mview_param("setColoringEnabled", "true");
mview_param("colorScheme", "mono");
mview_param("background", "#ffffff");
mview_param("molbg", "#ffffff");
mview_param("atomNumbersVisible", "true");
mview_param("atomSetColor1", "#0000ff");
mview_param("atomSet0.1", "1,2,3");
mview_param("layout0", ":2:1:M:0:0:1:1:L:1:0");
mview_param("param0", ":M:400:180:L:10b");
mview_param("cell0", "|/path/to/marvin/mols-2d/mol1.mol|mol1fromChemAxon|");
mview_end();
//-->
</script>
<P>
END
</P>
</BODY>
</HTML>

ChemAxon 5433b8e56b

25-10-2011 00:09:50

Hi,

it seems your experience is based on the difference on the handling of cell and mol parameter inside the code. Indeed it is a bug, i can not give you any effective workaround just to use the mol parameter, which has limitations.

It can be used with multimolecule files also, but the mol parameter is not as comfortable as the cell parameter, for creating molecular tables.


We can deliver a fix for this in 5.8 version, and as i tracked it down, the bug exsits in the whole 5.x series.


Regards,
Istvan

User 2a3dba2aa7

27-10-2011 10:09:40

I will just have to use an html table, then, with one marvinview per table cell, rather than a marvin table.  Unless there's a better way to use marvinview with the mol parameter that would enable me to keep the current structure based around the marvin table.... please let me know if there is.   Or I may ask my users just to wait for the colours until 5.8.... do you have a time estimate on 5.8?


Thanks,


Howard.

ChemAxon 5433b8e56b

27-10-2011 15:15:45

Hi Howard,


currently it seems we will release the 5.8 version early next year.


But the good news is that, i have found a workaround for you, with some inconvenience (more parameters to set and the need to calculate its values) or limitation.


You can use the mol parameter, with the celli_j parameter to set the labels, and with the  rows, and cols parameter if you know the number of result molecules that is loaded from a multimolecule file, that is added thru the mol parameter. You also can use the visiblerows, and visiblecols parameter, but it seems it is working only when you set the values in a way where only the vertical scrollbar is needed (e.g.: the cols, and visiblecols parameter is the same)


If you try this, you should set the cols, and rows parameter in a way where there are enough cells to render all molecules in the multimolecule file into the table inside MarvinView, if you set less cells then structures, only the first n structure will be inside the applet (n is the number of cels).


I hope that may help.


Regards,
Istvan

User 2a3dba2aa7

28-10-2011 09:46:35

Thanks, Istvan, this looks good.   Do you have an example (say just a simple table with two molecules side-by-side or something) that you could post so that I can see exactly how you would do this?  It would help to see how the code looks for a working example.  If you don't have one handy from your own tests, don't worry, I'll work through the documentation and figure it out the long way.

ChemAxon 5433b8e56b

04-11-2011 12:14:43

Hi Howard,


i used the following parameters in my test:


layout0=:2:1:M:0:0:1:1:L:1:0
cell0_1=label
background=#ffffff
setColoringEnabled=true
atomSetColor1=#00ff00
atomSet0.1=1,2,3
atomSet3.1=1,2
mol=mols.sdf
colorScheme=mono
cols=2
rows=5
visiblerows=2
visiblecols=2


i hope this helps, and does not come too late.


Regards,
Istvan