|
@@ -47,9 +47,9 @@ type Target = {
|
|
|
readonly label_asym_id?: string
|
|
|
}
|
|
|
|
|
|
-function targetToExpression(target: Target): Expression {
|
|
|
+function targetToTest(target: Target) {
|
|
|
const residueTests: Expression[] = [];
|
|
|
- const tests = Object.create(null);
|
|
|
+ const tests: { 'residue-test': Expression, 'chain-test': Expression } = Object.create(null);
|
|
|
|
|
|
if (target.auth_seq_id) {
|
|
|
residueTests.push(MS.core.rel.eq([target.auth_seq_id, MS.ammp('auth_seq_id')]));
|
|
@@ -68,7 +68,11 @@ function targetToExpression(target: Target): Expression {
|
|
|
if (target.label_asym_id) {
|
|
|
tests['chain-test'] = MS.core.rel.eq([target.label_asym_id, MS.ammp('label_asym_id')]);
|
|
|
}
|
|
|
+ return tests;
|
|
|
+}
|
|
|
|
|
|
+function targetToExpression(target: Target): Expression {
|
|
|
+ const tests = targetToTest(target);
|
|
|
if (Object.keys(tests).length > 0) {
|
|
|
return MS.struct.modifier.union([
|
|
|
MS.struct.generator.atomGroups(tests)
|
|
@@ -321,7 +325,27 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
|
|
|
} else if (p.kind === 'membrane') {
|
|
|
representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, MembraneOrientationPreset);
|
|
|
} else if (p.kind === 'motif') {
|
|
|
-
|
|
|
+ await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto', { isHidden: true });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
representation = await plugin.builders.structure.representation.applyPreset(structureProperties!, 'auto');
|
|
|
}
|
|
@@ -471,3 +495,45 @@ const labelFromProps = (entryId: string, range: Range) => {
|
|
|
(residues && residues.length > 1 ? `-${residues[residues.length - 1]}` : '');
|
|
|
return label;
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|