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)
| Parameter | Type | Default | Description |
|---|---|---|---|
fileName | string | null | null | Path/name of the structure file. |
hasTrajectory | boolean | false | Whether the file carries multiple frames. |
hasCell | boolean | false | Whether 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
fileName | string | null | null | Path/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)
| Parameter | Type | Default | Description |
|---|---|---|---|
fileName | string | null | null | Path/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)
| Parameter | Type | Default | Description |
|---|---|---|---|
fileName | string | null | null | Path/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)
| Parameter | Type | Default | Description |
|---|---|---|---|
fileName | string | null | null | Path/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)
| Parameter | Type | Default | Description |
|---|---|---|---|
connected | boolean | false | Whether 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
excludedCenters | number[] | [] | Atomic numbers excluded from auto-detected center atoms. |
excludedLigands | number[] | [] | Atomic numbers excluded from auto-detected neighbor atoms. |
cutoffTolerance | number | 1.15 | Multiplier 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | "" | 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
scale | number | 1.0 | Atom size multiplier. |
opacity | number | 1.0 | Transparency, 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
nx | number | 1 | Repeats along the a lattice vector (integer ≥ 1). |
ny | number | 1 | Repeats along the b lattice vector (integer ≥ 1). |
nz | number | 1 | Repeats 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
xMin | number | 0 | Lower a-coordinate. |
xMax | number | 1 | Upper a-coordinate. |
yMin | number | 0 | Lower b-coordinate. |
yMax | number | 1 | Upper b-coordinate. |
zMin | number | 0 | Lower c-coordinate. |
zMax | number | 1 | Upper 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | "uniform" | "byElement" | "byResidue" | "byChain" | "byBFactor" | "byProperty" | "illustrative" | "uniform" | Coloring scheme. |
uniformColor | string | "#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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
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)
| Parameter | Type | Default | Description |
|---|---|---|---|
opacity | number | 0.5 | Face opacity, 0–1. |
showEdges | boolean | false | Draw polyhedron edges. |
edgeColor | string | "#dddddd" | Hex color for edges. |
edgeWidth | number | 3 | Edge 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
alphaRadius | number | 3.0 | Probe sphere radius in Å (larger = smoother/coarser). |
color | string | "#4488ff" | Hex color of the surface. |
opacity | number | 0.5 | Surface 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
scale | number | 1.0 | Arrow 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)
| Parameter | Type | Default | Description |
|---|---|---|---|
isoLevel | number | 0.05 | Contour level for the positive surface. |
color | string | "#4488ff" | Hex color for the positive surface. |
opacity | number | 0.7 | Surface transparency, 0–1. |
showNegative | boolean | false | Also draw a surface at −isoLevel. |
negativeColor | string | "#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
| Parameter | Type | Default | Description |
|---|---|---|---|
reverseX | boolean | true | Draw the abscissa high-to-low, the convention for IR and NMR. |
color | string | "#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
| Parameter | Type | Default | Description |
|---|---|---|---|
perspective | boolean | false | Perspective projection instead of orthographic. |
cellAxesVisible | boolean | true | Show the unit-cell axes. |
pivotMarkerVisible | boolean | true | Show the camera pivot marker. |