Generate molecule's picture with fixed bond length using API

User 0d64032b61

01-04-2016 03:16:22

Hi,


How can I convert a molecular structure to a picture with FIXED bond length if the size of the structure is less than that of a canvas by using JChem API or molconvert command? Is there any parameter to set? Usually a structure is ajusted to fit the size of canvas when it is converted to an image, thus, it will be incongruous when two molecules of big and small size are put together: the bond length of the smaller molecule is much greater than the bigger one. I would the smaller struture look small as it should be, and just when the size of the structure is bigger than the canvas, the bond length is ajusted to fit the canvas.


thanks.


ctsun

ChemAxon cbb451ac1e

04-04-2016 07:38:54

Hello,


Currently there is a maxScale property that can be set in the API of Marvin, and the imageExport use it as a constraint, but it does not can do anything with bigger structures. So if the maxScale is set, the structures that have not enough space, will be downscaled, but the upscaling of smaller structures can be avoided with this limit. The default 100% zoom in MarvinSketch means 28 as scale value.


Can you try this and let us know if it solved your problem? 


BR,