Background
Currently, the settings are not supported by rendering in PNG and SVG format.
Requirements
The following parameters should be processed for rendering:
atomColoring - existing option render-coloringrender-font-sizerender-font-size-unitrender-font-size-subrender-font-size-sub-unitrender-image-resolution (int number, default 72 ppi)
bond-length-unitbond-lengthrender-bond-thicknessrender-bond-thickness-unitrender-output-sheet-width (default value: Letter format width = 11 inches)
render-output-sheet-height (default value: Letter format height = 8.5 inches)
conversion from angstroms to units is done using bond-length. First calculate minimal bond length in angstrom b_ang (exclude zero bonds < eps=0.001) . Then take bond-length and bond-length-unit and calculate ang_to_in (angstorm to inch) conversion using minimal bond b_ang. Then calculate bond length in pixels using render-image-resolution
e.g. if bond-length = 0.2 in, b_ang = 0.9A, then ang_to_in = 0.2/0.9 (in/A)= 0.22 in/A
if render-image-resolution=600ppi, and bond is 1.5A then in pixels bond_length = 600 0.22 1.5 (px). And every object in angstroms (e.g. margin size) can be recalculated to pixels as object_size_Aang_to_inrender-image-resolution
if render-output-sheet-width, render-output-wheet-height are specified then render should generate output image with specified height or width. The priority should be taken to width. E.g. if width and height both specified then take width (and calculate height according to bounding box of result structure). If width is not specified, then take height. If no properties were specified the calculate image size according to average bond length.
render-image-resolution can be high/low; PNG images should be able to be exported with the resolution of 600ppi (ACS standard preferred resolution/high resolution)> Current resolution (72ppi) is considered as low resolution.
Regardless of the resolution, the size of the image should be such that one bond is ~0,5cm (0,2in/14,4pt) long when printed/100% zoom.
The new settings render-font-size-unitrender-font-size-sub-unitrender-bond-thickness-unitrender-stereo-bond-width-unit related issue: https://github.com/epam/ketcher/issues/5200
Background Currently, the settings are not supported by rendering in PNG and SVG format.
Requirements
The following parameters should be processed for rendering:
atomColoring
- existing optionrender-coloring
render-font-size
render-font-size-unit
render-font-size-sub
render-font-size-sub-unit
render-image-resolution
(int number, default 72 ppi)bond-length-unit
bond-length
render-bond-thickness
render-bond-thickness-unit
render-output-sheet-width
(default value: Letter format width = 11 inches)render-output-sheet-height
(default value: Letter format height = 8.5 inches)conversion from angstroms to units is done using
bond-length
. First calculate minimal bond length in angstromb_ang
(exclude zero bonds < eps=0.001) . Then takebond-length
andbond-length-unit
and calculateang_to_in
(angstorm to inch) conversion using minimal bondb_ang
. Then calculate bond length in pixels usingrender-image-resolution
e.g. ifbond-length
= 0.2 in,b_ang
= 0.9A, thenang_to_in
= 0.2/0.9 (in/A)= 0.22 in/A ifrender-image-resolution
=600ppi, and bond is 1.5A then in pixels bond_length = 600 0.22 1.5 (px). And every object in angstroms (e.g. margin size) can be recalculated to pixels asobject_size_A
ang_to_in
render-image-resolution
if
render-output-sheet-width
,render-output-wheet-height
are specified then render should generate output image with specified height or width. The priority should be taken to width. E.g. if width and height both specified then take width (and calculate height according to bounding box of result structure). If width is not specified, then take height. If no properties were specified the calculate image size according to average bond length.Additional information
Full JSON file of Settings is: new JSON for settings.json.zip
The new settings
hashSpacingUnit
hashSpacing
imageResolution
related issue: https://github.com/epam/ketcher/issues/5152hashSpacingUnit
values can be in cm/pt/px/inhashSpacing
number with 1 decimal places the settings were moved to https://github.com/epam/Indigo/issues/2246render-image-resolution
can be high/low; PNG images should be able to be exported with the resolution of 600ppi (ACS standard preferred resolution/high resolution)> Current resolution (72ppi) is considered as low resolution. Regardless of the resolution, the size of the image should be such that one bond is ~0,5cm (0,2in/14,4pt) long when printed/100% zoom.The new settings
bond-length-unit
bond-length
reactionComponentMarginSizeUnit
reactionComponentMarginSize
related issue: https://github.com/epam/Indigo/issues/2176The new settings
render-font-size-unit
render-font-size-sub-unit
render-bond-thickness-unit
render-stereo-bond-width-unit
related issue: https://github.com/epam/ketcher/issues/5200The setting
render-bond-spacing
related issue: https://github.com/epam/ketcher/issues/5154render-output-format-width
render-output-format-hHeight
are only for Indigo, Ketcher should not implement these parameters.related task: https://github.com/epam/Indigo/issues/2246