* Moved MVS extension from mol-view-spec repo * Viewer supports URL params mvs-url, mvs-data, mvs-format * Tests * MVS sanity checks * MVS extension: drag-and-drop support * mvs-render try1 * Example CLI utility mvs-render * Example CLI utility mvs-validate * MVS extension: renaming * MVS extension: fixed FOV in mvs-render * Moved stuff to mol-util/array.ts * Moved stuff to mol-util/object.ts * MVS extension: renamed `additions` to `components` * MVS extension: trying plugin.managers.camera.focusSphere * MVS extension: refactor focus * MVS extension: fixed label color once again * MVS extension: camera position adjustment (compensate FOV differences) * Fixed formula for camera focus in orthographic mode * Moved Choice to mol-util/param-choice.ts * Moved stuff to mol-util/json.ts * Object.hasOwn polyfill * MVS extension: small refactor * Fixed bug in hashString
20 KiB
(This documentation was auto-generated by the treeSchemaToMarkdown function)
Tree schema:
-
root[Root of the tree must be of this kind]
Auxiliary node kind that only appears as the tree root.
Parent: none
Params: none
-
downloadThis node instructs to retrieve a data resource.
Parent:
rootParams:
-
url:stringURL of the data resource.
-
-
parseThis node instructs to parse a data resource.
Parent:
downloadParams:
-
format:"mmcif" | "bcif" | "pdb"Format of the input data resource.
-
-
structureThis node instructs to create a structure from a parsed data resource. "Structure" refers to an internal representation of molecular coordinates without any visual representation.
Parent:
parseParams:
-
kind:"model" | "assembly" | "symmetry" | "symmetry_mates"Type of structure to be created (
"model"for original model coordinates,"assembly"for assembly structure,"symmetry"for a set of crystal unit cells based on Miller indices,"symmetry_mates"for a set of asymmetric units within a radius from the original model). -
block_header?:string | nullHeader of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF). If
null, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF and
block_headerisnull).Default:
0 -
model_index?:Integer0-based index of model in case the input data contain multiple models.
Default:
0 -
assembly_id?:string | nullAssembly identifier (only applies when
kindis"assembly"). Ifnull, the first assembly is selected.Default:
null -
radius?:numberDistance (in Angstroms) from the original model in which asymmetric units should be included (only applies when
kindis"symmetry_mates").Default:
5 -
ijk_min?:[Integer, Integer, Integer]Miller indices of the bottom-left unit cell to be included (only applies when
kindis"symmetry").Default:
[-1, -1, -1] -
ijk_max?:[Integer, Integer, Integer]Miller indices of the top-right unit cell to be included (only applies when
kindis"symmetry").Default:
[1, 1, 1]
-
-
transformThis node instructs to rotate and/or translate structure coordinates.
Parent:
structureParams:
-
rotation?:Array<number>Rotation matrix (3x3 matrix flattened in column major format (j*3+i indexing), this is equivalent to Fortran-order in numpy). This matrix will multiply the structure coordinates from the left. The default value is the identity matrix (corresponds to no rotation).
Default:
[1, 0, 0, 0, 1, 0, 0, 0, 1] -
translation?:[number, number, number]Translation vector, applied to the structure coordinates after rotation. The default value is the zero vector (corresponds to no translation).
Default:
[0, 0, 0]
-
-
componentThis node instructs to create a component (i.e. a subset of the parent structure).
Parent:
structureParams:
-
selector:("all" | "polymer" | "protein" | "nucleic" | "branched" | "ligand" | "ion" | "water") | Partial<{ label_entity_id: string, label_asym_id: string, auth_asym_id: string, label_seq_id: Integer, auth_seq_id: Integer, pdbx_PDB_ins_code: string, beg_label_seq_id: Integer, end_label_seq_id: Integer, beg_auth_seq_id: Integer, end_auth_seq_id: Integer, label_atom_id: string, auth_atom_id: string, type_symbol: string, atom_id: Integer, atom_index: Integer }> | Array<Partial<{ label_entity_id: string, label_asym_id: string, auth_asym_id: string, label_seq_id: Integer, auth_seq_id: Integer, pdbx_PDB_ins_code: string, beg_label_seq_id: Integer, end_label_seq_id: Integer, beg_auth_seq_id: Integer, end_auth_seq_id: Integer, label_atom_id: string, auth_atom_id: string, type_symbol: string, atom_id: Integer, atom_index: Integer }>>Defines what part of the parent structure should be included in this component.
Default:
"all"
-
-
component_from_uriThis node instructs to create a component defined by an external annotation resource.
Parent:
structureParams:
-
uri:stringURL of the annotation resource.
-
format:"cif" | "bcif" | "json"Format of the annotation resource.
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"andblock_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"component" -
field_values?:Array<string> | nullList of component identifiers (i.e. values in the field given by
field_name) which should be included in this component. Ifnull, component identifiers are ignored (all annotation rows are included), andfield_namefield can be dropped from the annotation.Default:
null
-
-
component_from_sourceThis node instructs to create a component defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file.
Parent:
structureParams:
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from. If
null, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
block_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from. If
null, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"component" -
field_values?:Array<string> | nullList of component identifiers (i.e. values in the field given by
field_name) which should be included in this component. Ifnull, component identifiers are ignored (all annotation rows are included), andfield_namefield can be dropped from the annotation.Default:
null
-
-
representationThis node instructs to create a visual representation of a component.
Parent:
componentorcomponent_from_uriorcomponent_from_sourceParams:
-
type:"ball_and_stick" | "cartoon" | "surface"Method of visual representation of the component.
-
-
colorThis node instructs to apply color to a visual representation.
Parent:
representationParams:
-
color:HexColor | ("white" | "gray" | "black" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "magenta")Color to apply to the representation. Can be either a color name (e.g.
"red") or a hexadecimal code (e.g."#FF0011"). -
selector?:("all" | "polymer" | "protein" | "nucleic" | "branched" | "ligand" | "ion" | "water") | Partial<{ label_entity_id: string, label_asym_id: string, auth_asym_id: string, label_seq_id: Integer, auth_seq_id: Integer, pdbx_PDB_ins_code: string, beg_label_seq_id: Integer, end_label_seq_id: Integer, beg_auth_seq_id: Integer, end_auth_seq_id: Integer, label_atom_id: string, auth_atom_id: string, type_symbol: string, atom_id: Integer, atom_index: Integer }> | Array<Partial<{ label_entity_id: string, label_asym_id: string, auth_asym_id: string, label_seq_id: Integer, auth_seq_id: Integer, pdbx_PDB_ins_code: string, beg_label_seq_id: Integer, end_label_seq_id: Integer, beg_auth_seq_id: Integer, end_auth_seq_id: Integer, label_atom_id: string, auth_atom_id: string, type_symbol: string, atom_id: Integer, atom_index: Integer }>>Defines to what part of the representation this color should be applied.
Default:
"all"
-
-
color_from_uriThis node instructs to apply colors to a visual representation. The colors are defined by an external annotation resource.
Parent:
representationParams:
-
uri:stringURL of the annotation resource.
-
format:"cif" | "bcif" | "json"Format of the annotation resource.
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"andblock_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"color"
-
-
color_from_sourceThis node instructs to apply colors to a visual representation. The colors are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file.
Parent:
representationParams:
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from. If
null, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
block_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from. If
null, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"color"
-
-
labelThis node instructs to add a label (textual visual representation) to a component.
Parent:
componentorcomponent_from_uriorcomponent_from_sourceParams:
-
text:stringContent of the shown label.
-
-
label_from_uriThis node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an external annotation resource.
Parent:
structureParams:
-
uri:stringURL of the annotation resource.
-
format:"cif" | "bcif" | "json"Format of the annotation resource.
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"andblock_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"label"
-
-
label_from_sourceThis node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file.
Parent:
structureParams:
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from. If
null, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
block_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from. If
null, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"label"
-
-
tooltipThis node instructs to add a tooltip to a component. "Tooltip" is a text which is not a part of the visualization but should be presented to the users when they interact with the component (typically, the tooltip will be shown somewhere on the screen when the user hovers over a visual representation of the component).
Parent:
componentorcomponent_from_uriorcomponent_from_sourceParams:
-
text:stringContent of the shown tooltip.
-
-
tooltip_from_uriThis node instructs to add tooltips to parts of a structure. The tooltips are defined by an external annotation resource.
Parent:
structureParams:
-
uri:stringURL of the annotation resource.
-
format:"cif" | "bcif" | "json"Format of the annotation resource.
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
formatis"cif"or"bcif"andblock_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from (only applies when
formatis"cif"or"bcif"). Ifnull, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"tooltip"
-
-
tooltip_from_sourceThis node instructs to add tooltips to parts of a structure. The tooltips are defined by an annotation resource included in the same file this structure was loaded from. Only applicable if the structure was loaded from an mmCIF or BinaryCIF file.
Parent:
structureParams:
-
schema:"whole_structure" | "entity" | "chain" | "auth_chain" | "residue" | "auth_residue" | "residue_range" | "auth_residue_range" | "atom" | "auth_atom" | "all_atomic"Annotation schema defines what fields in the annotation will be taken into account.
-
block_header?:string | nullHeader of the CIF block to read annotation from. If
null, block is selected based onblock_index.Default:
null -
block_index?:Integer0-based index of the CIF block to read annotation from (only applies when
block_headerisnull).Default:
0 -
category_name?:string | nullName of the CIF category to read annotation from. If
null, the first category in the block is used.Default:
null -
field_name?:stringName of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).
Default:
"tooltip"
-
-
focusThis node instructs to set the camera focus to a component (zoom in).
Parent:
componentorcomponent_from_uriorcomponent_from_sourceParams:
-
direction?:[number, number, number]Vector describing the direction of the view (camera position -> focused target).
Default:
[0, 0, -1] -
up?:[number, number, number]Vector which will be aligned with the screen Y axis.
Default:
[0, 1, 0]
-
-
cameraThis node instructs to set the camera position and orientation.
Parent:
rootParams:
-
target:[number, number, number]Coordinates of the point in space at which the camera is pointing.
-
position:[number, number, number]Coordinates of the camera.
-
up?:[number, number, number]Vector which will be aligned with the screen Y axis.
Default:
[0, 1, 0]
-
-
canvasThis node sets canvas properties.
Parent:
rootParams:
-
background_color:HexColor | ("white" | "gray" | "black" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "magenta")Color of the canvas background. Can be either a color name (e.g.
"red") or a hexadecimal code (e.g."#FF0011").
-