From 681abe9cb1ef6c17e17672aebd59753e95f0a794 Mon Sep 17 00:00:00 2001 From: Aliaksandr Dziarkach <18146690+AliaksandrDziarkach@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:54:23 +0300 Subject: [PATCH] Backmerge: #2615 - Export to three letter amino acid codes cause convert error. backmerge to master --- api/c/indigo/src/indigo_savers.cpp | 2 +- api/wasm/indigo-ketcher/indigo-ketcher.cpp | 9 ++--- .../test/peptide_ref_3_letter.ket | 1 + api/wasm/indigo-ketcher/test/test.js | 26 +++++++++++++-- .../backend/service/tests/api/indigo_test.py | 33 +++++++++++++++++-- .../backend/service/v2/indigo_api.py | 7 ++++ .../backend/service/v2/validation.py | 1 + 7 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 api/wasm/indigo-ketcher/test/peptide_ref_3_letter.ket diff --git a/api/c/indigo/src/indigo_savers.cpp b/api/c/indigo/src/indigo_savers.cpp index 26a8665ddd..7704c7a240 100644 --- a/api/c/indigo/src/indigo_savers.cpp +++ b/api/c/indigo/src/indigo_savers.cpp @@ -630,7 +630,7 @@ CEXPORT int indigoSaveSequence3Letter(int item, int output, int library) out.flush(); return 1; } - throw IndigoError("indigoSaveSequence(): expected molecule, got %s", obj.debugInfo()); + throw IndigoError("indigoSaveSequence3Letter(): expected document, got %s", obj.debugInfo()); } INDIGO_END(-1); } diff --git a/api/wasm/indigo-ketcher/indigo-ketcher.cpp b/api/wasm/indigo-ketcher/indigo-ketcher.cpp index 8330fb85fd..a645547004 100644 --- a/api/wasm/indigo-ketcher/indigo-ketcher.cpp +++ b/api/wasm/indigo-ketcher/indigo-ketcher.cpp @@ -144,7 +144,7 @@ namespace indigo { result = _checkResultString(indigoSequence(id(), library)); } - else if (outputFormat == "sequence-3-letter" || outputFormat == "chemical/x-sequence-3-letter") + else if (outputFormat == "peptide-sequence-3-letter" || outputFormat == "chemical/x-peptide-sequence-3-letter") { result = _checkResultString(indigoSequence3Letter(id(), library)); } @@ -540,9 +540,10 @@ namespace indigo input_format = it->second; bool use_document = false; - if (input_format == "ket" && outputFormat.size() > 0 && - (outputFormat == "sequence" || outputFormat == "chemical/x-sequence" || outputFormat == "fasta" || outputFormat == "chemical/x-fasta" || - outputFormat == "idt" || outputFormat == "chemical/x-idt" || outputFormat == "helm" || outputFormat == "chemical/x-helm")) + 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")) use_document = true; IndigoKetcherObject iko = loadMoleculeOrReaction(data, options_copy, library, use_document); diff --git a/api/wasm/indigo-ketcher/test/peptide_ref_3_letter.ket b/api/wasm/indigo-ketcher/test/peptide_ref_3_letter.ket new file mode 100644 index 0000000000..128765b94b --- /dev/null +++ b/api/wasm/indigo-ketcher/test/peptide_ref_3_letter.ket @@ -0,0 +1 @@ +{"root":{"nodes":[{"$ref":"monomer0"},{"$ref":"monomer1"},{"$ref":"monomer2"},{"$ref":"monomer3"},{"$ref":"monomer4"},{"$ref":"monomer5"},{"$ref":"monomer6"},{"$ref":"monomer7"},{"$ref":"monomer8"},{"$ref":"monomer9"},{"$ref":"monomer10"},{"$ref":"monomer11"},{"$ref":"monomer12"},{"$ref":"monomer13"},{"$ref":"monomer14"},{"$ref":"monomer15"},{"$ref":"monomer16"},{"$ref":"monomer17"},{"$ref":"monomer18"},{"$ref":"monomer19"},{"$ref":"monomer20"},{"$ref":"monomer21"}],"connections":[{"connectionType":"single","endpoint1":{"monomerId":"monomer0","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer1","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer1","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer2","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer2","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer3","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer3","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer4","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer4","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer5","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer5","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer6","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer6","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer7","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer7","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer8","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer8","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer9","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer9","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer10","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer10","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer11","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer11","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer12","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer12","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer13","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer13","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer14","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer14","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer15","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer15","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer16","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer16","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer17","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer17","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer18","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer18","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer19","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer19","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer20","attachmentPointId":"R1"}},{"connectionType":"single","endpoint1":{"monomerId":"monomer20","attachmentPointId":"R2"},"endpoint2":{"monomerId":"monomer21","attachmentPointId":"R1"}}],"templates":[{"$ref":"monomerTemplate-A___Alanine"},{"$ref":"monomerTemplate-C___Cysteine"},{"$ref":"monomerTemplate-D___Aspartic acid"},{"$ref":"monomerTemplate-E___Glutamic acid"},{"$ref":"monomerTemplate-F___Phenylalanine"},{"$ref":"monomerTemplate-G___Glycine"},{"$ref":"monomerTemplate-H___Histidine"},{"$ref":"monomerTemplate-I___Isoleucine"},{"$ref":"monomerTemplate-K___Lysine"},{"$ref":"monomerTemplate-L___Leucine"},{"$ref":"monomerTemplate-M___Methionine"},{"$ref":"monomerTemplate-N___Asparagine"},{"$ref":"monomerTemplate-O___Pyrrolysine"},{"$ref":"monomerTemplate-P___Proline"},{"$ref":"monomerTemplate-Q___Glutamine"},{"$ref":"monomerTemplate-R___Arginine"},{"$ref":"monomerTemplate-S___Serine"},{"$ref":"monomerTemplate-U___Selenocysteine"},{"$ref":"monomerTemplate-V___Valine"},{"$ref":"monomerTemplate-W___Tryptophan"},{"$ref":"monomerTemplate-Y___Tyrosine"}]},"monomer0":{"type":"monomer","id":"0","seqid":1,"position":{"x":0.000000,"y":-0.000000},"alias":"A","templateId":"A___Alanine"},"monomer1":{"type":"monomer","id":"1","seqid":2,"position":{"x":1.600000,"y":-0.000000},"alias":"C","templateId":"C___Cysteine"},"monomer2":{"type":"monomer","id":"2","seqid":3,"position":{"x":3.200000,"y":-0.000000},"alias":"D","templateId":"D___Aspartic acid"},"monomer3":{"type":"monomer","id":"3","seqid":4,"position":{"x":4.800000,"y":-0.000000},"alias":"E","templateId":"E___Glutamic acid"},"monomer4":{"type":"monomer","id":"4","seqid":5,"position":{"x":6.400000,"y":-0.000000},"alias":"F","templateId":"F___Phenylalanine"},"monomer5":{"type":"monomer","id":"5","seqid":6,"position":{"x":8.000000,"y":-0.000000},"alias":"G","templateId":"G___Glycine"},"monomer6":{"type":"monomer","id":"6","seqid":7,"position":{"x":9.600000,"y":-0.000000},"alias":"H","templateId":"H___Histidine"},"monomer7":{"type":"monomer","id":"7","seqid":8,"position":{"x":11.200000,"y":-0.000000},"alias":"I","templateId":"I___Isoleucine"},"monomer8":{"type":"monomer","id":"8","seqid":9,"position":{"x":12.800000,"y":-0.000000},"alias":"K","templateId":"K___Lysine"},"monomer9":{"type":"monomer","id":"9","seqid":10,"position":{"x":14.400001,"y":-0.000000},"alias":"L","templateId":"L___Leucine"},"monomer10":{"type":"monomer","id":"10","seqid":11,"position":{"x":16.000000,"y":-0.000000},"alias":"M","templateId":"M___Methionine"},"monomer11":{"type":"monomer","id":"11","seqid":12,"position":{"x":17.600000,"y":-0.000000},"alias":"N","templateId":"N___Asparagine"},"monomer12":{"type":"monomer","id":"12","seqid":13,"position":{"x":19.200001,"y":-0.000000},"alias":"O","templateId":"O___Pyrrolysine"},"monomer13":{"type":"monomer","id":"13","seqid":14,"position":{"x":20.800001,"y":-0.000000},"alias":"P","templateId":"P___Proline"},"monomer14":{"type":"monomer","id":"14","seqid":15,"position":{"x":22.400000,"y":-0.000000},"alias":"Q","templateId":"Q___Glutamine"},"monomer15":{"type":"monomer","id":"15","seqid":16,"position":{"x":24.000000,"y":-0.000000},"alias":"R","templateId":"R___Arginine"},"monomer16":{"type":"monomer","id":"16","seqid":17,"position":{"x":25.600000,"y":-0.000000},"alias":"S","templateId":"S___Serine"},"monomer17":{"type":"monomer","id":"17","seqid":18,"position":{"x":27.200001,"y":-0.000000},"alias":"R","templateId":"R___Arginine"},"monomer18":{"type":"monomer","id":"18","seqid":19,"position":{"x":28.800001,"y":-0.000000},"alias":"U","templateId":"U___Selenocysteine"},"monomer19":{"type":"monomer","id":"19","seqid":20,"position":{"x":30.400000,"y":-0.000000},"alias":"V","templateId":"V___Valine"},"monomer20":{"type":"monomer","id":"20","seqid":21,"position":{"x":32.000000,"y":-0.000000},"alias":"W","templateId":"W___Tryptophan"},"monomer21":{"type":"monomer","id":"21","seqid":22,"position":{"x":33.600002,"y":-0.000000},"alias":"Y","templateId":"Y___Tyrosine"},"monomerTemplate-A___Alanine":{"type":"monomerTemplate","id":"A___Alanine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Alanine","alias":"A","naturalAnalogShort":"A","attachmentPoints":[{"attachmentAtom":0,"type":"left","leavingGroup":{"atoms":[6]}},{"attachmentAtom":3,"type":"right","leavingGroup":{"atoms":[5]}}],"atoms":[{"label":"N","location":[-1.254900,-0.392000,0.000000]},{"label":"C","location":[-0.272000,0.263300,0.000000],"stereoLabel":"abs"},{"label":"C","location":[-0.310300,1.739300,0.000000]},{"label":"C","location":[1.052300,-0.392000,0.000000]},{"label":"O","location":[1.082900,-1.572200,0.000000]},{"label":"O","location":[2.035300,0.263300,0.000000]},{"label":"H","location":[-2.333400,0.090500,0.000000]}],"bonds":[{"type":1,"atoms":[1,0]},{"type":1,"atoms":[1,2],"stereo":1},{"type":1,"atoms":[1,3]},{"type":2,"atoms":[3,4]},{"type":1,"atoms":[3,5]},{"type":1,"atoms":[0,6]}]},"monomerTemplate-C___Cysteine":{"type":"monomerTemplate","id":"C___Cysteine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Cysteine","alias":"C","naturalAnalogShort":"C","attachmentPoints":[{"attachmentAtom":4,"type":"left","leavingGroup":{"atoms":[7]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[6]}},{"attachmentAtom":3,"type":"side","leavingGroup":{"atoms":[8]}}],"atoms":[{"label":"C","location":[1.445700,-1.133300,0.000000]},{"label":"C","location":[0.145300,-0.384000,0.000000],"stereoLabel":"abs"},{"label":"C","location":[0.143000,1.116800,0.000000]},{"label":"S","location":[-1.157300,1.866100,0.000000]},{"label":"N","location":[-1.155100,-1.133300,0.000000]},{"label":"O","location":[1.447500,-2.333300,0.000000]},{"label":"O","location":[2.484200,-0.532000,0.000000]},{"label":"H","location":[-2.194200,-0.533100,0.000000]},{"label":"H","location":[-1.159100,3.066100,0.000000]}],"bonds":[{"type":2,"atoms":[5,0]},{"type":1,"atoms":[0,1]},{"type":1,"atoms":[0,6]},{"type":1,"atoms":[1,4]},{"type":1,"atoms":[1,2],"stereo":1},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[4,7]},{"type":1,"atoms":[3,8]}]},"monomerTemplate-D___Aspartic acid":{"type":"monomerTemplate","id":"D___Aspartic acid","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Aspartic acid","alias":"D","naturalAnalogShort":"D","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[9]}},{"attachmentAtom":8,"type":"side","leavingGroup":{"atoms":[10]}}],"atoms":[{"label":"C","location":[1.631000,-1.557800,0.000000]},{"label":"O","location":[1.632700,-2.739200,0.000000]},{"label":"C","location":[0.350700,-0.820100,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.929500,-1.557800,0.000000]},{"label":"H","location":[-1.952500,-0.966900,0.000000]},{"label":"C","location":[0.348500,0.657500,0.000000]},{"label":"C","location":[-0.931700,1.395200,0.000000]},{"label":"O","location":[-1.954200,0.803200,0.000000]},{"label":"O","location":[-0.933500,2.576600,0.000000]},{"label":"O","location":[2.653400,-0.965800,0.000000]},{"label":"H","location":[0.085100,3.175100,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":2,"atoms":[6,7]},{"type":1,"atoms":[6,8]},{"type":1,"atoms":[0,9]},{"type":1,"atoms":[8,10]}]},"monomerTemplate-E___Glutamic acid":{"type":"monomerTemplate","id":"E___Glutamic acid","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Glutamic acid","alias":"E","naturalAnalogShort":"E","attachmentPoints":[{"attachmentAtom":4,"type":"left","leavingGroup":{"atoms":[5]}},{"attachmentAtom":1,"type":"right","leavingGroup":{"atoms":[3]}},{"attachmentAtom":10,"type":"side","leavingGroup":{"atoms":[11]}}],"atoms":[{"label":"C","location":[0.344200,-1.477700,0.000000],"stereoLabel":"abs"},{"label":"C","location":[1.624400,-2.215400,0.000000]},{"label":"O","location":[1.626100,-3.396800,0.000000]},{"label":"O","location":[2.646900,-1.623400,0.000000]},{"label":"N","location":[-0.936100,-2.215400,0.000000]},{"label":"H","location":[-1.959100,-1.624500,0.000000]},{"label":"C","location":[0.341900,-0.000100,0.000000]},{"label":"C","location":[-0.938300,0.737500,0.000000]},{"label":"C","location":[-0.940600,2.215100,0.000000]},{"label":"O","location":[-1.964200,2.804900,0.000000]},{"label":"O","location":[0.081900,2.807100,0.000000]},{"label":"H","location":[0.072900,3.988500,0.000000]}],"bonds":[{"type":1,"atoms":[1,0]},{"type":2,"atoms":[1,2]},{"type":1,"atoms":[1,3]},{"type":1,"atoms":[0,4]},{"type":1,"atoms":[4,5]},{"type":1,"atoms":[0,6],"stereo":1},{"type":1,"atoms":[6,7]},{"type":1,"atoms":[7,8]},{"type":2,"atoms":[8,9]},{"type":1,"atoms":[8,10]},{"type":1,"atoms":[10,11]}]},"monomerTemplate-F___Phenylalanine":{"type":"monomerTemplate","id":"F___Phenylalanine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Phenylalanine","alias":"F","naturalAnalogShort":"F","attachmentPoints":[{"attachmentAtom":8,"type":"left","leavingGroup":{"atoms":[12]}},{"attachmentAtom":9,"type":"right","leavingGroup":{"atoms":[11]}}],"atoms":[{"label":"C","location":[-0.205200,2.539800,0.000000]},{"label":"C","location":[-1.506400,3.286000,0.000000]},{"label":"C","location":[-2.803200,2.532200,0.000000]},{"label":"C","location":[-2.798800,1.032200,0.000000]},{"label":"C","location":[-1.497600,0.286100,0.000000]},{"label":"C","location":[-0.200800,1.039800,0.000000]},{"label":"C","location":[1.099500,0.290500,0.000000]},{"label":"C","location":[1.101800,-1.210300,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.198600,-1.959600,0.000000]},{"label":"C","location":[2.402200,-1.959600,0.000000]},{"label":"O","location":[2.404000,-3.159600,0.000000]},{"label":"O","location":[3.440700,-1.358300,0.000000]},{"label":"H","location":[-1.237600,-1.359300,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":2,"atoms":[0,5]},{"type":2,"atoms":[1,2]},{"type":1,"atoms":[2,3]},{"type":2,"atoms":[3,4]},{"type":1,"atoms":[4,5]},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[7,6],"stereo":1},{"type":1,"atoms":[7,8]},{"type":1,"atoms":[7,9]},{"type":2,"atoms":[9,10]},{"type":1,"atoms":[9,11]},{"type":1,"atoms":[8,12]}]},"monomerTemplate-G___Glycine":{"type":"monomerTemplate","id":"G___Glycine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Glycine","alias":"G","naturalAnalogShort":"G","attachmentPoints":[{"attachmentAtom":4,"type":"left","leavingGroup":{"atoms":[5]}},{"attachmentAtom":1,"type":"right","leavingGroup":{"atoms":[3]}}],"atoms":[{"label":"C","location":[-0.336300,0.534600,0.000000]},{"label":"C","location":[0.992900,-0.110700,0.000000]},{"label":"O","location":[1.078200,-1.289000,0.000000]},{"label":"O","location":[1.970900,0.552000,0.000000]},{"label":"N","location":[-1.326000,-0.110700,0.000000]},{"label":"H","location":[-2.379700,0.423800,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":2,"atoms":[1,2]},{"type":1,"atoms":[1,3]},{"type":1,"atoms":[0,4]},{"type":1,"atoms":[4,5]}]},"monomerTemplate-H___Histidine":{"type":"monomerTemplate","id":"H___Histidine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Histidine","alias":"H","naturalAnalogShort":"H","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[11]}},{"attachmentAtom":8,"type":"side","leavingGroup":{"atoms":[12]}}],"atoms":[{"label":"C","location":[1.897800,-1.650800,0.000000]},{"label":"O","location":[1.899300,-2.595700,0.000000]},{"label":"C","location":[0.873900,-1.060900,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.150000,-1.650800,0.000000]},{"label":"H","location":[-0.968300,-1.178200,0.000000]},{"label":"C","location":[0.872000,0.120900,0.000000]},{"label":"C","location":[-0.150100,0.709800,0.000000]},{"label":"C","location":[-0.277100,1.884100,0.000000]},{"label":"N","location":[-1.433000,2.126300,0.000000]},{"label":"C","location":[-2.020500,1.101600,0.000000]},{"label":"N","location":[-1.227700,0.226300,0.000000]},{"label":"O","location":[2.715500,-1.177400,0.000000]},{"label":"H","location":[-2.031700,3.144900,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":2,"atoms":[7,6]},{"type":1,"atoms":[8,7]},{"type":1,"atoms":[9,8]},{"type":1,"atoms":[10,6]},{"type":2,"atoms":[10,9]},{"type":1,"atoms":[0,11]},{"type":1,"atoms":[8,12]}]},"monomerTemplate-I___Isoleucine":{"type":"monomerTemplate","id":"I___Isoleucine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Isoleucine","alias":"I","naturalAnalogShort":"I","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":5,"type":"right","leavingGroup":{"atoms":[7]}}],"atoms":[{"label":"C","location":[-1.255700,1.668100,0.000000]},{"label":"C","location":[0.024500,0.930400,0.000000],"stereoLabel":"abs"},{"label":"C","location":[0.026800,-0.547200,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-1.253600,-1.284900,0.000000]},{"label":"H","location":[-2.276600,-0.694000,0.000000]},{"label":"C","location":[1.306900,-1.284900,0.000000]},{"label":"O","location":[1.308600,-2.466400,0.000000]},{"label":"O","location":[2.329400,-0.693000,0.000000]},{"label":"C","location":[1.047000,1.522300,0.000000]},{"label":"C","location":[-1.257400,2.849500,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":1,"atoms":[2,1],"stereo":1},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5]},{"type":2,"atoms":[5,6]},{"type":1,"atoms":[5,7]},{"type":1,"atoms":[1,8],"stereo":6},{"type":1,"atoms":[0,9]}]},"monomerTemplate-K___Lysine":{"type":"monomerTemplate","id":"K___Lysine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Lysine","alias":"K","naturalAnalogShort":"K","attachmentPoints":[{"attachmentAtom":7,"type":"left","leavingGroup":{"atoms":[10]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[9]}},{"attachmentAtom":6,"type":"side","leavingGroup":{"atoms":[11]}}],"atoms":[{"label":"C","location":[2.147800,-2.487400,0.000000]},{"label":"C","location":[0.847400,-1.738200,0.000000],"stereoLabel":"abs"},{"label":"C","location":[0.845100,-0.237300,0.000000]},{"label":"C","location":[-0.455300,0.511900,0.000000]},{"label":"C","location":[-0.457500,2.012800,0.000000]},{"label":"C","location":[-1.757900,2.761900,0.000000]},{"label":"N","location":[-1.760200,4.262800,0.000000]},{"label":"N","location":[-0.453000,-2.487400,0.000000]},{"label":"O","location":[2.149500,-3.687500,0.000000]},{"label":"O","location":[3.186300,-1.886200,0.000000]},{"label":"H","location":[-1.492100,-1.887300,0.000000]},{"label":"H","location":[-2.800000,4.861900,0.000000]}],"bonds":[{"type":2,"atoms":[8,0]},{"type":1,"atoms":[0,1]},{"type":1,"atoms":[0,9]},{"type":1,"atoms":[1,7]},{"type":1,"atoms":[1,2],"stereo":1},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[4,5]},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[7,10]},{"type":1,"atoms":[6,11]}]},"monomerTemplate-L___Leucine":{"type":"monomerTemplate","id":"L___Leucine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Leucine","alias":"L","naturalAnalogShort":"L","attachmentPoints":[{"attachmentAtom":7,"type":"left","leavingGroup":{"atoms":[9]}},{"attachmentAtom":5,"type":"right","leavingGroup":{"atoms":[8]}}],"atoms":[{"label":"C","location":[0.362600,0.990300,0.000000]},{"label":"C","location":[-0.939500,2.939600,0.000000]},{"label":"C","location":[-0.937700,1.739600,0.000000]},{"label":"C","location":[-1.976300,1.138300,0.000000]},{"label":"C","location":[0.364900,-0.510500,0.000000],"stereoLabel":"abs"},{"label":"C","location":[1.665300,-1.259800,0.000000]},{"label":"O","location":[1.667100,-2.459800,0.000000]},{"label":"N","location":[-0.935500,-1.259800,0.000000]},{"label":"O","location":[2.703800,-0.658500,0.000000]},{"label":"H","location":[-1.974600,-0.659600,0.000000]}],"bonds":[{"type":1,"atoms":[2,0]},{"type":1,"atoms":[4,0],"stereo":1},{"type":1,"atoms":[2,1]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[4,7]},{"type":1,"atoms":[4,5]},{"type":2,"atoms":[5,6]},{"type":1,"atoms":[5,8]},{"type":1,"atoms":[7,9]}]},"monomerTemplate-M___Methionine":{"type":"monomerTemplate","id":"M___Methionine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Methionine","alias":"M","naturalAnalogShort":"M","attachmentPoints":[{"attachmentAtom":1,"type":"left","leavingGroup":{"atoms":[9]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[8]}}],"atoms":[{"label":"C","location":[1.665700,-1.560000,0.000000]},{"label":"N","location":[-0.935100,-1.560000,0.000000]},{"label":"O","location":[1.667500,-2.760000,0.000000]},{"label":"C","location":[0.365300,-0.810700,0.000000],"stereoLabel":"abs"},{"label":"C","location":[0.363000,0.690100,0.000000]},{"label":"C","location":[-0.937300,1.439400,0.000000]},{"label":"C","location":[-1.979400,3.539300,0.000000]},{"label":"S","location":[-0.939600,2.940200,0.000000]},{"label":"O","location":[2.704200,-0.958700,0.000000]},{"label":"H","location":[-1.974200,-0.959800,0.000000]}],"bonds":[{"type":2,"atoms":[2,0]},{"type":1,"atoms":[0,3]},{"type":1,"atoms":[0,8]},{"type":1,"atoms":[3,1]},{"type":1,"atoms":[3,4],"stereo":1},{"type":1,"atoms":[4,5]},{"type":1,"atoms":[5,7]},{"type":1,"atoms":[7,6]},{"type":1,"atoms":[1,9]}]},"monomerTemplate-N___Asparagine":{"type":"monomerTemplate","id":"N___Asparagine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Asparagine","alias":"N","naturalAnalogShort":"N","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[9]}},{"attachmentAtom":7,"type":"side","leavingGroup":{"atoms":[10]}}],"atoms":[{"label":"C","location":[1.892900,-1.417500,0.000000]},{"label":"O","location":[1.894700,-2.598900,0.000000]},{"label":"C","location":[0.612700,-0.679900,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.667600,-1.417500,0.000000]},{"label":"H","location":[-1.690700,-0.826600,0.000000]},{"label":"C","location":[0.610400,0.797800,0.000000]},{"label":"C","location":[-0.669800,1.535400,0.000000]},{"label":"N","location":[-1.692200,0.943400,0.000000]},{"label":"O","location":[-0.671600,2.716800,0.000000]},{"label":"O","location":[2.915300,-0.825500,0.000000]},{"label":"H","location":[-2.534100,1.772400,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[6,7]},{"type":2,"atoms":[6,8]},{"type":1,"atoms":[0,9]},{"type":1,"atoms":[7,10]}]},"monomerTemplate-O___Pyrrolysine":{"type":"monomerTemplate","id":"O___Pyrrolysine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Pyrrolysine","alias":"O","naturalAnalogShort":"O","attachmentPoints":[{"attachmentAtom":1,"type":"left","leavingGroup":{"atoms":[0]}},{"attachmentAtom":3,"type":"right","leavingGroup":{"atoms":[4]}}],"atoms":[{"label":"H","location":[-2.048700,-3.860000,0.000000]},{"label":"N","location":[-1.025600,-4.450800,0.000000]},{"label":"C","location":[-0.002400,-3.860000,0.000000],"stereoLabel":"abs"},{"label":"C","location":[1.020800,-4.450800,0.000000]},{"label":"O","location":[2.043900,-3.860000,0.000000]},{"label":"O","location":[1.020800,-5.632200,0.000000]},{"label":"C","location":[-0.002400,-2.678600,0.000000]},{"label":"C","location":[0.588300,-1.655400,0.000000]},{"label":"C","location":[-0.002400,-0.632200,0.000000]},{"label":"C","location":[0.588300,0.390900,0.000000]},{"label":"N","location":[-0.002400,1.414100,0.000000]},{"label":"C","location":[0.588300,2.437300,0.000000]},{"label":"C","location":[-0.002400,3.460400,0.000000],"stereoLabel":"abs"},{"label":"O","location":[1.769800,2.437300,0.000000]},{"label":"C","location":[-1.176800,3.583900,0.000000]},{"label":"C","location":[-1.422300,4.739000,0.000000]},{"label":"C","location":[-0.399700,5.329400,0.000000]},{"label":"N","location":[0.477900,4.539200,0.000000]},{"label":"C","location":[-2.012200,2.748400,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":1,"atoms":[1,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":2,"atoms":[3,5]},{"type":1,"atoms":[2,6],"stereo":1},{"type":1,"atoms":[6,7]},{"type":1,"atoms":[7,8]},{"type":1,"atoms":[8,9]},{"type":1,"atoms":[9,10]},{"type":1,"atoms":[10,11]},{"type":1,"atoms":[11,12]},{"type":2,"atoms":[11,13]},{"type":2,"atoms":[16,17]},{"type":1,"atoms":[15,16]},{"type":1,"atoms":[14,15]},{"type":1,"atoms":[12,14],"stereo":1},{"type":1,"atoms":[17,12]},{"type":1,"atoms":[14,18]}]},"monomerTemplate-P___Proline":{"type":"monomerTemplate","id":"P___Proline","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Proline","alias":"P","naturalAnalogShort":"P","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[8]}},{"attachmentAtom":5,"type":"right","leavingGroup":{"atoms":[7]}}],"atoms":[{"label":"C","location":[0.001800,1.655500,0.000000]},{"label":"C","location":[-1.479900,1.889000,0.000000]},{"label":"C","location":[-2.159900,0.551900,0.000000]},{"label":"N","location":[-1.098400,-0.507900,0.000000]},{"label":"C","location":[0.237600,0.174100,0.000000],"stereoLabel":"abs"},{"label":"C","location":[1.571700,-0.507900,0.000000]},{"label":"O","location":[1.633600,-1.706300,0.000000]},{"label":"O","location":[2.578700,0.144800,0.000000]},{"label":"H","location":[-1.285200,-1.693300,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":1,"atoms":[4,0],"stereo":1},{"type":1,"atoms":[1,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[4,5]},{"type":2,"atoms":[5,6]},{"type":1,"atoms":[5,7]},{"type":1,"atoms":[3,8]}]},"monomerTemplate-Q___Glutamine":{"type":"monomerTemplate","id":"Q___Glutamine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Glutamine","alias":"Q","naturalAnalogShort":"Q","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[10]}},{"attachmentAtom":8,"type":"side","leavingGroup":{"atoms":[11]}}],"atoms":[{"label":"C","location":[1.623700,-2.215400,0.000000]},{"label":"O","location":[1.625400,-3.396900,0.000000]},{"label":"C","location":[0.343500,-1.477700,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.936800,-2.215400,0.000000]},{"label":"H","location":[-1.959800,-1.624500,0.000000]},{"label":"C","location":[0.341300,-0.000100,0.000000]},{"label":"C","location":[-0.938900,0.737600,0.000000]},{"label":"C","location":[-0.941100,2.215200,0.000000]},{"label":"N","location":[0.081300,2.807100,0.000000]},{"label":"O","location":[-1.964800,2.805000,0.000000]},{"label":"O","location":[2.646200,-1.623500,0.000000]},{"label":"H","location":[0.079900,3.988500,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[6,7]},{"type":1,"atoms":[7,8]},{"type":2,"atoms":[7,9]},{"type":1,"atoms":[0,10]},{"type":1,"atoms":[8,11]}]},"monomerTemplate-R___Arginine":{"type":"monomerTemplate","id":"R___Arginine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Arginine","alias":"R","naturalAnalogShort":"R","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[12]}},{"attachmentAtom":10,"type":"side","leavingGroup":{"atoms":[13]}}],"atoms":[{"label":"C","location":[1.771800,-2.589100,0.000000]},{"label":"O","location":[1.773200,-3.533700,0.000000]},{"label":"C","location":[0.748300,-1.999400,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-0.275200,-2.589100,0.000000]},{"label":"H","location":[-1.093200,-2.116800,0.000000]},{"label":"C","location":[0.746400,-0.818200,0.000000]},{"label":"C","location":[-0.277100,-0.228400,0.000000]},{"label":"C","location":[-0.278900,0.952900,0.000000]},{"label":"N","location":[-1.302400,1.542600,0.000000]},{"label":"C","location":[-1.304200,2.723800,0.000000]},{"label":"N","location":[-0.486800,3.197100,0.000000]},{"label":"N","location":[-2.122700,3.195500,0.000000]},{"label":"O","location":[2.589200,-2.115900,0.000000]},{"label":"H","location":[-0.488300,4.378600,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[6,7]},{"type":1,"atoms":[7,8]},{"type":1,"atoms":[8,9]},{"type":1,"atoms":[9,10]},{"type":2,"atoms":[9,11]},{"type":1,"atoms":[0,12]},{"type":1,"atoms":[10,13]}]},"monomerTemplate-S___Serine":{"type":"monomerTemplate","id":"S___Serine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Serine","alias":"S","naturalAnalogShort":"S","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[7]}},{"attachmentAtom":6,"type":"side","leavingGroup":{"atoms":[8]}}],"atoms":[{"label":"C","location":[1.367100,-1.082900,0.000000]},{"label":"O","location":[1.368900,-2.264300,0.000000]},{"label":"C","location":[0.086900,-0.345200,0.000000],"stereoLabel":"abs"},{"label":"N","location":[-1.193400,-1.082900,0.000000]},{"label":"H","location":[-2.216500,-0.492000,0.000000]},{"label":"C","location":[0.084700,1.132400,0.000000]},{"label":"O","location":[-0.939100,1.722200,0.000000]},{"label":"O","location":[2.389600,-0.490900,0.000000]},{"label":"H","location":[-0.948100,2.903600,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[0,7]},{"type":1,"atoms":[6,8]}]},"monomerTemplate-U___Selenocysteine":{"type":"monomerTemplate","id":"U___Selenocysteine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Selenocysteine","alias":"U","naturalAnalogShort":"U","attachmentPoints":[{"attachmentAtom":0,"type":"left","leavingGroup":{"atoms":[5]}},{"attachmentAtom":2,"type":"right","leavingGroup":{"atoms":[3]}},{"attachmentAtom":7,"type":"side","leavingGroup":{"atoms":[8]}}],"atoms":[{"label":"N","location":[14.558974,-10.200000,0.000000]},{"label":"C","location":[15.425000,-9.700000,0.000000],"stereoLabel":"abs"},{"label":"C","location":[16.291025,-10.200000,0.000000]},{"label":"O","location":[17.157051,-9.700000,0.000000]},{"label":"O","location":[16.291025,-11.200000,0.000000]},{"label":"H","location":[13.692949,-9.700000,0.000000]},{"label":"C","location":[15.425000,-8.700000,0.000000]},{"label":"Se","location":[14.558974,-8.200000,0.000000]},{"label":"H","location":[14.558974,-7.200000,0.000000]}],"bonds":[{"type":1,"atoms":[0,1]},{"type":1,"atoms":[1,2]},{"type":1,"atoms":[2,3]},{"type":2,"atoms":[2,4]},{"type":1,"atoms":[0,5]},{"type":1,"atoms":[1,6],"stereo":1},{"type":1,"atoms":[6,7]},{"type":1,"atoms":[7,8]}]},"monomerTemplate-V___Valine":{"type":"monomerTemplate","id":"V___Valine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Valine","alias":"V","naturalAnalogShort":"V","attachmentPoints":[{"attachmentAtom":6,"type":"left","leavingGroup":{"atoms":[8]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[7]}}],"atoms":[{"label":"C","location":[1.154300,-0.967500,0.000000]},{"label":"C","location":[-0.144600,-0.215600,0.000000],"stereoLabel":"abs"},{"label":"C","location":[-1.182300,1.886500,0.000000]},{"label":"C","location":[-0.143800,1.285300,0.000000]},{"label":"C","location":[0.896000,1.884300,0.000000]},{"label":"O","location":[1.153600,-2.167600,0.000000]},{"label":"N","location":[-1.443500,-0.967500,0.000000]},{"label":"O","location":[2.194100,-0.368500,0.000000]},{"label":"H","location":[-2.483800,-0.369500,0.000000]}],"bonds":[{"type":2,"atoms":[5,0]},{"type":1,"atoms":[0,1]},{"type":1,"atoms":[0,7]},{"type":1,"atoms":[1,6]},{"type":1,"atoms":[1,3],"stereo":1},{"type":1,"atoms":[3,2]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[6,8]}]},"monomerTemplate-W___Tryptophan":{"type":"monomerTemplate","id":"W___Tryptophan","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Tryptophan","alias":"W","naturalAnalogShort":"W","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[15]}},{"attachmentAtom":8,"type":"side","leavingGroup":{"atoms":[16]}}],"atoms":[{"label":"C","location":[2.093800,-2.355100,0.000000]},{"label":"O","location":[2.095200,-3.300000,0.000000]},{"label":"C","location":[1.069800,-1.765200,0.000000],"stereoLabel":"abs"},{"label":"N","location":[0.045900,-2.355100,0.000000]},{"label":"H","location":[-0.772300,-1.882600,0.000000]},{"label":"C","location":[1.068000,-0.583500,0.000000]},{"label":"C","location":[0.045800,0.005500,0.000000]},{"label":"C","location":[-1.031900,-0.477900,0.000000]},{"label":"N","location":[-1.824600,0.397800,0.000000]},{"label":"C","location":[-1.237000,1.421600,0.000000]},{"label":"C","location":[-0.081000,1.179300,0.000000]},{"label":"C","location":[0.706800,2.059100,0.000000]},{"label":"C","location":[0.338700,3.181400,0.000000]},{"label":"C","location":[-0.817300,3.423800,0.000000]},{"label":"C","location":[-1.605100,2.543800,0.000000]},{"label":"O","location":[2.911400,-1.881800,0.000000]},{"label":"H","location":[-3.006100,0.388700,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":2,"atoms":[7,6]},{"type":1,"atoms":[8,7]},{"type":1,"atoms":[9,8]},{"type":1,"atoms":[10,6]},{"type":2,"atoms":[10,9]},{"type":1,"atoms":[10,11]},{"type":2,"atoms":[11,12]},{"type":1,"atoms":[12,13]},{"type":1,"atoms":[14,9]},{"type":2,"atoms":[13,14]},{"type":1,"atoms":[0,15]},{"type":1,"atoms":[8,16]}]},"monomerTemplate-Y___Tyrosine":{"type":"monomerTemplate","id":"Y___Tyrosine","class":"AminoAcid","classHELM":"PEPTIDE","fullName":"Tyrosine","alias":"Y","naturalAnalogShort":"Y","attachmentPoints":[{"attachmentAtom":3,"type":"left","leavingGroup":{"atoms":[4]}},{"attachmentAtom":0,"type":"right","leavingGroup":{"atoms":[13]}},{"attachmentAtom":12,"type":"side","leavingGroup":{"atoms":[14]}}],"atoms":[{"label":"C","location":[2.295700,-1.950200,0.000000]},{"label":"O","location":[2.297200,-2.895100,0.000000]},{"label":"C","location":[1.271800,-1.360200,0.000000],"stereoLabel":"abs"},{"label":"N","location":[0.247900,-1.950200,0.000000]},{"label":"H","location":[-0.570300,-1.477600,0.000000]},{"label":"C","location":[1.270100,-0.178500,0.000000]},{"label":"C","location":[0.246100,0.411400,0.000000]},{"label":"C","location":[0.242600,1.592500,0.000000]},{"label":"C","location":[-0.782000,2.180100,0.000000]},{"label":"C","location":[-1.803100,1.586600,0.000000]},{"label":"C","location":[-1.799600,0.405500,0.000000]},{"label":"C","location":[-0.775100,-0.182000,0.000000]},{"label":"O","location":[-2.622800,2.056600,0.000000]},{"label":"O","location":[3.113400,-1.476800,0.000000]},{"label":"H","location":[-2.631900,3.238100,0.000000]}],"bonds":[{"type":2,"atoms":[1,0]},{"type":1,"atoms":[0,2]},{"type":1,"atoms":[2,3]},{"type":1,"atoms":[3,4]},{"type":1,"atoms":[2,5],"stereo":1},{"type":1,"atoms":[5,6]},{"type":1,"atoms":[7,6]},{"type":2,"atoms":[8,7]},{"type":1,"atoms":[9,8]},{"type":2,"atoms":[10,9]},{"type":2,"atoms":[11,6]},{"type":1,"atoms":[11,10]},{"type":1,"atoms":[9,12]},{"type":1,"atoms":[0,13]},{"type":1,"atoms":[12,14]}]}} \ No newline at end of file diff --git a/api/wasm/indigo-ketcher/test/test.js b/api/wasm/indigo-ketcher/test/test.js index d081103833..1129204c0d 100644 --- a/api/wasm/indigo-ketcher/test/test.js +++ b/api/wasm/indigo-ketcher/test/test.js @@ -480,8 +480,8 @@ M END var fs = require('fs'); const cdx_data = fs.readFileSync("test64.cdx"); const ket = indigo.convert(cdx_data, "ket", options); - const ket_data = indigo.convert(fs.readFileSync("test64.ket"), "ket", options); - fs.writeFileSync("test64a.ket", ket); + const ket_data = fs.readFileSync("test64.ket").toString(); + fs.writeFileSync("test64a1.ket", ket_data); assert.equal(ket, ket_data); options.delete(); }); @@ -839,6 +839,28 @@ M END }); } + { + test("PEPTIDE-3-LETTER", "basic", () => { + var fs = require('fs'); + let options = new indigo.MapStringString(); + const monomersLib = fs.readFileSync("monomer_library.ket"); + options.set("monomerLibrary", monomersLib); + options.set("output-content-type", "application/json"); + options.set("input-format", "chemical/x-peptide-sequence-3-letter"); + const peptide_seq_ref = "AlaCysAspGluPheGlyHisIleLysLeuMetAsnPylProGlnArgSerArgSecValTrpTyr"; + const peptide_ket = JSON.parse(indigo.convert(peptide_seq_ref, "ket", options)).struct; + // fs.writeFileSync("peptide_ref_3_letter.ket", peptide_ket); + const peptide_ket_ref = fs.readFileSync("peptide_ref_3_letter.ket"); + assert.equal(peptide_ket, peptide_ket_ref.toString()); + + options.set("input-format", "application/json"); + 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.delete(); + }); + } + { test("RNA", "basic", () => { var fs = require('fs'); diff --git a/utils/indigo-service/backend/service/tests/api/indigo_test.py b/utils/indigo-service/backend/service/tests/api/indigo_test.py index c83306605b..78c5d709af 100644 --- a/utils/indigo-service/backend/service/tests/api/indigo_test.py +++ b/utils/indigo-service/backend/service/tests/api/indigo_test.py @@ -478,8 +478,9 @@ def test_headers_wrong(self): chemical/x-daylight-smiles, chemical/x-cml, chemical/x-inchi, chemical/x-inchi-key, \ chemical/x-iupac, chemical/x-daylight-smarts, chemical/x-inchi-aux, chemical/x-chemaxon-cxsmiles, \ chemical/x-cdxml, chemical/x-cdx, chemical/x-sdf, chemical/x-rdf, chemical/x-peptide-sequence, \ -chemical/x-rna-sequence, chemical/x-dna-sequence, chemical/x-sequence, chemical/x-peptide-fasta, \ -chemical/x-rna-fasta, chemical/x-dna-fasta, chemical/x-fasta, chemical/x-idt, chemical/x-helm." +chemical/x-peptide-sequence-3-letter, chemical/x-rna-sequence, chemical/x-dna-sequence, chemical/x-sequence, \ +chemical/x-peptide-fasta, chemical/x-rna-fasta, chemical/x-dna-fasta, chemical/x-fasta, \ +chemical/x-idt, chemical/x-helm." expected_text = ( "ValidationError: {'input_format': ['Must be one of: %s']}" % formats @@ -3277,6 +3278,33 @@ def test_convert_sequences(self): self.url_prefix + "/convert", headers=headers, data=data ) + peptide_3 = "AlaCysGlyThrSec" + headers, data = self.get_headers( + { + "struct": peptide_3, + "options": {"monomerLibrary": monomer_library}, + "input_format": "chemical/x-peptide-sequence-3-letter", + "output_format": "chemical/x-indigo-ket", + } + ) + result_ket_3 = requests.post( + self.url_prefix + "/convert", headers=headers, data=data + ) + + headers, data = self.get_headers( + { + "struct": json.loads(result_ket_3.text)["struct"], + "options": {"monomerLibrary": monomer_library}, + "output_format": "chemical/x-peptide-sequence-3-letter", + } + ) + result_peptide_3 = requests.post( + self.url_prefix + "/convert", headers=headers, data=data + ) + self.assertEqual( + json.loads(result_peptide_3.text)["struct"], peptide_3 + ) + headers, data = self.get_headers( { "struct": "ACDEFGHIKLMNOPQRSRUVWY", @@ -3314,6 +3342,7 @@ def test_convert_sequences(self): with open(os.path.join(ref_path, "peptide_ref") + ".ket", "r") as file: peptide_ref = file.read() self.assertEqual(result_peptide.text, peptide_ref) + self.assertEqual(result_ket_3.text, peptide_ref) def test_convert_fasta(self): ref_path = joinPathPy("ref/", __file__) diff --git a/utils/indigo-service/backend/service/v2/indigo_api.py b/utils/indigo-service/backend/service/v2/indigo_api.py index 5f04829426..2cd89f7585 100644 --- a/utils/indigo-service/backend/service/v2/indigo_api.py +++ b/utils/indigo-service/backend/service/v2/indigo_api.py @@ -335,6 +335,10 @@ def load_moldata( md.struct = indigo.loadSequence(molstr, "PEPTIDE", library) md.is_rxn = False md.is_query = False + elif input_format == "chemical/x-peptide-sequence-3-letter": + md.struct = indigo.loadSequence(molstr, "PEPTIDE-3-LETTER", library) + md.is_rxn = False + md.is_query = False elif input_format == "chemical/x-rna-sequence": md.struct = indigo.loadSequence(molstr, "RNA", library) md.is_rxn = False @@ -431,6 +435,8 @@ def save_moldata( return md.struct.json() elif output_format == "chemical/x-sequence": return md.struct.sequence(library) + elif output_format == "chemical/x-peptide-sequence-3-letter": + return md.struct.sequence3Letter(library) elif output_format == "chemical/x-fasta": return md.struct.fasta(library) elif output_format == "chemical/x-idt": @@ -928,6 +934,7 @@ def convert(): "chemical/x-fasta", "chemical/x-idt", "chemical/x-helm", + "chemical/x-peptide-sequence-3-letter", ): try_document = True diff --git a/utils/indigo-service/backend/service/v2/validation.py b/utils/indigo-service/backend/service/v2/validation.py index 6f88115f89..ef8b2d27e4 100644 --- a/utils/indigo-service/backend/service/v2/validation.py +++ b/utils/indigo-service/backend/service/v2/validation.py @@ -26,6 +26,7 @@ class InputFormatSchema(Schema): "chemical/x-sdf", "chemical/x-rdf", "chemical/x-peptide-sequence", + "chemical/x-peptide-sequence-3-letter", "chemical/x-rna-sequence", "chemical/x-dna-sequence", "chemical/x-sequence",