Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new settings for ACS style for convert and layout functions #2176

Closed
AnnaKosol opened this issue Aug 2, 2024 · 1 comment · Fixed by #2307
Closed

Add new settings for ACS style for convert and layout functions #2176

AnnaKosol opened this issue Aug 2, 2024 · 1 comment · Fixed by #2307
Assignees
Labels
ACS standard phase III SVG/PNG Bucket: Bugs related to SVG/PNG export Team G Test Cases Written Test cases has been written for that issue

Comments

@AnnaKosol
Copy link
Collaborator

AnnaKosol commented Aug 2, 2024

Background
Related issue: epam/ketcher#5152 need to add new settings.

Solution
When calling indigo's functions such as layout, convert on the Canvas, new settings parameters should be processed.
List of the new settings in the JSON of the Settings:
bond-length-unit: "px"
bond-length: 2.2

If possible, the size of an arrow should be the same as the size of a bond. Exceptions are when catalysts/reaction conditions/other additional context placed bellow or above the arrow. The logic is described in Ketcher issue: #5155
(images for better understanding)
image
image

Reaction margin size should be applied both for distance between plus and component and between arrow and component structure bounding box (should be equal distance)

image

Structure bounding box should be calculated as atoms bounding box + default atom label margin=0.5 Default bond length

image

For simple atoms atoms bounding box is a dot in center of the atom
Image

Default size of the plus element by default equals 0.5 bond-length

image

reaction-component-margin-size-unit: "px"
reaction-component-margin-size: default value = 2.3 pt
image-resolution

bond-length-unit values can be in cm/pt/px/in
bond-length number with 1 decimal places
reaction-component-margin-size-unit values can be in cm/pt/px/in
reaction-component-margin-size number with 1 decimal places
image-resolution should be a number;
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.

Additional information
1 inch = 72 pt
1 inch = 2.54 cm
1 angstrom = 1e-8 cm
PPI = pixels per inch = sqrt(w^2 + h^2) /d
where w - width in px, h - height in px, d - diagonal in inches
if PPI = 100 then 1px = 0.01 in
reactionComponentMarginSize - horizontal & vertical margins

SMILES for testing
OC(=O)C.OCCC>>CC(=O)OCCCC.O

@AnnaKosol AnnaKosol added SVG/PNG Bucket: Bugs related to SVG/PNG export phase III Team G ACS standard labels Aug 2, 2024
@AlexanderSavelyev AlexanderSavelyev changed the title Add new settings Add new settings for ACS style for convert, layout and clean-up functions Aug 5, 2024
@AnnaKosol AnnaKosol added the Test Cases Written Test cases has been written for that issue label Aug 6, 2024
@AleksandrParamonoff AleksandrParamonoff self-assigned this Aug 8, 2024
@AnnaKosol AnnaKosol changed the title Add new settings for ACS style for convert, layout and clean-up functions Add new settings for ACS style for convert and layout functions Aug 15, 2024
@AleksandrParamonoff AleksandrParamonoff linked a pull request Aug 28, 2024 that will close this issue
@AlexeyGirin
Copy link
Collaborator

ACS-StyleGuide.pdf

AliaksandrDziarkach added a commit that referenced this issue Sep 18, 2024
Co-authored-by: Aliaksandr Dziarkach <18146690+AliaksandrDziarkach@users.noreply.github.com>
Co-authored-by: Aliakasndr Dziarkach <Aliakasndr.Dziarkach@gmail.com>
@AliaksandrDziarkach AliaksandrDziarkach linked a pull request Sep 18, 2024 that will close this issue
@AlexeyGirin AlexeyGirin added this to the Indigo-1.24.0-rc.3 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACS standard phase III SVG/PNG Bucket: Bugs related to SVG/PNG export Team G Test Cases Written Test cases has been written for that issue
Projects
None yet
4 participants