From c02dfad20098ad666f06e2799a933afafb474f53 Mon Sep 17 00:00:00 2001 From: Cameron Gilchrist Date: Mon, 2 Sep 2024 16:42:03 +0900 Subject: [PATCH] query stage for structure components when making PDB --- frontend/StructureViewerMSA.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/StructureViewerMSA.vue b/frontend/StructureViewerMSA.vue index 652c461..db283cd 100644 --- a/frontend/StructureViewerMSA.vue +++ b/frontend/StructureViewerMSA.vue @@ -128,22 +128,24 @@ export default { let result = `\ TITLE Superposed structures from Foldmason alignment REMARK This file was generated by the FoldMason webserver: -REMARK https://mason.foldseek.com +REMARK https://search.foldseek.com/foldmason REMARK Please cite: -REMARK +REMARK https://doi.org/10.1101/2024.08.01.606130 REMARK Warning: Non C-alpha atoms may have been re-generated by PULCHRA REMARK if they are not present in the original PDB file. `; - this.structures.forEach((structure, index) => { - PDB = new PdbWriter(structure.structure.structure, { renumberSerial: false }).getData(); + this.stage.eachComponent(comp => { + PDB = new PdbWriter(comp.structure, { renumberSerial: false }).getData(); PDB = PDB.split('\n').filter(line => line.startsWith("ATOM")).join('\n'); + let index = parseInt(comp.structure.name.replace("key-", "")); + let name = this.entries[index].name; result += `\ MODEL ${index} -REMARK Name: ${structure.name} +REMARK Name: ${name} ${PDB} ENDMDL `; - }); + }, "structure") result += "END"; download(new Blob([result], { type: 'text/plain' }), "foldmason.pdb") },