molstar
Version:
A comprehensive macromolecular library.
63 lines (62 loc) • 3.73 kB
TypeScript
/**
* Copyright (c) 2023-2025 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Adam Midlik <midlik@gmail.com>
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { Column, Table } from '../../../mol-data/db';
import { Choice } from '../../../mol-util/param-choice';
/** Names of allowed MVS annotation schemas (values for the annotation schema parameter) */
export type MVSAnnotationSchema = Choice.Values<typeof MVSAnnotationSchema>;
export declare const MVSAnnotationSchema: Choice<"atom" | "residue" | "entity" | "chain" | "whole_structure" | "auth_chain" | "auth_residue" | "residue_range" | "auth_residue_range" | "auth_atom" | "all_atomic", "all_atomic">;
/** Represents a set of criteria for selection of atoms in a model (in `all_atomic` schema).
* Missing/undefined values mean that we do not care about that specific atom property. */
export type MVSAnnotationRow = Partial<Table.Row<typeof AllAtomicCifAnnotationSchema>>;
/** Get CIF schema definition for given annotation schema name */
export declare function getCifAnnotationSchema<K extends MVSAnnotationSchema>(schemaName: K): Pick<typeof AllAtomicCifAnnotationSchema, (typeof FieldsForSchemas)[K][number]>;
/** Definition of `all_atomic` schema for CIF (other atomic schemas are subschemas of this one) */
declare const AllAtomicCifAnnotationSchema: {
/** Tag for grouping multiple annotation rows with the same `group_id` (e.g. to show one label for two chains);
* if the `group_id` is not given, each row is processed separately */
group_id: Column.Schema.Str;
label_entity_id: Column.Schema.Str;
label_asym_id: Column.Schema.Str;
auth_asym_id: Column.Schema.Str;
label_seq_id: Column.Schema.Int;
auth_seq_id: Column.Schema.Int;
pdbx_PDB_ins_code: Column.Schema.Str;
/** Minimum label_seq_id (inclusive) */
beg_label_seq_id: Column.Schema.Int;
/** Maximum label_seq_id (inclusive) */
end_label_seq_id: Column.Schema.Int;
/** Minimum auth_seq_id (inclusive) */
beg_auth_seq_id: Column.Schema.Int;
/** Maximum auth_seq_id (inclusive) */
end_auth_seq_id: Column.Schema.Int;
/** Atom name like 'CA', 'N', 'O'... */
label_atom_id: Column.Schema.Str;
/** Atom name like 'CA', 'N', 'O'... */
auth_atom_id: Column.Schema.Str;
/** Element symbol like 'H', 'He', 'Li', 'Be' (case-insensitive)... */
type_symbol: Column.Schema.Str;
/** Unique atom identifier across conformations (_atom_site.id) */
atom_id: Column.Schema.Int;
/** 0-based index of the atom in the source data */
atom_index: Column.Schema.Int;
};
/** Allowed fields (i.e. CIF columns or JSON keys) for each annotation schema
* (other fields will just be ignored) */
declare const FieldsForSchemas: {
whole_structure: "group_id"[];
entity: ("label_entity_id" | "group_id")[];
chain: ("label_asym_id" | "label_entity_id" | "group_id")[];
auth_chain: ("auth_asym_id" | "group_id")[];
residue: ("label_asym_id" | "label_entity_id" | "label_seq_id" | "group_id")[];
auth_residue: ("auth_asym_id" | "auth_seq_id" | "pdbx_PDB_ins_code" | "group_id")[];
residue_range: ("label_asym_id" | "label_entity_id" | "beg_label_seq_id" | "end_label_seq_id" | "group_id")[];
auth_residue_range: ("auth_asym_id" | "beg_auth_seq_id" | "end_auth_seq_id" | "group_id")[];
atom: ("label_asym_id" | "label_atom_id" | "label_entity_id" | "label_seq_id" | "type_symbol" | "group_id" | "atom_id" | "atom_index")[];
auth_atom: ("auth_asym_id" | "auth_atom_id" | "auth_seq_id" | "type_symbol" | "pdbx_PDB_ins_code" | "group_id" | "atom_id" | "atom_index")[];
all_atomic: (keyof typeof AllAtomicCifAnnotationSchema)[];
};
export {};