Explorar el Código

callbacks to subscriptions in structure viewer callback

bioinsilico hace 2 años
padre
commit
af8521e03c
Se han modificado 24 ficheros con 144 adiciones y 144 borrados
  1. 1 1
      src/RcsbFv3D/RcsbFv3DAssembly.tsx
  2. 2 2
      src/RcsbFv3D/RcsbFv3DUniprot.tsx
  3. 12 6
      src/RcsbFvSequence/SequenceViews/AbstractView.tsx
  4. 6 6
      src/RcsbFvSequence/SequenceViews/CustomView/CustomView.tsx
  5. 23 22
      src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryImplementation/AssemblyCallbackManager.ts
  6. 1 2
      src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryImplementation/UniprotCallbackManager.ts
  7. 2 8
      src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryInterface.ts
  8. 21 23
      src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/AssemblyPfvManagerFactory.tsx
  9. 0 4
      src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryInterface.ts
  10. 2 5
      src/RcsbFvSequence/SequenceViews/RcsbView/RcsbView.tsx
  11. 1 1
      src/RcsbFvSequence/SequenceViews/SequenceViewInterface.ts
  12. 1 1
      src/RcsbFvState/RcsbFvStateInterface.ts
  13. 1 1
      src/RcsbFvStructure/StructureUtils/MolstarAlignmentLoader.ts
  14. 7 6
      src/RcsbFvStructure/StructureViewerInterface.ts
  15. 6 9
      src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarActionManager.ts
  16. 24 23
      src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarCallbackManager.ts
  17. 1 2
      src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarManagerFactory.ts
  18. 7 2
      src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarModelMapManager.ts
  19. 18 12
      src/RcsbFvStructure/StructureViewers/StructureViewer.ts
  20. 2 2
      src/examples/css-config/index.ts
  21. 2 2
      src/examples/external-mapping/index.ts
  22. 1 1
      src/examples/multiple-chain/index.tsx
  23. 1 1
      src/examples/single-chain/index.ts
  24. 2 2
      src/examples/structural-alignment/index.ts

+ 1 - 1
src/RcsbFv3D/RcsbFv3DAssembly.tsx

@@ -59,7 +59,7 @@ export class RcsbFv3DAssembly extends RcsbFv3DAbstract<{instanceSequenceConfig?:
                 loadConfig: {
                     loadMethod: LoadMethod.loadPdbId,
                     loadParams: {
-                        pdbId: params.config.entryId,
+                        entryId: params.config.entryId,
                         id: params.config.entryId,
                         reprProvider: RcsbRepresentationPreset,
                         params: {

+ 2 - 2
src/RcsbFv3D/RcsbFv3DUniprot.tsx

@@ -68,9 +68,9 @@ export class RcsbFv3DUniprot extends RcsbFv3DAbstract<{upAcc:string},LoadMolstar
 
 }
 
-const pluginLoadParamsDefinition = (pdbId:string)=>({
+const pluginLoadParamsDefinition = (entryId:string)=>({
     loadMethod: LoadMethod.loadPdbId,
     loadParams:{
-        pdbId
+        entryId
     }
 })

+ 12 - 6
src/RcsbFvSequence/SequenceViews/AbstractView.tsx

@@ -45,15 +45,21 @@ export abstract class AbstractView<P,S,R> extends React.Component <P & AbstractV
     }
 
     componentDidMount() {
-        this.props.structureViewer.setSelectCallback(this.structureSelectionCallback.bind(this));
-        this.props.structureViewer.setModelChangeCallback(this.modelChangeCallback.bind(this));
-        this.props.structureViewer.setHoverCallback(this.structureHoverCallback.bind(this));
-        this.props.structureViewer.setRepresentationChangeCallback(this.representationChangeCallback.bind(this));
+        this.props.stateManager.subscribe(o=>{
+            if(o.view == "3d-view" && o.type == "selection-change")
+                this.structureSelectionCallback();
+            if(o.view == "3d-view" && o.type == "hover-change")
+                this.structureHoverCallback()
+            if(o.view == "3d-view" && o.type == "model-change")
+                this.modelChangeCallback();
+            if(o.view == "3d-view" && o.type == "representation-change")
+                this.representationChangeCallback();
+        });
         window.addEventListener('resize', this.resizeCallback);
     }
 
     componentWillUnmount() {
-        this.props.structureViewer.unsetCallbacks();
+        this.props.structureViewer.unsubscribe();
         window.removeEventListener('resize', this.resizeCallback);
     }
 
@@ -82,6 +88,6 @@ export abstract class AbstractView<P,S,R> extends React.Component <P & AbstractV
     abstract structureHoverCallback(): void;
     abstract representationChangeCallback(): void;
     abstract structureSelectionCallback(): void;
-    abstract modelChangeCallback(modelMap:SaguaroPluginModelMapType): void;
+    abstract modelChangeCallback(): void;
 
 }

+ 6 - 6
src/RcsbFvSequence/SequenceViews/CustomView/CustomView.tsx

@@ -20,7 +20,7 @@ export type CustomViewStateInterface<R> = Omit<CustomViewInterface<R>, "modelCha
 export interface CustomViewInterface<R> {
     blockConfig: FeatureBlockInterface<R> | Array<FeatureBlockInterface<R>>;
     blockSelectorElement?: (blockSelector: BlockSelectorManager) => JSX.Element;
-    modelChangeCallback?: (modelMap: SaguaroPluginModelMapType) => CustomViewStateInterface<R>;
+    modelChangeCallback?: () => CustomViewStateInterface<R>;
     blockChangeCallback?: (plugin: StructureViewerPublicInterface<R>, pfvList: Array<RcsbFv>, stateManager: RcsbFvStateManager) => void;
 }
 
@@ -143,7 +143,7 @@ export class CustomView<R> extends AbstractView<CustomViewInterface<R>, CustomVi
             document.getElementById("boardDiv_"+boardId)?.remove()
         });
         this.rcsbFvMap.clear();
-        this.props.structureViewer.unsetCallbacks();
+        this.props.structureViewer.unsubscribe();
     }
 
     private buildBlockFv(){
@@ -178,9 +178,9 @@ export class CustomView<R> extends AbstractView<CustomViewInterface<R>, CustomVi
             });
             this.rcsbFvMap.set(boardId, rcsbFv);
         });
