From f37b576a871b2b5e4b0ceed084afa7b48086c630 Mon Sep 17 00:00:00 2001 From: Aliaksandr Dziarkach <18146690+AliaksandrDziarkach@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:05:07 +0300 Subject: [PATCH] Backmerge: #2615 - Export to three letter amino acid codes cause convert error (#2626) --- api/wasm/indigo-ketcher/indigo-ketcher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/wasm/indigo-ketcher/indigo-ketcher.cpp b/api/wasm/indigo-ketcher/indigo-ketcher.cpp index a645547004..94e7b7dfb3 100644 --- a/api/wasm/indigo-ketcher/indigo-ketcher.cpp +++ b/api/wasm/indigo-ketcher/indigo-ketcher.cpp @@ -540,10 +540,10 @@ namespace indigo input_format = it->second; bool use_document = false; - if ((input_format == "ket" || input_format == "application/json") && outputFormat.size() > 0 && - (outputFormat == "sequence" || outputFormat == "chemical/x-sequence" || "chemical/x-peptide-sequence-3-letter" || outputFormat == "fasta" || - outputFormat == "chemical/x-fasta" || outputFormat == "idt" || outputFormat == "chemical/x-idt" || outputFormat == "helm" || - outputFormat == "chemical/x-helm")) + static const std::set document_formats{ + "sequence", "chemical/x-sequence", "chemical/x-peptide-sequence-3-letter", "fasta", "chemical/x-fasta", "idt", "chemical/x-idt", + "helm", "chemical/x-helm"}; + if ((input_format == "ket" || input_format == "application/json") && outputFormat.size() > 0 && document_formats.count(outputFormat) > 0) use_document = true; IndigoKetcherObject iko = loadMoleculeOrReaction(data, options_copy, library, use_document);