Skip to content

Commit 0a5af34

Browse files
committed
RO-4624: make motifs work without assembly info
1 parent 30dd657 commit 0a5af34

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
[Semantic Versioning](https://semver.org/)
44

5+
## [2.11.3] - 2025-04-04
6+
### General
7+
- Better handling for motifs in assembly-less entries (RO-4624)
8+
9+
## [2.11.2] - 2025-04-02
10+
### General
11+
- Dependency updates
12+
- React 19 support
13+
514
## [2.11.2] - 2025-01-27
615
### General
716
- Dependency updates (RO-4535: PDB-IHM rebranding)

src/viewer/helpers/preset.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,10 @@ function determineAssemblyId(traj: any, p: MotifProps) {
419419
} catch (error) {
420420
console.warn(error);
421421
}
422-
// default to '1' if error or legitimately not found
423-
console.warn(`Could not auto-detect assembly-of-interest. Falling back to '1'`);
424-
Object.assign(p, { assemblyId: '1' });
422+
// default to model coordinates if error or legitimately not found
423+
console.warn(`Could not auto-detect assembly-of-interest. Defaulting to model coordinates and dropping "structOperId" values`);
424+
Object.assign(p, { assemblyId: undefined });
425+
Object.assign(p, { targets: p.targets.map(({ structOperId, ...rest }) => rest) });
425426
}
426427

427428
async function initVolumeStreaming(plugin: PluginContext, structure: StructureObject, props?: { overrideRadius?: number, hiddenChannels: string[], wireframe?: boolean }) {

src/viewer/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,22 @@ <h2> RCSB PDB Mol* Viewer - Test Page</h2>
620620
}
621621
}
622622
},
623+
{
624+
id: '9A8B',
625+
info: 'motif + IHM: Dipeptide repeat designed model, 4x DPR2, verified with CD and NMR data',
626+
config: {
627+
props: {
628+
kind: 'motif',
629+
label: '9A8B',
630+
targets: [
631+
{ labelAsymId: 'A', structOperId: '1', labelSeqId: 3 },
632+
{ labelAsymId: 'A', structOperId: '1', labelSeqId: 5 },
633+
{ labelAsymId: 'A', structOperId: '1', labelSeqId: 7 },
634+
{ labelAsymId: 'A', structOperId: '1', labelSeqId: 9 },
635+
],
636+
}
637+
}
638+
},
623639
{
624640
id: 'AF-Q8W3K0-F1',
625641
url: 'https://alphafold.ebi.ac.uk/files/AF-Q8W3K0-F1-model_v4.cif',

0 commit comments

Comments
 (0)