User 2c6aa21beb
14-07-2010 09:51:10
Hi, one of our customers is converting a smiles structure to an image using convert2image.jar but the output isnt the same as can be seen in the marvin applet.
Why is the image different to what is displayed in the marvin applet? Is there something I can pass to the java conversion process so that the output will be the same?
Please see attached screenshots for an example,
Kind Regards
Karl
ChemAxon 7c2d26e5cf
14-07-2010 18:10:30
Where you get from convert2image.jar? I assume it uses the MolConverter or MolExporter API.
With the API you can customize output layout as you want.
By saving as image in applet, the created image is actually a snapshot about the canvas. In this case, settings can be different than the default one in image export tool.
Use the desired image export options to get similar result: Image export in Marvin
On the other hand, not only the display settings are different between the two images. The orientation of molecules are also different. Since SMILES does not store coordinatea, rendering of SMILES depends on which cleaning options are specified when coordinates are generated by loading of the structure.
If you want to be sure that your molecule always displays with the same coordinates (same rendering), store your structure in a format that preserves coordinates. The most descriptive format is MRV that our own format and it capable stores anything that is drawn in Marvin. If you do not need all features, MDL molfile format can be also good that can also store atom coordinates.
Of course, if you use the same cleaning options by SMILES - image conversion and by loading the SMILES into applet, you will get the same result.
If you need, my colleague can give more details about SMILES cleaning options.