pdbe-molstar
Version:
Molstar implementation for PDBe
70 lines (69 loc) • 4.53 kB
TypeScript
/** Helper functions to allow superposition of complexes */
import { MinimizeRmsd } from 'molstar/lib/mol-math/linear-algebra/3d/minimize-rmsd';
import { PDBeMolstarPlugin } from '../..';
import { QueryParam } from '../../helpers';
export * as Coloring from './coloring';
/** Parameters to `loadComplexSuperposition` */
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).
* It is recommended to provide this for nucleic acids as they don't have mapping in atom_site. */
baseMappings?: {
[]: 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).
* It is recommended to provide this for nucleic acids as they don't have mapping in atom_site. */
otherMappings?: {
[]: QueryParam[];
};
}
/** Result type of `loadComplexSuperposition` */
export interface LoadComplexSuperpositionResult {
/** Structure identifier of the newly loaded complex structure, to refer to this structure later */
id: string;
/** Superposition RMSD, number of aligned residues, and tranform; if superposition was successful */
superposition: SuperpositionResult | undefined;
/** Function that deletes the newly loaded complex structure */
delete: () => Promise<void>;
}
/** Result of superposition procedure */
export interface SuperpositionResult extends MinimizeRmsd.Result {
method: 'uniprot-numbering' | 'sequence-alignment';
accession: string;
}
/** Load a structure, superpose onto the main structure based on Uniprot residue numbers (or seq alignment if numbers not available),
* and optionally apply coloring to show common/additional components.
*
* **Superposition method:**
* Complexes are superposed based on the largest common component (measured the by number of residues) with a UniProt mapping (taken from atom_site mmCIF category).
* In case there are no common components with Uniprot mapping, the largest common component with an Rfam mapping is used (taken from `baseMappings` and `otherMappings` parameters).
* Residue-residue correspondence is determined by UniProt residue numbers (for UniProt mappings) or by sequence alignment (for Rfam mappings).
*
* **Coloring - subcomplexes:**
* Common components are colored by entity; additional components are gray. Components in the subcomplex are slightly darkened.
*
* **Coloring - supercomplexes:**
* Common components are gray; mapped additional components are colored by entity; unmapped additional components are magenta. Components in the supercomplex are slightly darkened.
*/
export declare function loadComplexSuperposition(viewer: PDBeMolstarPlugin, params: LoadComplexSuperpositionParams): Promise<LoadComplexSuperpositionResult>;