From 1ff0c56412abada30afd1246be7e9b37f3de53fe Mon Sep 17 00:00:00 2001 From: even1024 Date: Thu, 28 Nov 2024 12:00:12 +0100 Subject: [PATCH] 3 letters --- api/wasm/indigo-ketcher/indigo-ketcher.cpp | 13 ++++++++++--- api/wasm/indigo-ketcher/test/test.js | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/wasm/indigo-ketcher/indigo-ketcher.cpp b/api/wasm/indigo-ketcher/indigo-ketcher.cpp index 076f5673f1..0d1cc3e936 100644 --- a/api/wasm/indigo-ketcher/indigo-ketcher.cpp +++ b/api/wasm/indigo-ketcher/indigo-ketcher.cpp @@ -542,9 +542,16 @@ namespace indigo input_format = it->second; bool use_document = false; - 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"}; + static const std::set document_formats{"sequence", + "chemical/x-sequence", + "peptide-sequence-3-letter", + "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); diff --git a/api/wasm/indigo-ketcher/test/test.js b/api/wasm/indigo-ketcher/test/test.js index ab7cd094f2..d1da8712ff 100644 --- a/api/wasm/indigo-ketcher/test/test.js +++ b/api/wasm/indigo-ketcher/test/test.js @@ -857,6 +857,9 @@ M END options.set("output-content-type", "chemical/x-peptide-sequence-3-letter"); const peptide_seq = indigo.convert(peptide_ket_ref.toString(), "chemical/x-peptide-sequence-3-letter", options); assert.equal(peptide_seq, peptide_seq_ref); + options.set("output-content-type", "peptide-sequence-3-letter"); + const peptide_seq1 = indigo.convert(peptide_ket_ref.toString(), "peptide-sequence-3-letter", options); + assert.equal(peptide_seq1, peptide_seq_ref); options.delete(); }); }