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

Automatic selection of mol v2000 or mol v3000 encoding #1852

Closed
Nitvex opened this issue Nov 17, 2022 · 2 comments · Fixed by #1870
Closed

Automatic selection of mol v2000 or mol v3000 encoding #1852

Nitvex opened this issue Nov 17, 2022 · 2 comments · Fixed by #1870
Assignees
Milestone

Comments

@Nitvex
Copy link
Collaborator

Nitvex commented Nov 17, 2022

Is your feature request related to a problem? Please describe.
Introduce a single method to get a molfile from a structure. For now, calling ketcher.getMolfile('v2000') can not be applied for certain features such as enhanced stereochemistry. So you need to call the ketcher.getMolfile('v3000'). With this approach you need to know, which version of molfile is supposed to be used.
It is required to simplify determining versions of molfile and make this process automatic.

Describe the solution you'd like
It is proposed to make version of Molfile parameter optional. Calling ketcher.getMolfile() should return the result for v2000 if possible and if not for v3000.

Note: automatic version selection is already implemented on indigo side. It is required to set molfile-saving-mode: 'auto'.
For more information, refer https://lifescience.opensource.epam.com/indigo/options/input-output-options.html#molfile-saving-mode

@Nitvex Nitvex self-assigned this Nov 17, 2022
@Nitvex Nitvex changed the title Introduce getMolfile default setting Introduce single function for mol v2000 and mol v3000 encoding Nov 17, 2022
@Nitvex Nitvex changed the title Introduce single function for mol v2000 and mol v3000 encoding Automatic selection of mol v2000 or mol v3000 encoding Nov 17, 2022
@Nitvex Nitvex modified the milestones: Release 2.7.0, Release 2.8.0 Nov 18, 2022
@Nitvex
Copy link
Collaborator Author

Nitvex commented Nov 25, 2022

Files for testing:
Archive.zip

There are two files: v2000 and v3000. You can open one of these files, then call ketcher.getMolfile() and structure is supposed to be saved to corresponding format.

@Nitvex Nitvex assigned porcelain11 and unassigned Nitvex Nov 25, 2022
@Nitvex
Copy link
Collaborator Author

Nitvex commented Nov 25, 2022

For reference. Situations, when v3000 format must be used:

  • Structure highlighting – The V3000 format is required for molecule or collection highlighting.
  • Enhanced stereochemistry features - The V3000 format is required when using the enhanced stereochemical representations.
  • Long fields - If any of the fields with fixed widths for any connection table properties are exceeded, the V3000 format is used.For example, if the number of atoms (or bonds) exceeds 999. This is because the number of atoms (or bonds)on the V2000 counts line can not exceed 3 columns.
  • Template block - useful for representing large structures, such as biological molecules.
  • New properties supported only in V3000 format - such as atom CLASS and SEQID

porcelain11 added a commit that referenced this issue Nov 28, 2022
porcelain11 added a commit that referenced this issue Nov 28, 2022
porcelain11 added a commit that referenced this issue Nov 28, 2022
porcelain11 added a commit that referenced this issue Nov 28, 2022
porcelain11 added a commit that referenced this issue Nov 29, 2022
porcelain11 added a commit that referenced this issue Nov 29, 2022
Nitvex pushed a commit that referenced this issue Nov 29, 2022
* #1852 Implements automatic selection of mol encoding

* #1852 Refactor types

* #1852 Fix errors in identifyStructFormat

* #1852 Fix build

* #1852 Fix react build errors

* #1852 Run prettier to fix build

* #1852 Small fix on comments

* #1852 Fix build (prettier-write)
@Nitvex Nitvex linked a pull request Nov 30, 2022 that will close this issue
@Nitvex Nitvex closed this as completed Nov 30, 2022
@Nitvex Nitvex modified the milestones: Release 2.8.0, Release 2.7.0 Nov 30, 2022
Nitvex pushed a commit that referenced this issue Dec 7, 2022
* #1852 Implements automatic selection of mol encoding

* #1852 Refactor types

* #1852 Fix errors in identifyStructFormat

* #1852 Fix build

* #1852 Fix react build errors

* #1852 Run prettier to fix build

* #1852 Small fix on comments

* #1852 Fix build (prettier-write)
@Nitvex Nitvex added the rc.1 label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants