bioinsilico пре 2 година
родитељ
комит
98742504df

+ 16 - 16
package-lock.json

@@ -11,8 +11,8 @@
       "dependencies": {
         "@rcsb/rcsb-api-tools": "^4.1.0-models.1",
         "@rcsb/rcsb-molstar": "^2.5.5",
-        "@rcsb/rcsb-saguaro": "^2.2.2",
-        "@rcsb/rcsb-saguaro-app": "^4.4.0-models.38",
+        "@rcsb/rcsb-saguaro": "^2.2.6",
+        "@rcsb/rcsb-saguaro-app": "^4.4.0-models.42",
         "molstar": "^3.13.0"
       },
       "devDependencies": {
@@ -2490,9 +2490,9 @@
       }
     },
     "node_modules/@rcsb/rcsb-saguaro": {
-      "version": "2.2.2",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro/-/rcsb-saguaro-2.2.2.tgz",
-      "integrity": "sha512-Z+a1HkbcxnwbTZ5Hyh4zSerkbeS3MXb7cz7CDEEV07I/Rzvsi+8V5QkHVwOTYxoUVmfhq+tJbXdX0J4ilBKqTg==",
+      "version": "2.2.6",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro/-/rcsb-saguaro-2.2.6.tgz",
+      "integrity": "sha512-gigsdjNR4Nnwisd1KRugV6U67swLrdSXnkzHRtXqmdRhuQk6ZpkTMxoKPk53VloF9ZEocJvZZ2ru88wlYOrdYQ==",
       "dependencies": {
         "@d3fc/d3fc-sample": "^5.0.1",
         "d3": "^7.6.1",
@@ -2504,12 +2504,12 @@
       }
     },
     "node_modules/@rcsb/rcsb-saguaro-app": {
-      "version": "4.4.0-models.38",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-4.4.0-models.38.tgz",
-      "integrity": "sha512-neqW3IgzH9dlgWVGBqXOKukK87n1sC9pgXJs3KOcAyiKv3tQss3SCJQCs4tfD/QDHb0F944aX/d/TemUxEoBfw==",
+      "version": "4.4.0-models.42",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-4.4.0-models.42.tgz",
+      "integrity": "sha512-t4UWULBX5kS0ptzulnp9AmZO7hxTfbJdRXhJ+ct99TYWLmNr9xAl6ehCLRoqqChUSR+cyn476ST9E8cjh6nsSA==",
       "dependencies": {
         "@rcsb/rcsb-api-tools": "^4.1.0-models.1",
-        "@rcsb/rcsb-saguaro": "^2.2.2",
+        "@rcsb/rcsb-saguaro": "^2.2.6",
         "react-select": "^5.4.0",
         "rxjs": "^7.5.5",
         "victory": "^36.5.0"
@@ -14037,9 +14037,9 @@
       }
     },
     "@rcsb/rcsb-saguaro": {
-      "version": "2.2.2",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro/-/rcsb-saguaro-2.2.2.tgz",
-      "integrity": "sha512-Z+a1HkbcxnwbTZ5Hyh4zSerkbeS3MXb7cz7CDEEV07I/Rzvsi+8V5QkHVwOTYxoUVmfhq+tJbXdX0J4ilBKqTg==",
+      "version": "2.2.6",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro/-/rcsb-saguaro-2.2.6.tgz",
+      "integrity": "sha512-gigsdjNR4Nnwisd1KRugV6U67swLrdSXnkzHRtXqmdRhuQk6ZpkTMxoKPk53VloF9ZEocJvZZ2ru88wlYOrdYQ==",
       "requires": {
         "@d3fc/d3fc-sample": "^5.0.1",
         "d3": "^7.6.1",
@@ -14051,12 +14051,12 @@
       }
     },
     "@rcsb/rcsb-saguaro-app": {
-      "version": "4.4.0-models.38",
-      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-4.4.0-models.38.tgz",
-      "integrity": "sha512-neqW3IgzH9dlgWVGBqXOKukK87n1sC9pgXJs3KOcAyiKv3tQss3SCJQCs4tfD/QDHb0F944aX/d/TemUxEoBfw==",
+      "version": "4.4.0-models.42",
+      "resolved": "https://registry.npmjs.org/@rcsb/rcsb-saguaro-app/-/rcsb-saguaro-app-4.4.0-models.42.tgz",
+      "integrity": "sha512-t4UWULBX5kS0ptzulnp9AmZO7hxTfbJdRXhJ+ct99TYWLmNr9xAl6ehCLRoqqChUSR+cyn476ST9E8cjh6nsSA==",
       "requires": {
         "@rcsb/rcsb-api-tools": "^4.1.0-models.1",
-        "@rcsb/rcsb-saguaro": "^2.2.2",
+        "@rcsb/rcsb-saguaro": "^2.2.6",
         "react-select": "^5.4.0",
         "rxjs": "^7.5.5",
         "victory": "^36.5.0"

+ 2 - 2
package.json

@@ -80,8 +80,8 @@
   "dependencies": {
     "@rcsb/rcsb-api-tools": "^4.1.0-models.1",
     "@rcsb/rcsb-molstar": "^2.5.5",
-    "@rcsb/rcsb-saguaro": "^2.2.2",
-    "@rcsb/rcsb-saguaro-app": "^4.4.0-models.38",
+    "@rcsb/rcsb-saguaro": "^2.2.6",
+    "@rcsb/rcsb-saguaro-app": "^4.4.0-models.42",
     "molstar": "^3.13.0"
   },
   "bugs": {

+ 4 - 1
src/RcsbFv3D/RcsbFv3DUniprot.tsx

@@ -21,6 +21,7 @@ import {
 } from "../RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryImplementation/UniprotCallbackManager";
 import {RcsbFvStructure} from "../RcsbFvStructure/RcsbFvStructure";
 import {RcsbFv3DCssConfig} from "./RcsbFv3DComponent";
+import {MolstarAlignmentLoader} from "../RcsbFvStructure/StructureUtils/MolstarAlignmentLoader";
 
 export interface RcsbFv3DUniprotInterface  {
     elementId?: string;
@@ -48,7 +49,9 @@ export class RcsbFv3DUniprot extends RcsbFv3DAbstract<{upAcc:string},LoadMolstar
                         upAcc:params.config.upAcc
                     },
                     buildPfvOnMount: true,
-                    pfvManagerFactory: new UniprotPfvManagerFactory<LoadMolstarInterface>({pluginLoadParamsDefinition}),
+                    pfvManagerFactory: new UniprotPfvManagerFactory<LoadMolstarInterface>({
+                        structureLoader: new MolstarAlignmentLoader()
+                    }),
                     callbackManagerFactory: new UniprotCallbackManagerFactory<LoadMolstarInterface>({pluginLoadParamsDefinition})
                 }
             },

+ 2 - 2
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/AssemblyPfvManagerFactory.tsx

@@ -12,7 +12,7 @@ import {asyncScheduler} from "rxjs";
 import {buildInstanceSequenceFv, FeatureType, RcsbFvUI, RcsbRequestContextManager} from "@rcsb/rcsb-saguaro-app";
 import {RcsbFvDOMConstants} from "../../../../RcsbFvConstants/RcsbFvConstants";
 import {SelectOptionProps} from "@rcsb/rcsb-saguaro-app/build/dist/RcsbFvWeb/RcsbFvComponents/SelectButton";
-import {ChainDisplay} from "./ChainDisplay";
+import {ChainDisplayComponent} from "./AssemblyPfvManagerFactory/ChainDisplayComponent";
 import * as React from "react";
 import {AnnotationFeatures, Source, Type} from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Borrego/GqlTypes";
 import {
@@ -102,7 +102,7 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
                     filterInstances: assemblyInstances.get(this.assemblyModelSate.getString("entryId")),
                     selectButtonOptionProps: (props: SelectOptionProps) => (
                         <div style={{display: 'flex'}}>
-                            <ChainDisplay structureViewer={this.plugin} label={props.data.label}/>
+                            <ChainDisplayComponent structureViewer={this.plugin} label={props.data.label}/>
                             {props.children}
                         </div>)
                 },

+ 2 - 2
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/ChainDisplay.tsx → src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/AssemblyPfvManagerFactory/ChainDisplayComponent.tsx

@@ -1,7 +1,7 @@
 import * as React from "react";
 import {
     StructureViewerInterface
-} from "../../../../RcsbFvStructure/StructureViewerInterface";
+} from "../../../../../RcsbFvStructure/StructureViewerInterface";
 
 type DisplayComponentMethod = (StructureViewerInterface<undefined,[]>)["displayComponent"]
 interface ChainDisplayInterface {
@@ -15,7 +15,7 @@ interface ChainDisplayState {
     display: 'visible' | 'hidden';
 }
 
-export class ChainDisplay extends React.Component<ChainDisplayInterface, ChainDisplayState>{
+export class ChainDisplayComponent extends React.Component<ChainDisplayInterface, ChainDisplayState>{
 
     readonly state: ChainDisplayState = {
         display: this.props.structureViewer.displayComponent(this.props.label) ? 'visible' : 'hidden'

+ 29 - 10
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/UniprotPfvManagerFactory.ts

@@ -16,6 +16,12 @@ import {
     AlignmentRequestContextType
 } from "@rcsb/rcsb-saguaro-app/build/dist/RcsbFvWeb/RcsbFvFactories/RcsbFvTrackFactory/TrackFactoryImpl/AlignmentTrackFactory";
 import {AlignmentResponse, TargetAlignment} from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Borrego/GqlTypes";
+import {StructureLoaderInterface} from "../../../../RcsbFvStructure/StructureUtils/StructureLoaderInterface";
+import {
+    ViewerActionManagerInterface,
+    ViewerCallbackManagerInterface
+} from "../../../../RcsbFvStructure/StructureViewerInterface";
+import {UniprotRowMarkComponent} from "./UniprotPfvManagerFactory/UniprotRowMarkComponent";
 
 interface UniprotPfvManagerInterface<R> extends PfvManagerFactoryConfigInterface<R,{context: UniprotSequenceOnchangeInterface;}> {
     upAcc:string;
@@ -23,26 +29,36 @@ interface UniprotPfvManagerInterface<R> extends PfvManagerFactoryConfigInterface
 
 export class UniprotPfvManagerFactory<R> implements PfvManagerFactoryInterface<{upAcc:string},R,{context: UniprotSequenceOnchangeInterface;}> {
 
-    private readonly pluginLoadParamsDefinition:(id: string)=>R;
-    constructor(config: {pluginLoadParamsDefinition:(id: string)=>R}) {
-        this.pluginLoadParamsDefinition = config.pluginLoadParamsDefinition;
+    private readonly structureLoader: StructureLoaderInterface<[ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>,{entryId:string;entityId:string;},{entryId:string;entityId:string;}]>;
+
+    constructor(config: {
+        structureLoader: StructureLoaderInterface<[ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>,{entryId:string;entityId:string;},{entryId:string;entityId:string;}]>
+    }) {
+        this.structureLoader = config.structureLoader;
     }
 
     getPfvManager(config: UniprotPfvManagerInterface<R>): PfvManagerInterface {
-        return new UniprotPfvManager({...config, loadParamRequest:this.pluginLoadParamsDefinition});
+        return new UniprotPfvManager({
+            ...config,
+            structureLoader:this.structureLoader
+        });
     }
 }
 
 class UniprotPfvManager<R> extends AbstractPfvManager<{upAcc:string},R,{context: UniprotSequenceOnchangeInterface;}>{
 
     private readonly upAcc:string;
-    private readonly loadParamRequest:(id: string)=>R;
+    private readonly structureLoader: StructureLoaderInterface<[ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>,{entryId:string;entityId:string;},{entryId:string;entityId:string;}]>;
+
     private module:RcsbFvModulePublicInterface;
+    private structureRef: {entryId:string;entityId:string;};
 
-    constructor(config:UniprotPfvManagerInterface<R> & {loadParamRequest:(id: string)=>R}) {
+    constructor(config:UniprotPfvManagerInterface<R> & {
+        structureLoader: StructureLoaderInterface<[ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>,{entryId:string;entityId:string;},{entryId:string;entityId:string;}]>
+    }) {
         super(config);
         this.upAcc = config.upAcc;
-        this.loadParamRequest = config.loadParamRequest;
+        this.structureLoader = config.structureLoader;
     }
 
     async create(): Promise<RcsbFvModulePublicInterface | undefined> {
@@ -60,7 +76,8 @@ class UniprotPfvManager<R> extends AbstractPfvManager<{upAcc:string},R,{context:
                     alignment: (alignmentContext: AlignmentRequestContextType, targetAlignment: TargetAlignment) => new Promise((resolve)=>{
                         resolve({
                             rowMark:{
-                                clickCallback: ()=>{
+                                externalComponent: UniprotRowMarkComponent,
+                                clickCallback:()=>{
                                     this.loadAlignment(alignmentContext,targetAlignment);
                                 }
                             }
@@ -77,13 +94,15 @@ class UniprotPfvManager<R> extends AbstractPfvManager<{upAcc:string},R,{context:
     private async readyStateLoad(): Promise<void> {
         const alignments: AlignmentResponse = await this.module.getAlignmentResponse();
         if(alignments.target_alignment && alignments.target_alignment.length > 0 && typeof alignments.target_alignment[0]?.target_id === "string"){
+            this.structureRef = TagDelimiter.parseEntity(alignments.target_alignment[0]?.target_id);
             await this.loadAlignment({queryId:this.upAcc}, alignments.target_alignment[0]);
         }
     }
 
     private async loadAlignment(alignmentContext: AlignmentRequestContextType, targetAlignment: TargetAlignment): Promise<void> {
-        if(typeof targetAlignment.target_id === "string")
-            await this.plugin.load( this.loadParamRequest(TagDelimiter.parseEntity(targetAlignment.target_id).entryId) )
+        if(typeof targetAlignment.target_id === "string") {
+            await this.structureLoader.load(this.plugin,this.structureRef,TagDelimiter.parseEntity(targetAlignment.target_id));
+        }
     }
 
 }

+ 52 - 0
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/UniprotPfvManagerFactory/UniprotRowMarkComponent.tsx

@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2021 RCSB PDB and contributors, licensed under MIT, See LICENSE file for more info.
+* @author Joan Segura Mora <joan.segura@rcsb.org>
+*/
+
+import React from "react";
+import classes from './scss/UniprotPfvStyle.module.scss';
+import {Property} from "csstype";
+import {asyncScheduler} from "rxjs";
+
+interface UniprotRowMarkInterface  {
+    isGlowing:boolean;
+    clickCallback?:()=>void;
+    hoverCallback?:()=>void;
+}
+
+interface UniprotRowMarkState {
+    visibility: Property.Visibility | undefined;
+    borderLeftColor: Property.BorderLeftColor | undefined;
+}
+
+export class UniprotRowMarkComponent extends React.Component <UniprotRowMarkInterface,UniprotRowMarkState> {
+
+    private readonly HOVER_COLOR: string = "#666";
+    private readonly ACTIVE_COLOR: string = "#ccc";
+
+    readonly state: UniprotRowMarkState = {
+        visibility: undefined,
+        borderLeftColor: undefined
+    }
+
+    public render(): JSX.Element {
+        return (
+            <>
+                <div onClick={this.click.bind(this)} onMouseOver={this.hover.bind(this)} style={{visibility: this.state.visibility, cursor:"pointer", display:"inline-block", width:6, height:6, marginBottom: 4, marginRight:5}} >
+                    <div className={classes.uniprotRowMark} style={{borderLeftColor: this.props.isGlowing ? this.HOVER_COLOR : (this.state.borderLeftColor)}}/>
+                </div>
+            </>
+        );
+    }
+
+    private click(): void {
+        this.setState({visibility:  this.state.visibility === "visible" ? undefined : "visible", borderLeftColor: this.state.visibility === "visible" ? undefined : this.ACTIVE_COLOR});
+        asyncScheduler.schedule(()=>this.props.clickCallback?.());
+    }
+
+    private hover(): void {
+        this.props.hoverCallback?.();
+    }
+
+
+}

+ 8 - 0
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/UniprotPfvManagerFactory/scss/UniprotPfvStyle.module.scss

@@ -0,0 +1,8 @@
+
+.uniprotRowMark {
+  width: 0;
+  height: 0;
+  border-top: 6px solid transparent;
+  border-bottom: 6px solid transparent;
+  border-left: 6px solid ;
+}

+ 104 - 0
src/RcsbFvStructure/StructureUtils/MolstarAlignmentLoader.ts

@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2021 RCSB PDB and contributors, licensed under MIT, See LICENSE file for more info.
+* @author Joan Segura Mora <joan.segura@rcsb.org>
+*/
+
+import {StructureLoaderInterface} from "./StructureLoaderInterface";
+import {ViewerActionManagerInterface, ViewerCallbackManagerInterface} from "../StructureViewerInterface";
+import {StructureRef} from "molstar/lib/mol-plugin-state/manager/structure/hierarchy-state";
+import {Loci} from "molstar/lib/mol-model/loci";
+import {alignAndSuperpose} from "molstar/lib/mol-model/structure/structure/util/superposition";
+import {Structure, StructureElement, Unit} from "molstar/lib/mol-model/structure";
+import {PluginContext} from "molstar/lib/mol-plugin/context";
+import {StateObjectRef} from "molstar/lib/mol-state";
+import {Mat4} from "molstar/lib/mol-math/linear-algebra";
+import {SymmetryOperator} from "molstar/lib/mol-math/geometry/symmetry-operator";
+import {PluginStateObject} from "molstar/lib/mol-plugin-state/objects";
+import {StateTransforms} from "molstar/lib/mol-plugin-state/transforms";
+import {PluginCommands} from "molstar/lib/mol-plugin/commands";
+import {LoadMethod, LoadMolstarInterface} from "../StructureViewers/MolstarViewer/MolstarActionManager";
+import {TagDelimiter} from "@rcsb/rcsb-saguaro-app";
+
+const SuperpositionTag = 'SuperpositionTransform';
+export class MolstarAlignmentLoader implements StructureLoaderInterface<[ViewerCallbackManagerInterface & ViewerActionManagerInterface <LoadMolstarInterface>,{entryId:string;entityId:string;},{entryId:string;entityId:string;}]> {
+
+    private readonly structureMap: Map<string,string|undefined> = new Map<string,string|undefined>();
+
+    async load(structureViewer: ViewerCallbackManagerInterface & ViewerActionManagerInterface <LoadMolstarInterface>, ref: {entryId:string;entityId:string;}, pdb:{entryId:string;entityId:string;}): Promise<void> {
+        const structureId: string = `${pdb.entryId}${TagDelimiter.entity}${pdb.entityId}`;
+        if(!this.structureMap.has(structureId)){
+            await structureViewer.load({
+                loadMethod: LoadMethod.loadPdbId,
+                loadParams:{
+                    pdbId:pdb.entryId
+                }
+            });
+            structureViewer.pluginCall(async (plugin)=>{
+                this.structureMap.set(
+                    structureId,
+                    plugin.managers.structure.hierarchy.current.structures[ plugin.managers.structure.hierarchy.current.structures.length -1].properties?.cell?.obj?.data?.units[0]?.model?.id
+                );
+
+            });
+
+        } else {
+            structureViewer.pluginCall(async (plugin)=>{
+                const pdbStr: StructureRef|undefined = plugin.managers.structure.hierarchy.current.structures.find(s=>s.properties?.cell?.obj?.data?.units[0]?.model?.id == this.structureMap.get(structureId));
+                if(pdbStr) {
+                    plugin.managers.structure.hierarchy.remove([pdbStr]);
+                    this.structureMap.delete(structureId);
+                    await PluginCommands.Camera.Reset(plugin);
+                }
+            });
+            return;
+        }
+        if(ref.entryId != pdb.entryId)
+            structureViewer.pluginCall(async (plugin)=>{
+                const pdbId: string = `${pdb.entryId}${TagDelimiter.entity}${pdb.entityId}`;
+                const refId: string = `${ref.entryId}${TagDelimiter.entity}${ref.entityId}`;
+                const refStr: StructureRef|undefined = plugin.managers.structure.hierarchy.current.structures.find(s=>s.properties?.cell?.obj?.data?.units[0]?.model?.id == this.structureMap.get(refId));
+                const pdbStr: StructureRef|undefined = plugin.managers.structure.hierarchy.current.structures.find(s=>s.properties?.cell?.obj?.data?.units[0]?.model?.id == this.structureMap.get(pdbId));
+                if(refStr && pdbStr){
+                    const refData: Structure|undefined = refStr.properties?.cell.obj?.data;
+                    const pdbData: Structure|undefined = pdbStr.properties?.cell.obj?.data;
+                    const pdbUnit:Unit|undefined = pdbData?.units.find((u,n)=>u.model.atomicHierarchy.chains.label_entity_id.value(n) === pdb.entityId);
+                    const refUnit:Unit|undefined = refData?.units.find((u,n)=>u.model.atomicHierarchy.chains.label_entity_id.value(n) === ref.entityId);
+                    if(pdbData && pdbUnit && refData && refUnit){
+                        const refLoci: Loci = Structure.toStructureElementLoci(Structure.create([refUnit]));
+                        const pdbLoci: Loci = Structure.toStructureElementLoci(Structure.create([pdbUnit]));
+                        if(StructureElement.Loci.is(refLoci) && StructureElement.Loci.is(pdbLoci)) {
+                            const pivot = plugin.managers.structure.hierarchy.findStructure(refLoci.structure);
+                            const coordinateSystem = pivot?.transform?.cell.obj?.data.coordinateSystem;
+                            const transforms = alignAndSuperpose([refLoci, pdbLoci]);
+                            const { bTransform } = transforms[0];
+                            await this.transform(plugin, plugin.helpers.substructureParent.get(pdbData)!, bTransform, coordinateSystem);
+                            await PluginCommands.Camera.Reset(plugin);
+                        }
+                    }
+                }
+            });
+    }
+
+    private async transform(plugin:PluginContext, s: StateObjectRef<PluginStateObject.Molecule.Structure>, matrix: Mat4, coordinateSystem?: SymmetryOperator) {
+        const r = StateObjectRef.resolveAndCheck(plugin.state.data, s);
+        if (!r) return;
+        const o = plugin.state.data.selectQ(q => q.byRef(r.transform.ref).subtree().withTransformer(StateTransforms.Model.TransformStructureConformation))[0];
+
+        const transform = coordinateSystem && !Mat4.isIdentity(coordinateSystem.matrix)
+            ? Mat4.mul(Mat4(), coordinateSystem.matrix, matrix)
+            : matrix;
+
+        const params = {
+            transform: {
+                name: 'matrix' as const,
+                params: { data: transform, transpose: false }
+            }
+        };
+        const b = o
+            ? plugin.state.data.build().to(o).update(params)
+            : plugin.state.data.build().to(s)
+                .insert(StateTransforms.Model.TransformStructureConformation, params, { tags: SuperpositionTag });
+        await plugin.runTask(plugin.state.data.updateTree(b));
+    }
+
+}

+ 8 - 0
src/RcsbFvStructure/StructureUtils/StructureLoaderInterface.ts

@@ -0,0 +1,8 @@
+/*
+* Copyright (c) 2021 RCSB PDB and contributors, licensed under MIT, See LICENSE file for more info.
+* @author Joan Segura Mora <joan.segura@rcsb.org>
+*/
+
+export interface StructureLoaderInterface<X extends any[]> {
+    load(...args:X): Promise<void>;
+}

+ 0 - 1
src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarCallbackManager.ts

@@ -20,7 +20,6 @@ import {Viewer} from "@rcsb/rcsb-molstar/build/src/viewer";
 import {Subscription} from "rxjs";
 import {RcsbFvSelectorManager} from "../../../RcsbFvSelection/RcsbFvSelectorManager";
 import {DataContainer, DataContainerReader} from "../../../Utils/DataContainer";
-import {MolstarModelMapManager} from "./MolstarModelMapManager";
 
 
 export class MolstarCallbackManager implements ViewerCallbackManagerInterface{