Skip to content

Monomer Library Import/Export #10139

Description

@ieva-jonusaite

Monomer Library Import/Export

Background

This feature enables users to export and import their custom monomer library.
The system must display an error message if the user attempts to import an invalid file (wrong format).
Error message example: "Import failed: The selected file is not a valid monomer library file. Please check the file format and try again."


Requirement

1. UI Changes

  • Add two new buttons, Import and Export, to the monomer panel (similar to settings download for small molecules).
Image

2. Export Workflow

  • On Export click, a "Save As" dialog must appear.
  • The dialog must provide a dropdown to select the File format:
    • KET
    • SCSR
  • The exported file will contain all monomers from the user's custom library.

3. Import Workflow

  • On Import click, a file selection dialog must appear.
  • After a file is selected, a confirmation dialog must be shown with the following choices for handling the imported monomers:

A. Replace

  • Logic: Deletes all existing custom monomers and replaces them with the library from the file.
  • Warning: The dialog must display the text:
    "This will delete all of your existing custom monomers."

B. Merge

  • Logic: Adds monomers from the file to the current library.
  • Duplicate Handling: If Merge is selected, the user must also choose how to handle monomers with a matching structure/code (InChi)/type:
    • Option 1: Keep existing: The monomer in the current library is kept; the incoming one is ignored.
    • Option 2: Overwrite with new: The monomer in the current library is replaced by the incoming one.

C. Add

  • Logic: Adds only new monomers from the imported file that do not already exist in the current library. Existing monomers are left unchanged.
  • Warning: If no new monomers are found in the imported file, display:
    "No new monomers were added. All imported monomers already exist in your library."

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions