Expand description
This module has functionality to build up MolViewSpec.
MolViewSpec (MVS) is a lightweight, JSON-based specification for describing molecular structures and their visual representation. It is designed to be human-readable, easily shareable, and compatible with various molecular visualization tools.
- MolViewSpec GitHub repository: https://github.com/molstar/mol-view-spec
- MolViewSpec documentation: https://molstar.org/viewer/molviewspec/
- MolStar Viewer (which supports MVS): https://molstar.org/viewer/
We try to adhere very closely to the python library API. Almost all the action happens
on the Nodes. Because we are building a nested tree of data, we need most of the parts to
be mutable and you can see almost all the function calls:
- check the type and the params and act only on correct parent nodes
- because of 1, we return
Option<> - If a node is returned is it
&mut Node
Structs§
- Camera
Params - Canvas
Params - Color
From Source Params - Color
From UriParams - Color
Inline Params - Component
Expression - Component Expresssion
- Component
From Source Params - Component
From UriParams - Component
Inline Params - Data
From Source Params - Data
From UriParams - Download
Params - Focus
Inline Params - IsoSurface
Params - Params for an isosurface volume representation.
- Label
From Source Params - Label
From UriParams - Label
Inline Params - Line
Params - Metadata
- Metadata
- Mvsj
File - A multi-snapshot
.mvsjdocument (a “story”): an ordered sequence of scene states sharing one metadata block, as produced by tools like mol-view-stories. - Node
- Node
- Parse
Params - Representation
Params - Snapshot
- A single scene state within a
MvsjFilesnapshot sequence. - Sphere
Params - State
- This is the base MolViewSpec object containing the root node and the metadata
- Structure
Params - Structure Params
- Tooltip
From Source Params - Tooltip
From UriParams - Tooltip
Inline Params - Transform
Params - Volume
Params - Params for a
Volumenode — parallel toStructureParams, references volumetric data (e.g. a CCP4/MRC/DSN6 electron-density or EM map) parsed from aDownload+Parsepair. - Volume
Representation Params
Enums§
- Color
NamesT - Color Names
- ColorT
- Color Type: Named or Hex
- Color
ThemeT - Color theme applied to a representation as a whole.
- Component
Selector - Component
SelectorT - Component Selector Type
- Description
FormatT - KindT
- Node
Params - Parse
FormatT - Types of compounds: for pse I am only using PDB
- Representation
TypeT - Representation Type
- Schema
FormatT - SchemaT
- Structure
TypeT - StructureType. Useful for specifying more complicated sets of structures
- Volume
Representation TypeT - Type of volume representation: a 3D isosurface or a 2D cross-sectional slice.
Functions§
- is_
rotation_ matrix - Whether
tis a 3x3 rotation matrix: nine values whose determinant has magnitude 1 (within 0.005).