Skip to content

Rendering settings

These options control how the 3D structure is rendered.

Render styles

adpRepresentation selects the physical anisotropic-displacement surface:

  • ellipsoid (default) — the conventional equal-probability ellipsoid;
  • rmsd-peanut — a radial RMS displacement surface with r(n) = peanutScale × sqrt(nᵀUn). Its radius has units of length after scaling and must not be interpreted as an enclosed probability.

PEANUT grid density and physical stroke width can be adjusted independently with peanutMeridianCount, peanutLatitudeIntervals, and peanutGridLineWidth. The line width is measured in Å, so its apparent screen width changes naturally with zoom. peanutGridPoleAxis selects either a common structure Y pole or an atom-local maximum, intermediate, or minimum principal-displacement axis.

renderStyle independently selects how that surface is presented (live comparison in Widget → Display options):

  • solid-3d — a smooth, lit solid surface.
  • cutout-3d — a missing-octant ellipsoid, or a solid PEANUT with an orderly surface grid in the element's ringColor.
  • cutout-2d — a hatched ellipsoid cutout, or a PEANUT grid with hidden rear lines removed and a separate expanded silhouette outline. PEANUT grid strokes have a physical structure-space width, while the silhouette keeps a constant screen-space width. Existing publication colour and bond rules apply.

All PEANUT modes use shared sphere topology and instancing. There are no PEANUT cutouts.

renderMode: 'onDemand' (the default) renders only when needed — call viewer.requestRender() after changing external state from your own code; 'constant' renders continuously.

In the cutout styles, sealCutoutCavity (default on) fills the removed octant in the depth buffer so a neighbouring atom or bond that lies inside the carved-open cavity is occluded instead of showing through, while the exposed cross-section stays visible. In both cutout styles, complete ellipsoids are additionally ordered by their nearest camera-facing extent and committed to an ellipsoid-only stencil. The 2D mask includes the expanded outline; the 3D mask follows the exact surface silhouette. Overlapping ellipsoids therefore do not intersect one another, while bonds and isosurfaces continue to use normal physical depth testing.

OptionTypeDefaultDescription
renderModeString"onDemand"Rendering mode, either constant (render continuously) or onDemand (render only when needed; call viewer.requestRender() after external state changes).
renderStyleString"solid-3d"Rendering style: solid-3d (interactive, full ellipsoids), cutout-3d (interactive, camera-facing cutaway octant), or cutout-2d (publication-style, always cutaway). See render styles.
adpRepresentationString"ellipsoid"Anisotropic-displacement surface: ellipsoid for the probability ellipsoid or rmsd-peanut for an RMS displacement PEANUT. The selected renderStyle controls how that surface is presented.
sealCutoutCavityBooleantrueFor the cutout render styles, fills the removed octant in the depth buffer so neighbouring atoms or bonds inside the carved cavity are occluded rather than showing through, while the exposed cross-section stays visible. Set false to keep the cavity see-through.
plot2DBackgroundColor"#ffffff"Canvas background colour for the 2D rendering style.
plot2DAtomColorColor"#ffffff"Opaque atom and open-bond fill colour in the 2D rendering style.
plot2DLineColorColor"#000000"Fallback line and hydrogen-bond colour in the 2D rendering style.
plot2DBondColorColor"#000000"Solid bond and open-bond outline colour in the 2D rendering style.
plot2DBondOutlineColorColor"#ffffff"Colour of the depth-writing silhouette around 2D bonds, used to separate crossing bonds and ADPs. It is inset at connected atoms to keep their silhouettes clean.
plot2DBondOutlineWidthNumber2Constant screen-space width, in CSS pixels, of the depth-writing bond silhouette. Added around every bond regardless of its thickness or the zoom; 0 disables it.
plot2DColorLuminanceCeilingNumber0.25Maximum relative luminance for element-coloured outlines and hatching in cutout-2d. The entire palette is scaled together so hue and relative brightness are preserved.
plot2DColorLuminanceFloorNumber|nullnullWhen set (0–1), replaces the ceiling: the element palette is mixed towards white so its darkest colour reaches this relative luminance — for dark plot2DBackground values. See the default dark theme.
plot2DOpenBondInnerScaleNumber0.5Opaque inner width of open PART 2 bonds relative to a solid bond.
plot2DStripeCountNumber7Number of hatch repeats across each 2D section face.
plot2DStripeWidthNumber0.18Element-coloured line width as a fraction of each repeat.
plot2DOutlineWidthNumber1.2Constant screen-space width, in CSS pixels, of the atom silhouette outline. Uniform across every atom regardless of ellipsoid size or zoom.
fixCifErrorsBooleanfalseWhether to attempt to fix common errors in CIF files before building the structure.