Skip to content

Commit

Permalink
clean up mmcif for yasara
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Jan 28, 2025
1 parent b9959cf commit a799c97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ void stripCifFile(const std::string &af_id, std::set<std::string> 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<std::string,std::string>("ptnr1_label_asym_id", "ptnr2_label_asym_id"))
{
existingAsyms.insert(asym_id_1);
existingAsyms.insert(asym_id_2);
}

std::vector<std::string> toBeRemoved;
std::set_difference(existingAsyms.begin(), existingAsyms.end(), requestedAsyms.begin(), requestedAsyms.end(), std::back_insert_iterator(toBeRemoved));

Expand Down
2 changes: 1 addition & 1 deletion webapp/optimized.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }]);
});

Expand Down

0 comments on commit a799c97

Please sign in to comment.