display images cause bug

User 247a2c5018

13-05-2016 14:01:23

hello,


 


I tried your examples  : https://marvinjs-demo.chemaxon.com/latest/examples/example-more-images-immediately.html


 


it works but for several molecules, the image is not displayed.


I attach the examples in the attached file.


I try marvinjs 14 and 16 and i have the same problems.


Thanks 


 


Kiet

ChemAxon 76c88f5366

17-05-2016 10:25:20

Hi Kiet, 


I cannot reproduce this issue with the molecules you sent, and it seems that to give you the proper support, we would need more information.


- Could you send us the source of a molecule and a code snippet that you can reproduce the issue with?


If you used MOL V2000 format for the molecules (as these are in the example) please, consider that this format contains 3 lines in its Header Block:
1. line: molecule name,
2. line:  info about the source generation ( if you generated the molecule in Marvin JS this will be something like this: MJ<version number>)
3. line: comments
, and all of the three lines are required (but can be empty).


Please check that all of the 3 lines are represented, because if these are not, Marvin JS could not parse these molecule sources.


I am looking forward your reply here or in email ([email protected]).


Best regards, 
Eszter 

User 247a2c5018

17-05-2016 12:02:39

Hi ,


 


the problem come from V3000 format which is not displayed:


 


var molecules = new Array("\n  Mrv0541 05171612212D          \n\n  0  0  0     0  0            999 V3000\nM  V30 BEGIN CTAB\nM  V30 COUNTS 7 7 0 0 0\nM  V30 BEGIN ATOM\nM  V30 1 N 9.8098 -7.2723 0 0\nM  V30 2 N 11.1282 -6.468 0 0\nM  V30 3 C 9.7268 -4.1876 0 0\nM  V30 4 C 11.0785 -4.9256 0 0\nM  V30 5 C 8.6654 -5.2988 0 0\nM  V30 6 C 12.3969 -4.1295 0 0\nM  V30 7 C 7.1396 -5.108 0 0\nM  V30 END ATOM\nM  V30 BEGIN BOND\nM  V30 1 1 2 1\nM  V30 2 1 3 5\nM  V30 3 1 4 2\nM  V30 4 2 5 1\nM  V30 5 1 6 4\nM  V30 6 1 7 5\nM  V30 7 2 4 3\nM  V30 END BOND\nM  V30 END CTAB\nM  END\n", "\n  Mrv0541 05171612212D          \n\n  0  0  0     0  0            999 V3000\nM  V30 BEGIN CTAB\nM  V30 COUNTS 7 7 0 0 0\nM  V30 BEGIN ATOM\nM  V30 1 N 4.1907 -11.0866 0 0\nM  V30 2 C 5.4241 -11.9861 0 0\nM  V30 3 C 2.9301 -11.9861 0 0\nM  V30 4 C 4.9539 -13.4715 0 0\nM  V30 5 C 3.4139 -13.4715 0 0\nM  V30 6 N 8.0339 -12.538 0 0\nM  V30 7 C 6.8891 -11.5159 0 0\nM  V30 END ATOM\nM  V30 BEGIN BOND\nM  V30 1 1 2 1\nM  V30 2 1 3 1\nM  V30 3 2 4 2\nM  V30 4 2 5 3\nM  V30 5 1 6 7\nM  V30 6 1 7 2\nM  V30 7 1 4 5\nM  V30 END BOND\nM  V30 END CTAB\nM  END\n");


Kiet

ChemAxon 76c88f5366

19-05-2016 08:45:25

Hi Kiet, 


If you applied the example, I assume you used the ImageExporter.molToDataUrl(value) function.
This only works with Mol V2000 format.
For Mol V3000 format we recommend you to use a renderer as you can see in this example: https://marvinjs-demo.chemaxon.com/latest/examples/example-create-image.html . /> (Please note, that for exporting images from other formats than Mol V2000 or MRV, MolConvert web service is needed.)


Best regards,
Eszter