-        this.props.structureViewer.setSelectCallback(()=>{
+        /*this.props.structureViewer.setSelectCallback(()=>{
            this.structureSelectionCallback();
-        });
+        });*/
     }
 
     structureSelectionCallback(): void {
@@ -213,13 +213,13 @@ export class CustomView<R> extends AbstractView<CustomViewInterface<R>, CustomVi
         return this.state.blockSelectorElement(this.blockViewSelector);
     }
 
-    modelChangeCallback(modelMap:SaguaroPluginModelMapType): void {
+    modelChangeCallback(): void {
         if(this.firstModelLoad){
             this.firstModelLoad = false;
             return;
         }
         if(typeof this.props.modelChangeCallback === "function") {
-            let newConfig: CustomViewStateInterface<R> = this.props.modelChangeCallback(modelMap);
+            let newConfig: CustomViewStateInterface<R> = this.props.modelChangeCallback();
             if(newConfig != null ){
                 this.updateContext = "state-change";
                 if(newConfig.blockConfig != null && newConfig.blockSelectorElement != null){

+ 23 - 22
src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryImplementation/AssemblyCallbackManager.ts

@@ -1,5 +1,5 @@
 import {
-    SaguaroPluginModelMapType, SaguaroRange,
+    SaguaroRange,
     SaguaroRegionList
 } from "../../../../RcsbFvStructure/StructureViewerInterface";
 import {RcsbFvTrackDataElementInterface} from "@rcsb/rcsb-saguaro";
@@ -28,9 +28,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
 
         const x = e.begin;
         const y = e.end ?? e.begin;
-        const modelId: string = this.assemblyModelSate.getString("modelId");
-        const labelAsymId: string = this.assemblyModelSate.getString("labelAsymId");
-        const operatorName: string|undefined = this.assemblyModelSate.getOperator()?.name;
+        const modelId: string = this.stateManager.assemblyModelSate.getString("modelId");
+        const labelAsymId: string = this.stateManager.assemblyModelSate.getString("labelAsymId");
+        const operatorName: string|undefined = this.stateManager.assemblyModelSate.getOperator()?.name;
 
         if(e.isEmpty){
             this.plugin.cameraFocus(modelId, labelAsymId, [x,y], operatorName);
@@ -70,9 +70,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
     }
 
     public highlightHoverCallback(selection: RcsbFvTrackDataElementInterface[]): void {
-        const modelId: string = this.assemblyModelSate.getString("modelId");
-        const labelAsymId: string = this.assemblyModelSate.getString("labelAsymId");
-        const operatorName: string|undefined = this.assemblyModelSate.getOperator()?.name;
+        const modelId: string = this.stateManager.assemblyModelSate.getString("modelId");
+        const labelAsymId: string = this.stateManager.assemblyModelSate.getString("labelAsymId");
+        const operatorName: string|undefined = this.stateManager.assemblyModelSate.getOperator()?.name;
 
         if(selection != null && selection.length > 0) {
             if(selection[0].isEmpty){
@@ -106,8 +106,8 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
         }
     }
 
-    public async modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAuthId?: string, defaultOperatorName?:string): Promise<void> {
-        this.rcsbFvContainer.set(await this.pfvFactory.create({modelMap, defaultAuthId, defaultOperatorName}));
+    public async modelChangeCallback(defaultAuthId?: string, defaultOperatorName?:string): Promise<void> {
+        this.rcsbFvContainer.set(await this.pfvFactory.create({defaultAuthId, defaultOperatorName}));
     }
 
     public async pfvChangeCallback(): Promise<void>{
@@ -118,9 +118,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
     protected async innerPluginSelect(mode:'select'|'hover'): Promise<void> {
         const allSel: Array<SaguaroRegionList> | undefined = this.stateManager.selectionState.getSelection(mode);
         const lastSel: SaguaroRegionList|null = this.stateManager.selectionState.getLastSelection('select');
-        const modelId: string = this.assemblyModelSate.getString("modelId");
-        const labelAsymId: string = this.assemblyModelSate.getString("labelAsymId");
-        const operatorName: string|undefined = this.assemblyModelSate.getOperator()?.name;
+        const modelId: string = this.stateManager.assemblyModelSate.getString("modelId");
+        const labelAsymId: string = this.stateManager.assemblyModelSate.getString("labelAsymId");
+        const operatorName: string|undefined = this.stateManager.assemblyModelSate.getOperator()?.name;
 
         if(mode === 'select') this.removeComponent();
 
@@ -128,8 +128,8 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
             this.rcsbFvContainer.get()?.getFv().clearSelection(mode);
             if(mode === 'select') this.resetPluginView();
         }else if( mode === 'select' && lastSel?.labelAsymId && (lastSel?.labelAsymId != labelAsymId || lastSel?.operatorName != operatorName) ){
-            const authId: string | undefined = this.assemblyModelSate.getChainInfo(lastSel?.labelAsymId!)?.auth;
-            await this.modelChangeCallback(this.assemblyModelSate.getMap(), authId, lastSel?.operatorName);
+            const authId: string | undefined = this.stateManager.assemblyModelSate.getChainInfo(lastSel?.labelAsymId!)?.auth;
+            await this.modelChangeCallback(authId, lastSel?.operatorName);
         }else if(modelId && labelAsymId){
             const sel: SaguaroRegionList | undefined = this.stateManager.selectionState.getSelectionWithCondition(
                 modelId,
@@ -147,9 +147,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
     }
 
     protected innerSelectionChange(selection: Array<RcsbFvTrackDataElementInterface>): void {
-        const modelId: string = this.assemblyModelSate.getString("modelId");
-        const labelAsymId: string = this.assemblyModelSate.getString("labelAsymId");
-        const operatorName: string|undefined = this.assemblyModelSate.getOperator()?.name;
+        const modelId: string = this.stateManager.assemblyModelSate.getString("modelId");
+        const labelAsymId: string = this.stateManager.assemblyModelSate.getString("labelAsymId");
+        const operatorName: string|undefined = this.stateManager.assemblyModelSate.getOperator()?.name;
 
         this.plugin.clearSelection('select', {modelId, labelAsymId, operatorName});
         this.stateManager.selectionState.clearSelection('select', {labelAsymId, operatorName});
@@ -161,9 +161,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
     }
 
     private select(selection: Array<RcsbFvTrackDataElementInterface>): void{
-        const modelId: string = this.assemblyModelSate.getString("modelId");
-        const labelAsymId: string = this.assemblyModelSate.getString("labelAsymId");
-        const operatorName: string|undefined = this.assemblyModelSate.getOperator()?.name;
+        const modelId: string = this.stateManager.assemblyModelSate.getString("modelId");
+        const labelAsymId: string = this.stateManager.assemblyModelSate.getString("labelAsymId");
+        const operatorName: string|undefined = this.stateManager.assemblyModelSate.getOperator()?.name;
 
         selection.forEach(e=>{
             const x = e.begin;
@@ -191,8 +191,9 @@ class AssemblyCallbackManager<R> extends AbstractCallbackManager<R,undefined> {
                     operatorName
                 );
             }else{
-                this.plugin.select(processGaps(modelId, labelAsymId, e, operatorName), 'select', 'add');
-                this.stateManager.selectionState.addSelectionFromRegion(modelId, labelAsymId, {begin:x, end:y, source: 'sequence'}, 'select', operatorName);
+                const ranges: SaguaroRange[] = processGaps(modelId, labelAsymId, e, operatorName)
+                this.plugin.select(ranges, 'select', 'add');
+                ranges.forEach(r=>this.stateManager.selectionState.addSelectionFromRegion(modelId, labelAsymId, {begin:r.begin, end:r.end, source: 'sequence'}, 'select', operatorName))
             }
         });
     }

+ 1 - 2
src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryImplementation/UniprotCallbackManager.ts

@@ -36,8 +36,7 @@ class UniprotCallbackManager<R>  extends AbstractCallbackManager<R,{context: Uni
     highlightHoverCallback(selection: RcsbFvTrackDataElementInterface[]): void {
     }
 
-    modelChangeCallback(modelMap: SaguaroPluginModelMapType, defaultAuthId?: string, defaultOperatorName?: string): Promise<void> {
-        this.assemblyModelSate.setMap(modelMap);
+    modelChangeCallback(defaultAuthId?: string, defaultOperatorName?: string): Promise<void> {
         return Promise.resolve(undefined);
     }
 

+ 2 - 8
src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryInterface.ts

@@ -1,14 +1,11 @@
 import {RcsbFvTrackDataElementInterface} from "@rcsb/rcsb-saguaro";
 import {
-    SaguaroPluginModelMapType,
     ViewerCallbackManagerInterface, ViewerActionManagerInterface
 } from "../../../RcsbFvStructure/StructureViewerInterface";
 import {DataContainer} from "../../../Utils/DataContainer";
 import {
     RcsbFvModulePublicInterface
 } from "@rcsb/rcsb-saguaro-app/build/dist/RcsbFvWeb/RcsbFvModule/RcsbFvModuleInterface";
-import {RcsbFvSelectorManager} from "../../../RcsbFvState/RcsbFvSelectorManager";
-import {AssemblyModelSate} from "../../../RcsbFvState/AssemblyModelSate";
 import {PfvManagerInterface} from "./PfvManagerFactoryInterface";
 import {RcsbFvStateManager} from "../../../RcsbFvState/RcsbFvStateManager";
 
@@ -17,7 +14,7 @@ export interface CallbackManagerInterface<U> {
     elementClickCallback(e:RcsbFvTrackDataElementInterface): void;
     highlightHoverCallback(selection: RcsbFvTrackDataElementInterface[]): void;
     selectionChangeCallback(selection: Array<RcsbFvTrackDataElementInterface>): void;
-    modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAuthId?: string, defaultOperatorName?:string): Promise<void>;
+    modelChangeCallback(defaultAuthId?: string, defaultOperatorName?:string): Promise<void>;
     pfvChangeCallback(args:U): Promise<void>;
 }
 
@@ -28,7 +25,6 @@ export interface CallbackManagerFactoryInterface<R,U> {
 export interface CallbackConfigInterface<R> {
     rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     stateManager: RcsbFvStateManager;
-    assemblyModelSate: AssemblyModelSate;
     plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
     pfvFactory: PfvManagerInterface;
 }
@@ -36,7 +32,6 @@ export interface CallbackConfigInterface<R> {
 export abstract class AbstractCallbackManager<R,U> implements CallbackManagerInterface<U> {
     protected readonly rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     protected readonly stateManager: RcsbFvStateManager;
-    protected readonly assemblyModelSate: AssemblyModelSate;
     protected selectedComponentId: string|undefined;
     protected readonly plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
     protected pfvFactory: PfvManagerInterface;
@@ -45,7 +40,6 @@ export abstract class AbstractCallbackManager<R,U> implements CallbackManagerInt
     constructor(config: CallbackConfigInterface<R>) {
         this.rcsbFvContainer = config.rcsbFvContainer;
         this.stateManager = config.stateManager;
-        this.assemblyModelSate = config.assemblyModelSate;
         this.plugin = config.plugin;
         this.pfvFactory = config.pfvFactory;
     }
@@ -66,7 +60,7 @@ export abstract class AbstractCallbackManager<R,U> implements CallbackManagerInt
 
     public abstract elementClickCallback(e:RcsbFvTrackDataElementInterface): void;
     public abstract highlightHoverCallback(selection: RcsbFvTrackDataElementInterface[]): void;
-    public abstract modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAuthId?: string, defaultOperatorName?:string): Promise<void>;
+    public abstract modelChangeCallback(defaultAuthId?: string, defaultOperatorName?:string): Promise<void>;
     public abstract pfvChangeCallback(args: U): Promise<void>;
     protected abstract innerPluginSelect(mode: "select" | "hover"): Promise<void> ;
     protected abstract innerSelectionChange(selection: Array<RcsbFvTrackDataElementInterface>): void;

+ 21 - 23
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/AssemblyPfvManagerFactory.tsx

@@ -57,14 +57,13 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
     }
 
     public async create(config: BuildPfvInterface): Promise<RcsbFvModulePublicInterface | undefined> {
-        this.assemblyModelSate.setMap(config.modelMap);
         this.plugin.clearFocus();
         const onChangeCallback: Map<string, (x: PolymerEntityInstanceInterface)=>void> = new Map<string, (x: PolymerEntityInstanceInterface) => {}>();
         const assemblyInstances: Map<string, Set<string>> = new Map<string, Set<string>>();
-        this.assemblyModelSate.forEach((v,k)=>{
+        this.stateManager.assemblyModelSate.forEach((v,k)=>{
             assemblyInstances.set(v.entryId,new Set<string>(v.chains.map(d=>d.label)));
             onChangeCallback.set(v.entryId,(x)=>{
-                this.assemblyModelSate.set({entryId: v.entryId, labelAsymId: x.asymId, modelId: k});
+                this.stateManager.assemblyModelSate.set({entryId: v.entryId, labelAsymId: x.asymId, modelId: k});
                 asyncScheduler.schedule(()=>{
                     this.stateManager.selectionState.setLastSelection('select', null);
                     this.pfvChangeCallback(undefined);
@@ -72,34 +71,34 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
             });
         });
         const operatorNameContainer: DataContainer<string> = new DataContainer<string>(config.defaultOperatorName);
-        if(this.assemblyModelSate.get("entryId") != null) {
+        if(this.stateManager.assemblyModelSate.get("entryId") != null) {
             this.module = await buildInstanceSequenceFv(
                 this.rcsbFvDivId,
                 RcsbFvDOMConstants.SELECT_BUTTON_PFV_ID,
-                this.assemblyModelSate.getString("entryId"),
+                this.stateManager.assemblyModelSate.getString("entryId"),
                 {
                     ...this.instanceSequenceConfig,
                     defaultValue: config.defaultAuthId,
-                    onChangeCallback: onChangeCallback.get(this.assemblyModelSate.getString("entryId")),
+                    onChangeCallback: onChangeCallback.get(this.stateManager.assemblyModelSate.getString("entryId")),
                     beforeChangeCallback: (x: PolymerEntityInstanceInterface)=>{
-                        this.assemblyModelSate.set({entryId:x.entryId, labelAsymId: x.asymId});
-                        const entryMap:[string, {entryId: string, assemblyId: string, chains: ChainInfo[]}] | undefined = Array.from(this.assemblyModelSate.entries()).find((e)=>(e[1].entryId === x.entryId));
+                        this.stateManager.assemblyModelSate.set({entryId:x.entryId, labelAsymId: x.asymId});
+                        const entryMap:[string, {entryId: string, assemblyId: string, chains: ChainInfo[]}] | undefined = Array.from(this.stateManager.assemblyModelSate.entries()).find((e)=>(e[1].entryId === x.entryId));
                         if(!entryMap){
                             throw `Error: no modelId was found for ${x.entryId}`;
                         }
-                        const operator: OperatorInfo|undefined = getOperator(this.assemblyModelSate.getMap().get(entryMap[0])!, config.defaultAuthId, operatorNameContainer.get());
+                        const operator: OperatorInfo|undefined = getOperator(this.stateManager.assemblyModelSate.getMap().get(entryMap[0])!, config.defaultAuthId, operatorNameContainer.get());
                         this.addOperatorButton(operator?.name);
-                        this.assemblyModelSate.setOperator(x.asymId,operator?.name);
+                        this.stateManager.assemblyModelSate.setOperator(x.asymId,operator?.name);
                         operatorNameContainer.set(undefined);
-                        if(typeof this.additionalConfig?.operatorChangeCallback === "function" && this.assemblyModelSate.getOperator()){
-                            this.additionalConfig.operatorChangeCallback(this.assemblyModelSate.getOperator()!);
+                        if(typeof this.additionalConfig?.operatorChangeCallback === "function" && this.stateManager.assemblyModelSate.getOperator()){
+                            this.additionalConfig.operatorChangeCallback(this.stateManager.assemblyModelSate.getOperator()!);
                         }
-                        if((this.assemblyModelSate.getChainInfo()?.operators?.length ?? 0) > 1)
+                        if((this.stateManager.assemblyModelSate.getChainInfo()?.operators?.length ?? 0) > 1)
                             return {
                                 operatorIds: operator?.ids
                             }
                     },
-                    filterInstances: assemblyInstances.get(this.assemblyModelSate.getString("entryId")),
+                    filterInstances: assemblyInstances.get(this.stateManager.assemblyModelSate.getString("entryId")),
                     selectButtonOptionProps: (props: SelectOptionProps) => (
                         <div style={{display: 'flex'}}>
                             <ChainDisplayComponent structureViewer={this.plugin} label={props.data.label}/>
@@ -116,14 +115,14 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
             );
         }
         if(!config.defaultAuthId)
-            await createComponents<R>(this.plugin, this.assemblyModelSate.getMap());
+            await createComponents<R>(this.plugin, this.stateManager.assemblyModelSate.getMap());
         return this.module;
     }
 
     private addOperatorButton(operatorName?: string): void{
-        const currentChainInfo: ChainInfo|undefined = this.assemblyModelSate.getChainInfo();
+        const currentChainInfo: ChainInfo|undefined = this.stateManager.assemblyModelSate.getChainInfo();
         if(this.useOperatorsFlag && currentChainInfo && currentChainInfo.operators.length >1 ){
-            this.assemblyModelSate.setOperator(undefined,operatorName);
+            this.stateManager.assemblyModelSate.setOperator(undefined,operatorName);
             RcsbFvUI.addSelectButton(
                 this.rcsbFvDivId,
                 RcsbFvDOMConstants.SELECT_BUTTON_PFV_ID,
@@ -132,16 +131,15 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
                     optId:op.name,
                     onChange: async ()=>{
                         this.module?.getFv()?.reset();
-                        this.assemblyModelSate.set({operator:op});
+                        this.stateManager.assemblyModelSate.set({operator:op});
                         await this.create({
-                            modelMap: this.assemblyModelSate.getMap(),
-                            defaultAuthId: this.assemblyModelSate.getChainInfo()?.auth,
+                            defaultAuthId: this.stateManager.assemblyModelSate.getChainInfo()?.auth,
                             defaultOperatorName: op.name
                         })
                     }
                 })),
                 {
-                    defaultValue: this.assemblyModelSate.getOperator()?.name,
+                    defaultValue: this.stateManager.assemblyModelSate.getOperator()?.name,
                     dropdownTitle:this.OPERATOR_DROPDOWN_TITLE
                 }
             );
@@ -156,9 +154,9 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
             (await Promise.all(data.annotations.map(async ann=>{
                 if(ann.source == Source.PdbInterface && ann.target_id && data.rcsbContext?.asymId) {
                     const interfaceToInstance: InterfaceInstanceTranslate = await RcsbRequestContextManager.getInterfaceToInstance(ann.target_id);
-                    if(typeof ann.target_identifiers?.interface_partner_index === "number" && ann.target_identifiers.assembly_id === this.assemblyModelSate.getString("assemblyId") && Array.isArray(interfaceToInstance.getOperatorIds(ann.target_id))) {
+                    if(typeof ann.target_identifiers?.interface_partner_index === "number" && ann.target_identifiers.assembly_id === this.stateManager.assemblyModelSate.getString("assemblyId") && Array.isArray(interfaceToInstance.getOperatorIds(ann.target_id))) {
                         const operatorIds:string[][] = interfaceToInstance.getOperatorIds(ann.target_id)[ann.target_identifiers.interface_partner_index];
-                        if(ann.features && this.assemblyModelSate.getOperator() && operatorIds.map(o=>o.join("|")).includes( this.assemblyModelSate.getOperator()!.ids.join("|") )){
+                        if(ann.features && this.stateManager.assemblyModelSate.getOperator() && operatorIds.map(o=>o.join("|")).includes( this.stateManager.assemblyModelSate.getOperator()!.ids.join("|") )){
                             ann.features = ann.features.filter(f=>(f && f.type == FeatureType.BurialFraction));
                             if(ann.features.length > 0)
                                 return ann;

+ 0 - 4
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryInterface.ts

@@ -16,7 +16,6 @@ export interface PfvManagerFactoryConfigInterface<R,U> {
     rcsbFvDivId: string;
     rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     stateManager: RcsbFvStateManager;
-    assemblyModelSate: AssemblyModelSate;
     plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
     boardConfigContainer: DataContainer<Partial<RcsbFvBoardConfigInterface>>;
     pfvChangeCallback(context: U): Promise<void>;
@@ -28,7 +27,6 @@ export interface PfvManagerFactoryInterface<T,R,U> {
 }
 
 export interface BuildPfvInterface {
-    modelMap:SaguaroPluginModelMapType;
     defaultAuthId?: string;
     defaultOperatorName?:string;
 }
@@ -42,7 +40,6 @@ export abstract class AbstractPfvManager<T,R,U> implements PfvManagerInterface {
     protected readonly rcsbFvDivId: string;
     protected readonly rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     protected readonly stateManager: RcsbFvStateManager;
-    protected readonly assemblyModelSate: AssemblyModelSate;
     protected readonly plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
     protected readonly boardConfigContainer: DataContainer<Partial<RcsbFvBoardConfigInterface>>;
     protected readonly pfvChangeCallback: (context: U)=>Promise<void>;
@@ -52,7 +49,6 @@ export abstract class AbstractPfvManager<T,R,U> implements PfvManagerInterface {
         this.rcsbFvDivId = config.rcsbFvDivId;
         this.rcsbFvContainer = config.rcsbFvContainer;
         this.stateManager = config.stateManager;
-        this.assemblyModelSate = config.assemblyModelSate;
         this.plugin = config.plugin;
         this.additionalConfig = config.additionalConfig;
         this.boardConfigContainer = config.boardConfigContainer;

+ 2 - 5
src/RcsbFvSequence/SequenceViews/RcsbView/RcsbView.tsx

@@ -29,7 +29,6 @@ export interface RcsbViewInterface<T,R,U> {
 
 export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {}, R>{
 
-    private readonly assemblyModelSate: AssemblyModelSate = new AssemblyModelSate();
     private boardConfigContainer: DataContainer<Partial<RcsbFvBoardConfigInterface>> = new DataContainer();
     private rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface> = new DataContainer<RcsbFvModulePublicInterface>();
     private readonly callbackManager: CallbackManagerInterface<U>;
@@ -42,7 +41,6 @@ export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {},
             rcsbFvContainer: this.rcsbFvContainer,
             stateManager: this.props.stateManager,
             plugin: this.props.structureViewer,
-            assemblyModelSate: this.assemblyModelSate,
             boardConfigContainer: this.boardConfigContainer,
             rcsbFvDivId: this.rcsbFvDivId,
             pfvChangeCallback: this.pfvChangeCallback.bind(this),
@@ -53,7 +51,6 @@ export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {},
             rcsbFvContainer: this.rcsbFvContainer,
             stateManager: this.props.stateManager,
             plugin: this.props.structureViewer,
-            assemblyModelSate: this.assemblyModelSate,
             pfvFactory: this.pfvFactory
         });
     }
@@ -138,8 +135,8 @@ export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {},
         return void 0;
     }
 
-    async modelChangeCallback(modelMap:SaguaroPluginModelMapType, defaultAuthId?: string, defaultOperatorName?:string): Promise<void> {
-        await this.callbackManager.modelChangeCallback(modelMap, defaultAuthId, defaultOperatorName);
+    async modelChangeCallback(defaultAuthId?: string, defaultOperatorName?:string): Promise<void> {
+        await this.callbackManager.modelChangeCallback(defaultAuthId, defaultOperatorName);
     }
 
     private async pluginSelectCallback(mode:'select'|'hover'): Promise<void> {

+ 1 - 1
src/RcsbFvSequence/SequenceViews/SequenceViewInterface.ts

@@ -4,7 +4,7 @@ export interface SequenceViewInterface {
     structureSelectionCallback(): void;
     structureHoverCallback(): void;
     representationChangeCallback(): void;
-    modelChangeCallback(modelMap:SaguaroPluginModelMapType): void;
+    modelChangeCallback(): void;
     updateDimensions(): void;
     additionalContent(): JSX.Element | null;
 }

+ 1 - 1
src/RcsbFvState/RcsbFvStateInterface.ts

@@ -9,7 +9,7 @@ import {AssemblyModelSate} from "./AssemblyModelSate";
 import {Subscription} from "rxjs";
 
 export type RcsbFvStateType = {
-    type: "selection-change"|"model-change";
+    type: "selection-change"|"hover-change"|"model-change"|"representation-change";
     view: "1d-view" | "3d-view"
 };
 

+ 1 - 1
src/RcsbFvStructure/StructureUtils/MolstarAlignmentLoader.ts

@@ -30,7 +30,7 @@ export class MolstarAlignmentLoader implements StructureLoaderInterface<[ViewerC
             await structureViewer.load({
                 loadMethod: LoadMethod.loadPdbId,
                 loadParams:{
-                    pdbId:pdb.entryId
+                    entryId:pdb.entryId
                 }
             });
             structureViewer.pluginCall(async (plugin)=>{

+ 7 - 6
src/RcsbFvStructure/StructureViewerInterface.ts

@@ -3,6 +3,7 @@ import {StructureRepresentationRegistry} from "molstar/lib/mol-repr/structure/re
 import {ColorTheme} from "molstar/lib/mol-theme/color";
 import {RcsbFvSelectorManager, RegionSelectionInterface} from "../RcsbFvState/RcsbFvSelectorManager";
 import {RcsbFvStateManager} from "../RcsbFvState/RcsbFvStateManager";
+import {Subscription} from "rxjs";
 
 export type ChainType = "polymer"|"water"|"branched"|"non-polymer"|"macrolide";
 export type OperatorInfo = {ids:string[], name: string};
@@ -43,13 +44,13 @@ export interface ViewerManagerFactoryInterface<R,S extends {}> {
 }
 
 export interface ViewerCallbackManagerInterface {
-    setRepresentationChangeCallback(g:()=>void): void;
-    setHoverCallback(g:()=>void): void;
-    setSelectCallback(g:(flag?:boolean)=>void): void;
+    subscribeRepresentationChange(): Subscription;
+    subscribeHover(): Subscription;
+    subscribeSelection(): Subscription;
+    subscribeModelChange(): Subscription;
+    modelChange(): void;
+    unsubscribe(): void;
     pluginCall(f: (plugin: PluginContext) => void): void;
-    setModelChangeCallback(f:(modelMap:SaguaroPluginModelMapType)=>void): void;
-    getModelChangeCallback():(modelMap:SaguaroPluginModelMapType)=>void;
-    unsetCallbacks(): void;
 }
 
 export interface ViewerActionManagerInterface<R> {

+ 6 - 9
src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarActionManager.ts

@@ -38,7 +38,7 @@ export interface LoadMolstarInterface {
 }
 
 interface LoadParams<P=any,S={}> {
-    pdbId?: string;
+    entryId?: string;
     props?: PresetProps;
     matrix?: Mat4;
     url?: string,
@@ -57,16 +57,14 @@ export class MolstarActionManager implements ViewerActionManagerInterface<LoadMo
 
     private readonly innerSelectionFlag: DataContainer<boolean>;
     private readonly modelMapManager: ViewerModelMapManagerInterface<LoadMolstarInterface>;
-    private readonly callbackManager: ViewerCallbackManagerInterface;
     private readonly componentMap: Map<string, StructureComponentRef> = new Map<string, StructureComponentRef>();
     private readonly loadingFlag: DataContainer<boolean>;
 
-    constructor(config:{viewer: Viewer;modelMapManager: ViewerModelMapManagerInterface<LoadMolstarInterface>;innerSelectionFlag: DataContainer<boolean>; loadingFlag: DataContainer<boolean>; callbackManager: ViewerCallbackManagerInterface;}) {
+    constructor(config:{viewer: Viewer;modelMapManager: ViewerModelMapManagerInterface<LoadMolstarInterface>;innerSelectionFlag: DataContainer<boolean>; loadingFlag: DataContainer<boolean>;}) {
         this.viewer = config.viewer;
         this.modelMapManager = config.modelMapManager;
         this.innerSelectionFlag = config.innerSelectionFlag;
         this.loadingFlag = config.loadingFlag;
-        this.callbackManager = config.callbackManager;
     }
 
     async load(loadConfig: LoadMolstarInterface|Array<LoadMolstarInterface>): Promise<void>{
@@ -75,11 +73,11 @@ export class MolstarActionManager implements ViewerActionManagerInterface<LoadMo
             if(checkLoadData(lC)) {
                 if (lC.loadMethod == LoadMethod.loadPdbId) {
                     const config: LoadParams = lC.loadParams as LoadParams;
-                    await this.viewer.loadPdbId(config.pdbId!, {props: config.props, matrix: config.matrix, reprProvider: config.reprProvider, params: config.params});
+                    await this.viewer.loadPdbId(config.entryId!, {props: config.props, matrix: config.matrix, reprProvider: config.reprProvider, params: config.params});
                 } else if (lC.loadMethod == LoadMethod.loadPdbIds) {
                     const config: Array<LoadParams> = lC.loadParams as Array<LoadParams>;
                     await this.viewer.loadPdbIds(config.map((d) => {
-                        return {pdbId: d.pdbId!, config:{props: d.props, matrix: d.matrix, reprProvider: d.reprProvider, params: d.params}}
+                        return {pdbId: d.entryId!, config:{props: d.props, matrix: d.matrix, reprProvider: d.reprProvider, params: d.params}}
                     }));
                 } else if (lC.loadMethod == LoadMethod.loadStructureFromUrl) {
                     const config: LoadParams = lC.loadParams as LoadParams;
@@ -95,7 +93,6 @@ export class MolstarActionManager implements ViewerActionManagerInterface<LoadMo
             }
         }
         this.loadingFlag.set(false);
-        this.callbackManager.getModelChangeCallback()(this.modelMapManager.getChains());
     }
 
     public select(modelId:string, labelAsymId: string, begin: number, end: number, mode: 'select'|'hover', operation:'add'|'set', operatorName?:string): void;
@@ -312,13 +309,13 @@ function checkLoadData(loadConfig: LoadMolstarInterface): boolean{
     const method: LoadMethod = loadConfig.loadMethod;
     const params: LoadParams | Array<LoadParams> = loadConfig.loadParams;
     if( method == LoadMethod.loadPdbId ){
-        if(params instanceof Array || params.pdbId == null)
+        if(params instanceof Array || params.entryId == null)
             throw loadConfig.loadMethod+": missing pdbId";
     }else if( method == LoadMethod.loadPdbIds ){
         if(!(params instanceof Array))
             throw loadConfig.loadMethod+": Array object spected";
         for(const d of params){
-            if(d.pdbId == null)
+            if(d.entryId == null)
                 throw loadConfig.loadMethod+": missing pdbId"
         }
     }else if( method == LoadMethod.loadStructureFromUrl ){

+ 24 - 23
src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarCallbackManager.ts

@@ -31,9 +31,9 @@ export class MolstarCallbackManager implements ViewerCallbackManagerInterface{
     private readonly modelMapManager: Omit<ViewerModelMapManagerInterface<null>,'add'>;
     private readonly innerSelectionFlag: DataContainer<boolean>;
 
-    private selectCallbackSubs: Subscription;
-    private modelChangeCallbackSubs: Subscription;
-    private modelChangeCallback: (chainMap:SaguaroPluginModelMapType)=>void;
+    private selectSubs: Subscription;
+    private hoverSubs: Subscription;
+    private modelChangeSubs: Subscription;
 
     constructor(config:{viewer: Viewer; stateManager: RcsbFvStateManager;loadingFlag: DataContainerReader<boolean>;modelMapManager: Omit<ViewerModelMapManagerInterface<null>,'add'>;innerSelectionFlag: DataContainer<boolean>;}) {
         this.viewer = config.viewer;
@@ -43,11 +43,12 @@ export class MolstarCallbackManager implements ViewerCallbackManagerInterface{
         this.innerSelectionFlag = config.innerSelectionFlag;
     }
 
-    public setRepresentationChangeCallback(g:()=>void){
+    public subscribeRepresentationChange(): Subscription{
+        return new Subscription();
     }
 
-    public setHoverCallback(g:()=>void){
-        this.viewer.plugin.behaviors.interaction.hover.subscribe((r)=>{
+    public subscribeHover(): Subscription{
+        this.hoverSubs = this.viewer.plugin.behaviors.interaction.hover.subscribe((r)=>{
             const sequenceData: Array<SaguaroSet> = new Array<SaguaroSet>();
             const loci:Loci = r.current.loci;
             if(StructureElement.Loci.is(loci)){
@@ -69,12 +70,13 @@ export class MolstarCallbackManager implements ViewerCallbackManagerInterface{
                 }
             }
             this.stateManager.selectionState.setSelectionFromResidueSelection(sequenceData, 'hover', 'structure');
-            g();
+            this.stateManager.next({type:"hover-change", view:"3d-view"});
         });
+        return this.hoverSubs;
     }
 
-    public setSelectCallback(g:(flag?:boolean)=>void){
-        this.selectCallbackSubs = this.viewer.plugin.managers.structure.selection.events.changed.subscribe(()=>{
+    public subscribeSelection(): Subscription {
+        this.selectSubs = this.viewer.plugin.managers.structure.selection.events.changed.subscribe(()=>{
             if(this.innerSelectionFlag.get()) {
                 return;
             }
@@ -155,34 +157,33 @@ export class MolstarCallbackManager implements ViewerCallbackManagerInterface{
                 }
             }
             this.stateManager.selectionState.setSelectionFromResidueSelection(sequenceData, 'select', 'structure');
-            g();
+            this.stateManager.next({type:"selection-change", view:"3d-view"});
         });
+        return this.selectSubs;
     }
 
     public pluginCall(f: (plugin: PluginContext) => void){
         this.viewer.pluginCall(f);
     }
 
-    public setModelChangeCallback(f:(modelMap:SaguaroPluginModelMapType)=>void){
-        this.modelChangeCallback = f;
-        this.modelChangeCallbackSubs = this.viewer.plugin.state.events.object.updated.subscribe((o:{obj: StateObject, action: "in-place" | "recreate"})=>{
+    public subscribeModelChange(): Subscription{
+        this.modelChangeSubs = this.viewer.plugin.state.behaviors.events.object.updated.subscribe(o=>{
             if(this.loadingFlag.get())
                 return;
-            if(o.obj.type.name === "Behavior" && o.action === "in-place") {
-                f(this.modelMapManager.getChains());
-            }else if(o.obj.type.name === "Model" && o.action === "in-place"){
-                f(this.modelMapManager.getChains());
-            }
+            this.modelChange();
         });
+        return this.modelChangeSubs;
     }
 
-    public getModelChangeCallback():(modelMap:SaguaroPluginModelMapType)=>void {
-        return this.modelChangeCallback;
+    public modelChange(): void {
+        this.stateManager.assemblyModelSate.setMap(this.modelMapManager.getChains());
+        this.stateManager.next({type:"model-change", view:"3d-view"});
     }
 
-    public unsetCallbacks(): void {
-        this.selectCallbackSubs?.unsubscribe();
-        this.modelChangeCallbackSubs?.unsubscribe();
+    public unsubscribe(): void {
+        this.selectSubs?.unsubscribe();
+        this.modelChangeSubs?.unsubscribe();
+        this.hoverSubs?.unsubscribe();
     }
 
 

+ 1 - 2
src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarManagerFactory.ts

@@ -35,8 +35,7 @@ export class MolstarManagerFactory implements ViewerManagerFactoryInterface<Load
             viewer: viewer,
             modelMapManager: modelMapManager,
             innerSelectionFlag: innerSelectionFlag,
-            loadingFlag: loadingFlag,
-            callbackManager: callbackManager
+            loadingFlag: loadingFlag
         });
         return {
             actionManager,

+ 7 - 2
src/RcsbFvStructure/StructureViewers/MolstarViewer/MolstarModelMapManager.ts

@@ -1,4 +1,9 @@
-import {ChainInfo, OperatorInfo, SaguaroPluginModelMapType} from "../../StructureViewerInterface";
+import {
+    ChainInfo,
+    OperatorInfo,
+    SaguaroPluginModelMapType,
+    ViewerModelMapManagerInterface
+} from "../../StructureViewerInterface";
 import {PluginContext} from "molstar/lib/mol-plugin/context";
 import {Structure, StructureElement, StructureProperties as SP} from "molstar/lib/mol-model/structure";
 import {StructureRef} from "molstar/lib/mol-plugin-state/manager/structure/hierarchy-state";
@@ -12,7 +17,7 @@ interface LoadParams<P=any,S={}> {
     params?:P;
 }
 
-export class MolstarModelMapManager {
+export class MolstarModelMapManager implements ViewerModelMapManagerInterface<LoadMolstarInterface> {
 
     private readonly viewer: Viewer;
     private readonly modelMap: Map<string,string|undefined> = new Map<string, string>();

+ 18 - 12
src/RcsbFvStructure/StructureViewers/StructureViewer.ts

@@ -15,6 +15,7 @@ import {
 import {StructureRepresentationRegistry} from "molstar/lib/mol-repr/structure/registry";
 import {ColorTheme} from "molstar/lib/mol-theme/color";
 import {RcsbFvStateManager} from "../../RcsbFvState/RcsbFvStateManager";
+import {Subscription} from "rxjs";
 
 
 
@@ -31,6 +32,10 @@ export class StructureViewer<R,S> implements StructureViewerInterface<R,S> {
         const {actionManager,callbackManager} = this.structureViewerManagerFactory.getViewerManagerFactory(stateManager, args);
         this.actionManager = actionManager;
         this.callbackManager = callbackManager;
+
+        this.subscribeSelection();
+        this.subscribeHover();
+        this.subscribeModelChange();
     }
 
     public async clear(): Promise<void>{
@@ -39,6 +44,7 @@ export class StructureViewer<R,S> implements StructureViewerInterface<R,S> {
 
     async load(loadConfig: R|Array<R>): Promise<void>{
       await this.actionManager.load(loadConfig);
+      this.modelChange();
     }
 
     public setBackground(color: number) {
@@ -98,32 +104,32 @@ export class StructureViewer<R,S> implements StructureViewerInterface<R,S> {
         return this.actionManager.displayComponent(componentLabel as any,visibilityFlag as any);
     }
 
-    public setRepresentationChangeCallback(g:()=>void){
-        this.callbackManager.setRepresentationChangeCallback(g);
+    public subscribeRepresentationChange(): Subscription{
+        return this.callbackManager.subscribeRepresentationChange();
     }
 
-    public setHoverCallback(g:()=>void){
-        this.callbackManager.setHoverCallback(g);
+    public subscribeHover(): Subscription {
+        return this.callbackManager.subscribeHover();
     }
 
-    public setSelectCallback(g:(flag?:boolean)=>void){
-        this.callbackManager.setSelectCallback(g);
+    public subscribeSelection(): Subscription {
+        return this.callbackManager.subscribeSelection();
     }
 
     public pluginCall(f: (plugin: PluginContext) => void){
         this.callbackManager.pluginCall(f);
     }
 
-    public setModelChangeCallback(f:(modelMap:SaguaroPluginModelMapType)=>void){
-        this.callbackManager.setModelChangeCallback(f);
+    public subscribeModelChange(): Subscription {
+        return this.callbackManager.subscribeModelChange();
     }
 
-    public getModelChangeCallback(): (modelMap: SaguaroPluginModelMapType) => void {
-        return this.callbackManager.getModelChangeCallback();
+    public modelChange():  void {
+        this.callbackManager.modelChange();
     }
 
-    public unsetCallbacks(): void {
-        this.callbackManager.unsetCallbacks();
+    public unsubscribe(): void {
+        this.callbackManager.unsubscribe();
     }
 
     public resetCamera(): void {

+ 2 - 2
src/examples/css-config/index.ts

@@ -220,10 +220,10 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     loadConfig: {
         loadMethod: LoadMethod.loadPdbIds,
         loadParams: [{
-            pdbId: "1ash",
+            entryId: "1ash",
             id:"1ash_model"
         },{
-            pdbId: "101m",
+            entryId: "101m",
             id:"101m_model",
             matrix:Mat4.ofRows([
                 [-0.7671995717115603, -0.5623954843039239, 0.30840904072376607, 46.883192662113345],

+ 2 - 2
src/examples/external-mapping/index.ts

@@ -32,7 +32,7 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     loadConfig: [{
         loadMethod: LoadMethod.loadPdbId,
         loadParams: {
-            pdbId: "1ash",
+            entryId: "1ash",
             reprProvider: RcsbRepresentationPreset,
             params: {
                 id: "structure_1",
@@ -48,7 +48,7 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     },{
         loadMethod: LoadMethod.loadPdbId,
         loadParams: {
-            pdbId: "101m",
+            entryId: "101m",
             reprProvider: RcsbRepresentationPreset,
             params: {
                 id: "structure_2",

+ 1 - 1
src/examples/multiple-chain/index.tsx

@@ -249,7 +249,7 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     loadConfig: {
         loadMethod: LoadMethod.loadPdbIds,
         loadParams: [{
-            pdbId: "1acb",
+            entryId: "1acb",
             id:"1acb_board"
         }]
     },

+ 1 - 1
src/examples/single-chain/index.ts

@@ -135,7 +135,7 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     loadConfig: {
         loadMethod: LoadMethod.loadPdbIds,
         loadParams: [{
-            pdbId: "1ash",
+            entryId: "1ash",
             id:"1ash_model"
         }]
     },

+ 2 - 2
src/examples/structural-alignment/index.ts

@@ -220,10 +220,10 @@ const molstarConfig: RcsbFvStructureConfigInterface<LoadMolstarInterface,{viewer
     loadConfig: {
         loadMethod: LoadMethod.loadPdbIds,
         loadParams: [{
-            pdbId: "1ash",
+            entryId: "1ash",
             id:"1ash_model"
         },{
-            pdbId: "101m",
+            entryId: "101m",
             id:"101m_model",
             matrix:Mat4.ofRows([
                 [-0.7671995717115603, -0.5623954843039239, 0.30840904072376607, 46.883192662113345],