UNPKG

pdbe-molstar

Version:
56 lines (55 loc) 3.58 kB
/** Helper functions to allow superposition of complexes */ import { Structure } from 'molstar/lib/mol-model/structure'; import { PDBeMolstarPlugin } from '../..'; import { QueryParam } from '../../helpers'; import { SuperpositionResult } from './superpose-by-biggest-chain'; export * as Coloring from './coloring'; export interface LoadComplexSuperpositionParams { /** PDB identifier of complex structure */ pdbId: string; /** Assembly identifier */ assemblyId: string; /** Arbitrary string identifier to refer to the newly loaded structure later */ id?: string; /** Duration of camera transition, in milliseconds. Default: 250. Do not use 0 (won't work because of bugs in Molstar), but you can use 1. */ animationDuration?: number; /** Apply coloring to the base structure and newly loaded structure. * 'subcomplex' = color the common components by unique entities (UniProt/Rfam accession); color remaining components by base color (gray). * 'supercomplex' = color the common components by base color (gray); color additional components in the new structure (supercomplex) by unique entities. */ coloring?: 'subcomplex' | 'supercomplex' | undefined; /** List of Uniprot/Rfam accessions in the base complex. Mandatory when `coloring` is not `undefined`. */ baseComponents?: string[]; /** List of Uniprot/Rfam accessions in the newly loaded complex. Mandatory when `coloring` is not `undefined`. */ otherComponents?: string[]; /** Base color for coloring "uninteresting" parts of structures (i.e. subcomplexes: additional components, supercomplexes: common components). Default: gray. */ coreColor?: string; /** Color for coloring unmapped additional components for supercomplexes. */ unmappedColor?: string; /** List of colors for coloring unique entities. */ componentColors?: string[]; /** Optional specification of which parts of the base complex structure belong to individual Uniprot/Rfam accessions (will be inferred from mmCIF atom_site if not provided) */ baseMappings?: { [accession: string]: QueryParam[]; }; /** Optional specification of which parts of the other complex structure belong to individual Uniprot/Rfam accessions (will be inferred from mmCIF atom_site if not provided) */ otherMappings?: { [accession: string]: QueryParam[]; }; /** Superposition method */ method?: 'biggest-matched-chain' | 'molstar-builtin'; } /** Load a structure, superpose onto the main structure based on Uniprot residue numbers, and optionally apply coloring to show common/additional components. */ export declare function loadComplexSuperposition(viewer: PDBeMolstarPlugin, params: LoadComplexSuperpositionParams): Promise<{ /** Structure identifier of the newly loaded complex structure, to refer to this structure later */ id: string; /** Status of pairwise superposition ('success' / 'zero-overlap' / 'failed') */ status: "success" | "zero-overlap" | "failed"; /** Superposition RMSD and tranform (if status is 'success') */ superposition: (import("molstar/lib/mol-math/linear-algebra/3d/minimize-rmsd").MinimizeRmsd.Result & { nAlignedElements: number; }) | undefined; /** Function that deletes the newly loaded complex structure */ delete: () => Promise<void>; }>; /** Superpose mobile structure onto static structure, based on Uniprot residue numbers. */ export declare function superposeStructuresByMolstarDefault(staticStruct: Structure, mobileStruct: Structure): SuperpositionResult;