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 #5152

Closed
ljubica-milovic opened this issue Jul 23, 2024 · 3 comments · Fixed by #5356
Closed

Add new settings for ACS style #5152

ljubica-milovic opened this issue Jul 23, 2024 · 3 comments · Fixed by #5356

Comments

@ljubica-milovic
Copy link
Collaborator

ljubica-milovic commented Jul 23, 2024

Background

To fully comply with the ACS style, certain settings need to be added:

Bond length - length of one bond and the length of the default arrows (related issue: #5153);

Margin size - upon clicking layout, reactants, products, and other reaction elements get arranged in a grid with the height of a tallest element, and all others arranged in the middle; this margin defines the margins in that grid;
image

Hash spacing - the distance between lines of a Single Down Bond (only applies to this bond);
image

Image resolution - low/high (Related issue: #5140); low being the current low resolution (72ppi) and high being a resolution preferred by ACS (600ppi).

Requrements

  1. New setting - "Bond length" - should be added to "Bonds" section in settings.
    1.1. The setting should be placed above "Double bond width" (or after changing "Bond spacing", related issue #5154 ), and bellow "Aromatic Bonds as circle".
    1.2. Similarly to other setting, the user should be able to choose values in cm/pt/px/in with up to 1 decimal places.
    1.3. The current default size for bond length should be determined.
    1.4 Should be applied after clicking on layout
    1.5 Add to JSON of the Setting file:
    bondLengthUnit: "px"
    bondLength: 2.1

  2. New setting - "Reaction component margin size" - should be added to "General" section in settings.
    1.2. The setting should be placed bellow "Sub font size".
    2.2. Similarly to other setting, the user should be able to choose values in cm/pt/px/in with up to 1 decimal places.
    2.3. The current default size for bond length should be determined.
    2.4 Should be applied after clicking on layout
    2.5 Add to JSON of the Setting file:
    reactionComponentMarginSizeUnit: "px"
    reactionComponentMarginSize: 2.3

  3. New setting - "Hash spacing" - should be added to "Bonds" section in settings.
    3.1. The setting should be placed bellow the "Stereo (Wedge) bond width".
    3.2. Similarly to other setting, the user should be able to choose values in cm/pt/px/in with up to 1 decimal places.
    3.3. The current default size for bond length should be determined.
    3.4 Add to JSON of the Setting file:
    hashSpacingUnit: "px"
    hashSpacing: 2.2

  4. New setting "Image resolution" - should be added to "General" section in settings.
    4.1. The setting should be placed bellow "Reaction component margin size".
    4.2. This setting is read-only (user not able to choose a value)
    4.3 Displays only the values of 72 or 600 with the unit being ppi and high or low
    4.4. The current resolution is 72ppi.
    4.5 Add to JSON of the Setting file:
    imageResolution: 72
    to Indigo should send only number, not high or low as parameter

@ljubica-milovic ljubica-milovic changed the title Add new setting is relation to bond appearance Add new settings Jul 23, 2024
@AlexanderSavelyev AlexanderSavelyev changed the title Add new settings Add new settings for ACS style Aug 5, 2024
@AnnaKosol AnnaKosol added the Test Cases Written Test cases has been written for that issue label Aug 7, 2024
accmeboot pushed a commit that referenced this issue Aug 23, 2024
@accmeboot accmeboot linked a pull request Aug 26, 2024 that will close this issue
9 tasks
accmeboot pushed a commit that referenced this issue Aug 26, 2024
accmeboot pushed a commit that referenced this issue Aug 26, 2024
rrodionov91 pushed a commit that referenced this issue Aug 26, 2024
- added new fields to settings

---------

Co-authored-by: Mikhail Vialov <mikhail_vialov@epam.com>
@accmeboot
Copy link
Collaborator

Default values:

bondLength: 40
hashSpacing: 1.2
reactionComponentMarginSize: 20 // half of the bondLength

@AlexeyGirin
Copy link
Collaborator

ACS-StyleGuide.pdf

@AnnaKosol
Copy link
Contributor

Verified
default values, entering values with up to 1 decimal places, applying in the Canvas - it will be implemented by others tasks.
Image

Environment details:
Ketcher Version 2.25.0-rc.1 Build at 2024-09-03; 15:31:03
Version 1.24.0-rc.1.0-gb8f099851-wasm32-wasm-clang-19.0.0
Chrome Версия 126.0.6478.127 (Официальная сборка), (arm64)
MacOs Sonoma 14.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants