Skip to content
Snippets Groups Projects
Commit ce2544b9 authored by Alexander Rose's avatar Alexander Rose
Browse files

add model-archive viewer helpers

parent 1964de1e
No related branches found
No related tags found
No related merge requests found
......@@ -10,8 +10,11 @@ Note that since we don't clearly distinguish between a public and private interf
- Fix flickering during marking with camera at rest
- Enable ``aromaticBonds`` in structure representations by default
- Add ``PluginConfig.Structure.DefaultRepresentationPreset``
- Add ModelArchive schema extensions (e.g., AlphaFold uses it for the pLDDT score)
- Add ModelArchive option in DownloadStructure action
- Add ModelArchive support
- schema extensions (e.g., AlphaFold uses it for the pLDDT score)
- ModelArchive option in DownloadStructure action
- ``model-archive`` GET parameter for Viewer app
- ``Viewer.loadModelArchive`` method
- Improve support for loading AlphaFold structures
- Automatic coloring by pLDDT
- AlphaFold DB option in DownloadStructure action
......
......@@ -93,6 +93,9 @@
var afdb = getParam('afdb', '[^&]+').trim();
if (afdb) viewer.loadAfdb(afdb);
var modelArchive = getParam('model-archive', '[^&]+').trim();
if (modelArchive) viewer.loadModelArchive(modelArchive);
</script>
<!-- __MOLSTAR_ANALYTICS__ -->
</body>
......
......@@ -274,6 +274,19 @@ export class Viewer {
}));
}
loadModelArchive(id: string) {
const params = DownloadStructure.createDefaultParams(this.plugin.state.data.root.obj!, this.plugin);
return this.plugin.runTask(this.plugin.state.data.applyAction(DownloadStructure, {
source: {
name: 'modelarchive' as const,
params: {
id,
options: params.source.params.options,
}
}
}));
}
/**
* @example Load X-ray density from volume server
viewer.loadVolumeFromUrl({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment