From 8cabf4a05fa7ebe42893a5832e3b3445f6bebc9e Mon Sep 17 00:00:00 2001 From: Sebastian Bittrich Date: Wed, 23 Aug 2023 10:19:28 -0700 Subject: [PATCH] noise-- --- src/viewer/helpers/model.ts | 5 ++++- src/viewer/helpers/preset.ts | 9 ++++----- src/viewer/helpers/selection.ts | 7 ------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/viewer/helpers/model.ts b/src/viewer/helpers/model.ts index d19bef4..dc7a853 100644 --- a/src/viewer/helpers/model.ts +++ b/src/viewer/helpers/model.ts @@ -23,7 +23,9 @@ export class ModelLoader { ? (await this.plugin.builders.data.readFile({ file: Asset.File(fileOrUrl), isBinary, label: props?.dataLabel })).data : await this.plugin.builders.data.download({ url: fileOrUrl, isBinary, label: props?.dataLabel }); - return await this.handleTrajectory(data, format, props, matrix, reprProvider, params) as any; + const hierarchy = await this.handleTrajectory(data, format, props, matrix, reprProvider, params) as any; + + return hierarchy; } async parse

(parse: ParseParams, props?: PresetProps & { dataLabel?: string }, matrix?: Mat4, reprProvider?: TrajectoryHierarchyPresetProvider, params?: P) { @@ -71,6 +73,7 @@ export class ModelLoader { return selector; } + } constructor(private plugin: PluginContext) { diff --git a/src/viewer/helpers/preset.ts b/src/viewer/helpers/preset.ts index 84c0abd..254660a 100644 --- a/src/viewer/helpers/preset.ts +++ b/src/viewer/helpers/preset.ts @@ -72,8 +72,8 @@ export type EmptyProps = { } & BaseProps type ValidationProps = { - kind: 'validation', - colorTheme?: string, + kind: 'validation' + colorTheme?: string showClashes?: boolean } & BaseProps @@ -82,14 +82,13 @@ type StandardProps = { } & BaseProps type SymmetryProps = { - kind: 'symmetry', + kind: 'symmetry' symmetryIndex?: number } & BaseProps type FeatureProps = { kind: 'feature', - target: Target, - alpha: number + target: Target } & BaseProps type DensityProps = { diff --git a/src/viewer/helpers/selection.ts b/src/viewer/helpers/selection.ts index cdf755f..4977a90 100644 --- a/src/viewer/helpers/selection.ts +++ b/src/viewer/helpers/selection.ts @@ -203,13 +203,6 @@ export function rangeToTest(asymId: string, residues: number[], operatorName?: s } } -export function targetsToLoci(targets: Target[], structure: Structure): StructureElement.Loci { - const expression = targetsToExpression(targets); - const query = compile(expression); - const selection = query(new QueryContext(structure)); - return StructureSelection.toLociWithSourceUnits(selection); -} - export function targetToLoci(target: Target, structure: Structure): StructureElement.Loci { const expression = targetToExpression(target); const query = compile(expression);