Skip to main content

Interface: MolecularSurfaceOptions

Defined in: src/mobjects/molecular/MolecularSurface.ts:154

Options for a MolecularSurface.

Properties​

atoms​

atoms: Atom3DSpec[]

Defined in: src/mobjects/molecular/MolecularSurface.ts:156

The atoms the surface wraps.


chargeRange?​

optional chargeRange: [number, number]

Defined in: src/mobjects/molecular/MolecularSurface.ts:209

Alias of domain, for the charge / electrostatic scales.


charges?​

optional charges: number[]

Defined in: src/mobjects/molecular/MolecularSurface.ts:194

Per-atom partial charge (elementary charge units), parallel to atoms. Used by colorBy: 'charge' and 'electrostatic'. When omitted, the charge comes from each atom's charge field, then (for 'charge') from residueCharge(atom.resName).


color?​

optional color: string

Defined in: src/mobjects/molecular/MolecularSurface.ts:168

The surface color. Default: '#6fa8dc' (a translucent blue).


colorBy?​

optional colorBy: SurfaceColorBy

Defined in: src/mobjects/molecular/MolecularSurface.ts:187

How to color the surface. Default: 'uniform' (the single color). The other modes map a per-vertex scalar through a diverging ramp (blue negative, white neutral, red positive). See SurfaceColorBy.


colorRamp?​

optional colorRamp: string[]

Defined in: src/mobjects/molecular/MolecularSurface.ts:200

The ramp colors for the diverging scale (low to high). Default: blue / white / red for charge and electrostatic, the hydropathy ramp for hydrophobicity. Ignored when colorScale is given.


colorScale?​

optional colorScale: ColorScale

Defined in: src/mobjects/molecular/MolecularSurface.ts:202

A pre-built ColorScale. Overrides colorRamp, domain and chargeRange.


domain?​

optional domain: [number, number]

Defined in: src/mobjects/molecular/MolecularSurface.ts:207

The scalar domain [min, max] for the diverging scale. Default: symmetric around 0 from the data (charge, electrostatic), or the full hydropathy range.


isoValue?​

optional isoValue: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:177

The iso threshold. Default: 0 (the union-of-spheres surface; a positive value dilates it outward, a negative value shrinks it).


kind?​

optional kind: MolecularSurfaceKind

Defined in: src/mobjects/molecular/MolecularSurface.ts:162

The surface kind. 'vdw' is the union of van der Waals spheres; 'sas' adds a probe radius (the solvent-accessible surface). Default: 'vdw'.


opacity?​

optional opacity: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:170

Opacity from 0 to 1. Translucent so atoms show through. Default: 0.45.


padding?​

optional padding: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:179

Extra space around the atom bounding box. Default: the max atom radius.


probeRadius?​

optional probeRadius: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:164

Probe radius added to each atom for 'sas'. Default: 1.4 (water).


radiusScale?​

optional radiusScale: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:166

Multiplier on every atom's van der Waals radius. Default: 1.


resolution?​

optional resolution: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:172

Marching-cubes grid cells per axis. Default: 48.


scale?​

optional scale: number

Defined in: src/mobjects/molecular/MolecularSurface.ts:181

World scale applied to every atom coordinate and radius. Default: 1.