epam / epam/Indigo

Enhance Indigo to Support RTF Metadata Reading and Conversion in RDF Files

Open
#2,397 0 comments 0 reactions 0 assignees View on GitHub
MMPK
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

**Background**
In the current implementation, Indigo handles RDF files containing reactions (RXN) but lacks the capability to utilize metadata associated with these reactions. Metadata fields are crucial for detailed documentation and readability of chemical reactions. Metadata fields are not specified, and to enhance documentation capabilities and allow users to leverage rich text for better clarity and communication, there is a need to introduce support for RTF thru new metadata fields.

**Solution**

1. Introduction of RTF Metadata Fields:

**Objective:** Introduce two new metadata fields, "Rich Text above arrow" and "Rich Text below arrow", in the RDF file format to store RTF formatted text associated with reactions.
**Details**: Modify the RDF schema to include these new fields, allowing users to input formatted text as shown in the examples:

```
$DTYPE Rich Text above arrow
$DATUM {\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold} text.\par}
$DTYPE Rich Text below arrow
$DATUM {\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold} text.\par}
```

2. RTF Reading and Parsing:

**Objective**: Enable Indigo to accurately read and parse RTF content from these new metadata fields.
**Details**: Implement a robust RTF parser that can extract and convert RTF content into a text object format supported by Ketcher, considering all styling and formatting attributes.

3. Linking Text to reaction's data model:

**Objective:** Ensure that the parsed text objects are correctly linked to the corresponding reaction’s data model in Indigo.
**Details:** Text from _Rich Text above arrow_ should be included to data model as text above the reaction arrow, and text from _Rich Text below arrow_ as text below.

4. Conversion from Ketcher Text Back to RTF:

**Objective:** Facilitate the conversion of text objects from Ketcher text format back into RTF format when saving reaction data models to RDF files.
**Details:** Develop functionality that re-applies RTF formatting to text objects during the save process, ensuring that all formatting is preserved and text will be added to reaction's _Rich Text above arrow_ and _Rich Text below arrow_ metadata.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.