Skip to main content

Node Reference

Every pipeline node — its purpose, ports, and parameters — generated directly from the pipeline source so it always matches the code. Node type strings and parameter keys are exactly what appears in a serialized .megane.json pipeline.

Data Loading

Load Structure

Loads a molecular structure file. This is the primary data source.

Type: load_structure · Category: Data Loading · Python: megane.LoadStructure

Inputs: none · Outputs: particle (particle), trajectory (trajectory), cell (cell)

ParameterTypeDefaultDescription
fileNamestring | nullnullPath/name of the structure file.
hasTrajectorybooleanfalseWhether the file carries multiple frames.
hasCellbooleanfalseWhether the file carries a unit cell.

Load Trajectory

Loads trajectory data from an external file (e.g. XTC).

Type: load_trajectory · Category: Data Loading · Python: megane.LoadTrajectory

Inputs: particle (particle) · Outputs: trajectory (trajectory)

ParameterTypeDefaultDescription
fileNamestring | nullnullPath/name of the trajectory file (XTC, DCD, NetCDF, LAMMPS dump).
source"file" | "structure""file""file" plays a separately loaded trajectory file; "structure" forwards the frames embedded in the structure file itself (multi-frame XYZ/PDB/.traj), set by the load path when such a file is opened.

Load Vector

Loads per-atom vector data (forces, velocities).

Type: load_vector · Category: Data Loading · Python: megane.LoadVector

Inputs: none · Outputs: vector (vector)

ParameterTypeDefaultDescription
fileNamestring | nullnullPath/name of the per-atom vector file.

Load Volumetric

Loads volumetric scalar-field data (e.g. a Gaussian/VASP CUBE file with electron density or electrostatic potential).

Type: load_volumetric · Category: Data Loading · Python: megane.LoadVolumetric

Inputs: none · Outputs: volumetric (volumetric)

ParameterTypeDefaultDescription
fileNamestring | nullnullPath/name of the CUBE (volumetric) file.

Load Spectrum

Loads a JCAMP-DX spectrum (.jdx / .jcamp) -- IR, NMR, MS, or UV/Vis. A spectrum has no 3D coordinates, so it feeds the Spectrum Plot node rather than the Viewport.

Type: load_spectrum · Category: Data Loading · Python: megane.LoadSpectrum

Inputs: none · Outputs: spectrum (spectrum)

ParameterTypeDefaultDescription
fileNamestring | nullnullPath/name of the JCAMP-DX file.

Streaming

Streams particle/bond/trajectory data in real time over a WebSocket (only available on the standalone megane serve host).

Type: streaming · Category: Data Loading · Python: megane.Streaming · standalone megane serve host only

Inputs: none · Outputs: particle (particle), bond (bond), trajectory (trajectory), cell (cell)

ParameterTypeDefaultDescription
connectedbooleanfalseWhether the stream is currently connected.

Bonds

Add Bond

Detects or infers bonds between atoms.

Type: add_bond · Category: Bonds · Python: megane.AddBonds

Inputs: particle (particle) · Outputs: bond (bond)

ParameterTypeDefaultDescription
bondSource"structure" | "file" | "distance" | "none""distance"How bonds are obtained.

Coordination

Builds directed relationships between center atoms and their bonded neighbors. It consumes Drawing Boundary copies and can add only the periodic neighbor images needed outside the drawing range to complete each visible center.

Type: coordination_generator · Category: Bonds · Python: megane.AddCoordination

Inputs: particle (particle) · Outputs: coordination (coordination), bond (bond)

ParameterTypeDefaultDescription
excludedCentersnumber[][]Atomic numbers excluded from auto-detected center atoms.
excludedLigandsnumber[][]Atomic numbers excluded from auto-detected neighbor atoms.
cutoffTolerancenumber1.15Multiplier on the sum of covalent radii.
boundaryMode"inside" | "complete""complete"complete includes outside periodic neighbors needed by visible centers.

Filtering

Filter

Filters atoms (and optionally bonds) by a selection query. See the "Atom & Bond Selection Query Language" section below for the full, authoritative grammar — only the syntax documented there is supported.

Type: filter · Category: Filtering · Python: megane.Filter

Inputs: in (particle) · Outputs: out (particle)

ParameterTypeDefaultDescription
querystring""Atom selection query (see the selection language).
bond_query?string""Optional bond selection query.

Processing

Modify

Modifies visual properties (scale, opacity).

Type: modify · Category: Processing · Python: megane.Modify

Inputs: in (particle) · Outputs: out (particle)

ParameterTypeDefaultDescription
scalenumber1.0Atom size multiplier.
opacitynumber1.0Transparency, 0–1.

Symmetry

Expands a crystallographic asymmetric unit into the full unit cell by applying the space-group symmetry operations the parser captured on the structure (a CIF _symmetry_equiv_pos_as_xyz loop). Bonds are replicated per image and coinciding images (special positions) are dropped. Structures without symmetry operations or without a unit cell pass through unchanged.

Type: symmetry · Category: Processing · Python: megane.Symmetry

Inputs: particle (particle), trajectory (trajectory) · Outputs: particle (particle), trajectory (trajectory)

ParameterTypeDefaultDescription
mode"expand" | "none""expand"Apply the space-group operations, or pass the asymmetric unit through.

Wrap / Unwrap

Toggles periodic-image coordinate mapping for the particle stream (and its trajectory). "wrap" folds every atom back into the home unit cell; "unwrap" makes bonded molecules that straddle a periodic face whole again (VESTA/Mercury-style). Requires a unit cell; "none" passes through.

Type: wrap · Category: Processing · Python: megane.Wrap

Inputs: particle (particle), trajectory (trajectory) · Outputs: particle (particle), trajectory (trajectory)

ParameterTypeDefaultDescription
mode"none" | "wrap" | "unwrap""none"Coordinate mapping applied to atoms and trajectory frames.

Replicate

Builds an OVITO/VESTA-style supercell by copying every atom (and its bonds) into an nx × ny × nz grid of cell images and enlarging the simulation cell to match. Requires a unit cell on the input.

Type: replicate · Category: Processing · Python: megane.Replicate

Inputs: particle (particle), cell (cell), trajectory (trajectory) · Outputs: particle (particle), cell (cell), trajectory (trajectory)

ParameterTypeDefaultDescription
nxnumber1Repeats along the a lattice vector (integer ≥ 1).
nynumber1Repeats along the b lattice vector (integer ≥ 1).
nznumber1Repeats along the c lattice vector (integer ≥ 1).

Drawing Boundary

Generates periodic display atoms inside an inclusive fractional range. Unlike Replicate it does not alter the structural atom count or unit cell.

Type: drawing_boundary · Category: Processing · Python: megane.DrawingBoundary

Inputs: particle (particle) · Outputs: particle (particle)

ParameterTypeDefaultDescription
xMinnumber0Lower a-coordinate.
xMaxnumber1Upper a-coordinate.
yMinnumber0Lower b-coordinate.
yMaxnumber1Upper b-coordinate.
zMinnumber0Lower c-coordinate.
zMaxnumber1Upper c-coordinate.

Boundary Completion

Adds bond-connected periodic display atoms outside Drawing Boundary without changing crystallographic coordinates. Finite-component mode deliberately leaves infinite periodic networks unexpanded.

Type: boundary_completion · Category: Processing · Python: megane.BoundaryCompletion

Inputs: particle (particle), bond (bond) · Outputs: particle (particle), bond (bond)

ParameterTypeDefaultDescription
mode"neighbors" | "components""neighbors"Complete one neighbor shell or each finite connected component.

Color

Recolors atoms using a palette mode, overriding the default per-element coloring.

Type: color · Category: Processing · Python: megane.Color

Inputs: in (particle) · Outputs: out (particle)

ParameterTypeDefaultDescription
mode"uniform" | "byElement" | "byResidue" | "byChain" | "byBFactor" | "byProperty" | "illustrative""uniform"Coloring scheme.
uniformColorstring"#ff8800"Hex color used when mode is uniform.
range?[number, number]Value range for continuous palettes (auto-computed if omitted).

Representation

Switches the rendering style for the connected particle stream.

Type: representation · Category: Processing · Python: megane.Representation

Inputs: in (particle) · Outputs: out (particle)

ParameterTypeDefaultDescription
mode"atoms" | "licorice" | "cartoon" | "both" | "surface" | "line" | "illustrative""atoms"Rendering style for the particle stream.

Overlays

Labels

Generates text labels for atoms.

Type: label_generator · Category: Overlays · Python: megane.AddLabels

Inputs: particle (particle) · Outputs: label (label)

ParameterTypeDefaultDescription
source"element" | "resname" | "index""element"Which atom property becomes the label text.

Polyhedra

Converts directed center-neighbor coordination relationships into convex polyhedron meshes. Periodic atom display and completing neighbors outside the drawing range are handled upstream.

Type: polyhedron_generator · Category: Overlays · Python: megane.AddPolyhedra

Inputs: coordination (coordination) · Outputs: mesh (mesh)

ParameterTypeDefaultDescription
opacitynumber0.5Face opacity, 0–1.
showEdgesbooleanfalseDraw polyhedron edges.
edgeColorstring"#dddddd"Hex color for edges.
edgeWidthnumber3Edge line width.

Surface Mesh

Computes an OVITO-style alpha-shape surface envelope around the atoms.

Type: surface_mesh · Category: Overlays · No Python API

Inputs: particle (particle) · Outputs: mesh (mesh)

ParameterTypeDefaultDescription
alphaRadiusnumber3.0Probe sphere radius in Å (larger = smoother/coarser).
colorstring"#4488ff"Hex color of the surface.
opacitynumber0.5Surface transparency, 0–1.

Vectors

Visualizes per-atom vectors (forces, velocities) as arrows.

Type: vector_overlay · Category: Overlays · Python: megane.VectorOverlay

Inputs: vector (vector) · Outputs: vector (vector)

ParameterTypeDefaultDescription
scalenumber1.0Arrow length multiplier.

Isosurface

Renders an isosurface (contour) of volumetric scalar-field data.

Type: isosurface · Category: Overlays · Python: megane.Isosurface

Inputs: volumetric (volumetric), colorVolumetric (volumetric) · Outputs: mesh (mesh)

ParameterTypeDefaultDescription
isoLevelnumber0.05Contour level for the positive surface.
colorstring"#4488ff"Hex color for the positive surface.
opacitynumber0.7Surface transparency, 0–1.
showNegativebooleanfalseAlso draw a surface at −isoLevel.
negativeColorstring"#ff4444"Hex color for the negative surface.
colorMode"solid" | "volume""solid""solid" uses color/negativeColor; "volume" maps vertex colors from the volume connected to the colorVolumetric input.
colormap"rwb" | "bwr" | "rainbow""rwb"Colormap for colorMode "volume" (rwb = red-white-blue, the chemistry ESP convention).
colorRange?[number, number]Explicit [min, max] colormap range; omit for auto (symmetric around 0 for rwb/bwr).

Output

Spectrum Plot

Draws a spectrum as a 2D line chart. Terminal node -- a spectrum has no geometry, so it does not reach the 3D renderer.

Type: spectrum_plot · Category: Output · Python: megane.SpectrumPlot

Inputs: spectrum (spectrum) · Outputs: none

ParameterTypeDefaultDescription
reverseXbooleantrueDraw the abscissa high-to-low, the convention for IR and NMR.
colorstring"#84cc16"Hex stroke colour of the trace.

Viewport

The final rendering sink. Every pipeline MUST have exactly one viewport node. All data flows into this node.

Type: viewport · Category: Output · Python: megane.Viewport

Inputs: particle (particle), bond (bond), cell (cell), trajectory (trajectory), label (label), mesh (mesh), vector (vector) · Outputs: none

ParameterTypeDefaultDescription
perspectivebooleanfalsePerspective projection instead of orthographic.
cellAxesVisiblebooleantrueShow the unit-cell axes.
pivotMarkerVisiblebooleantrueShow the camera pivot marker.