Skip to main content

Module nodes

Module nodes 

Source
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.

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:

  1. check the type and the params and act only on correct parent nodes
  2. because of 1, we return Option<>
  3. If a node is returned is it &mut Node

Structs§

CameraParams
CanvasParams
ColorFromSourceParams
ColorFromUriParams
ColorInlineParams
ComponentExpression
Component Expresssion
ComponentFromSourceParams
ComponentFromUriParams
ComponentInlineParams
DataFromSourceParams
DataFromUriParams
DownloadParams
FocusInlineParams
IsoSurfaceParams
Params for an isosurface volume representation.
LabelFromSourceParams
LabelFromUriParams
LabelInlineParams
LineParams
Metadata
Metadata
MvsjFile
A multi-snapshot .mvsj document (a “story”): an ordered sequence of scene states sharing one metadata block, as produced by tools like mol-view-stories.
Node
Node
ParseParams
RepresentationParams
Snapshot
A single scene state within a MvsjFile snapshot sequence.
SphereParams
State
This is the base MolViewSpec object containing the root node and the metadata
StructureParams
Structure Params
TooltipFromSourceParams
TooltipFromUriParams
TooltipInlineParams
TransformParams
VolumeParams
Params for a Volume node — parallel to StructureParams, references volumetric data (e.g. a CCP4/MRC/DSN6 electron-density or EM map) parsed from a Download+Parse pair.
VolumeRepresentationParams

Enums§

ColorNamesT
Color Names
ColorT
Color Type: Named or Hex
ColorThemeT
Color theme applied to a representation as a whole.
ComponentSelector
ComponentSelectorT
Component Selector Type
DescriptionFormatT
KindT
NodeParams
ParseFormatT
Types of compounds: for pse I am only using PDB
RepresentationTypeT
Representation Type
SchemaFormatT
SchemaT
StructureTypeT
StructureType. Useful for specifying more complicated sets of structures
VolumeRepresentationTypeT
Type of volume representation: a 3D isosurface or a 2D cross-sectional slice.

Functions§

is_rotation_matrix
Whether t is a 3x3 rotation matrix: nine values whose determinant has magnitude 1 (within 0.005).