diff --git a/src/structure.cpp b/src/structure.cpp index a2bc652..8820e42 100644 --- a/src/structure.cpp +++ b/src/structure.cpp @@ -115,6 +115,13 @@ void stripCifFile(const std::string &af_id, std::set requestedAsyms existingAsyms.insert(asymID); } + // For some reason, some filled structures contain spurrious struct_conn records... + for (const auto &[asym_id_1, asym_id_2] : struct_conn.rows("ptnr1_label_asym_id", "ptnr2_label_asym_id")) + { + existingAsyms.insert(asym_id_1); + existingAsyms.insert(asym_id_2); + } + std::vector toBeRemoved; std::set_difference(existingAsyms.begin(), existingAsyms.end(), requestedAsyms.begin(), requestedAsyms.end(), std::back_insert_iterator(toBeRemoved)); diff --git a/webapp/optimized.js b/webapp/optimized.js index fc7a895..ffd8574 100644 --- a/webapp/optimized.js +++ b/webapp/optimized.js @@ -18,7 +18,7 @@ window.addEventListener('load', async () => { const molstarContainer = document.getElementById("app"); const viewer = new PDBeMolstarPlugin(); - viewer.events.loadComplete.subscribe(async () => { + viewer.events.loadComplete.subscribe(() => { viewer.visual.focus([{ struct_asym_id: ASYM_ID }]); });