Skip to content

MolViewSpec tree schema v1

This is the exhaustive list of MolViewSpec node kinds, their parameters, and parent-child relationships. Parameters with ?: are optional, i.e. they may be omitted, meaning that the default value should be used. Parameters with : are required, i.e. omitting them will result in an invalid MolViewSpec tree.

This specification is formalized by the OpenAPI JSON schema.

(This document was auto-generated by node lib/commonjs/cli/mvs/mvs-print-schema --markdown in Mol*.)

root

[Root of the tree must be of this kind]

Auxiliary node kind that only appears as the tree root.

Parent: none

Params: none

download

This node instructs to retrieve a data resource.

Parent: root

Params:

  • url:string

    URL of the data resource.

parse

This node instructs to parse a data resource.

Parent: download

Params:

  • format:"mmcif" | "bcif" | "pdb"

    Format of the input data resource.

structure

This 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: parse

Params:

  • type:"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 | null

    Header 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 on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read coordinates from (only applies when the input data are from CIF or BinaryCIF and block_header is null).

    Default: 0

  • model_index?:Integer

    0-based index of model in case the input data contain multiple models.

    Default: 0

  • assembly_id?:string | null

    Assembly identifier (only applies when kind is "assembly"). If null, the first assembly is selected.

    Default: null

  • radius?:number

    Distance (in Angstroms) from the original model in which asymmetric units should be included (only applies when kind is "symmetry_mates").

    Default: 5

  • ijk_min?:[Integer, Integer, Integer]

    Miller indices of the bottom-left unit cell to be included (only applies when kind is "symmetry").

    Default: [-1, -1, -1]

  • ijk_max?:[Integer, Integer, Integer]

    Miller indices of the top-right unit cell to be included (only applies when kind is "symmetry").

    Default: [1, 1, 1]

transform

This node instructs to rotate and/or translate structure coordinates.

Parent: structure

Params:

  • 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]

component

This node instructs to create a component (i.e. a subset of the parent structure).

Parent: structure

Params:

  • 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_uri

This node instructs to create a component defined by an external annotation resource.

Parent: structure

Params:

  • uri:string

    URL 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 | null

    Header of the CIF block to read annotation from (only applies when format is "cif" or "bcif"). If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when format is "cif" or "bcif" and block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from (only applies when format is "cif" or "bcif"). If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name 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> | null

    List of component identifiers (i.e. values in the field given by field_name) which should be included in this component. If null, component identifiers are ignored (all annotation rows are included), and field_name field can be dropped from the annotation.

    Default: null

component_from_source

This 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: structure

Params:

  • 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 | null

    Header of the CIF block to read annotation from. If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from. If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name 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> | null

    List of component identifiers (i.e. values in the field given by field_name) which should be included in this component. If null, component identifiers are ignored (all annotation rows are included), and field_name field can be dropped from the annotation.

    Default: null

representation

This node instructs to create a visual representation of a component.

Parent: component or component_from_uri or component_from_source

Params:

  • type:"ball_and_stick" | "cartoon" | "surface"

    Method of visual representation of the component.

color

This node instructs to apply color to a visual representation.

Parent: representation

Params:

  • color:HexColor | ("aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflower" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "laserlemon" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrod" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "maroon2" | "maroon3" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "purple2" | "purple3" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen")

    Color to apply to the representation. Can be either an X11 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_uri

This node instructs to apply colors to a visual representation. The colors are defined by an external annotation resource.

Parent: representation

Params:

  • uri:string

    URL 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 | null

    Header of the CIF block to read annotation from (only applies when format is "cif" or "bcif"). If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when format is "cif" or "bcif" and block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from (only applies when format is "cif" or "bcif"). If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name 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_source

This 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: representation

Params:

  • 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 | null

    Header of the CIF block to read annotation from. If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from. If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).

    Default: "color"

label

This node instructs to add a label (textual visual representation) to a component.

Parent: component or component_from_uri or component_from_source

Params:

  • text:string

    Content of the shown label.

label_from_uri

This node instructs to add labels (textual visual representations) to parts of a structure. The labels are defined by an external annotation resource.

Parent: structure

Params:

  • uri:string

    URL 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 | null

    Header of the CIF block to read annotation from (only applies when format is "cif" or "bcif"). If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when format is "cif" or "bcif" and block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from (only applies when format is "cif" or "bcif"). If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name 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_source

This 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: structure

Params:

  • 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 | null

    Header of the CIF block to read annotation from. If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from. If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).

    Default: "label"

tooltip

This 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: component or component_from_uri or component_from_source

Params:

  • text:string

    Content of the shown tooltip.

tooltip_from_uri

This node instructs to add tooltips to parts of a structure. The tooltips are defined by an external annotation resource.

Parent: structure

Params:

  • uri:string

    URL 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 | null

    Header of the CIF block to read annotation from (only applies when format is "cif" or "bcif"). If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when format is "cif" or "bcif" and block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from (only applies when format is "cif" or "bcif"). If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name 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_source

This 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: structure

Params:

  • 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 | null

    Header of the CIF block to read annotation from. If null, block is selected based on block_index.

    Default: null

  • block_index?:Integer

    0-based index of the CIF block to read annotation from (only applies when block_header is null).

    Default: 0

  • category_name?:string | null

    Name of the CIF category to read annotation from. If null, the first category in the block is used.

    Default: null

  • field_name?:string

    Name of the column in CIF or field name (key) in JSON that contains the dependent variable (color/label/tooltip/component_id...).

    Default: "tooltip"

focus

This node instructs to set the camera focus to a component (zoom in).

Parent: component or component_from_uri or component_from_source

Params:

  • 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]

camera

This node instructs to set the camera position and orientation.

Parent: root

Params:

  • 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]

canvas

This node sets canvas properties.

Parent: root

Params:

  • background_color:HexColor | ("aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflower" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "laserlemon" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrod" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "maroon2" | "maroon3" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "purple2" | "purple3" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen")

    Color of the canvas background. Can be either an X11 color name (e.g. "red") or a hexadecimal code (e.g. "#FF0011").