# 3Dmol.js Documentation for 3Dmol.js. Every page below links to its Markdown source. ## Classes - [Color](https://3dmol.org/doc/color/index.md) - [CustomLinear](https://3dmol.org/doc/customlinear/index.md): Custom linear gradient with colors evenly spaced from min to max. Equal min and max values use the midpoint of the color ramp. An empty palette uses… - [Cylinder](https://3dmol.org/doc/cylinder/index.md) - [GLModel](https://3dmol.org/doc/glmodel/index.md): GLModel represents a group of related atoms, their bonds, styles, and optional trajectory frames. Obtain models from GLViewer.addModel or… - [GLShape](https://3dmol.org/doc/glshape/index.md): A GLShape holds custom geometry such as spheres, arrows, meshes, and isosurfaces. Create it through GLViewer.addShape or a viewer shape helper so it… - [GLViewer](https://3dmol.org/doc/glviewer/index.md): WebGL-based molecular viewer. Create one with createViewer inside a container with a nonzero width and height. Load molecular data with… - [GLVolumetricRender](https://3dmol.org/doc/glvolumetricrender/index.md): A GLVolumetricRender is a "shape" for representing volumetric data as a density distribution. - [GradientType](https://3dmol.org/doc/gradienttype/index.md): Interface for numeric color gradients, including user-defined gradients. - [Label](https://3dmol.org/doc/3dmol/label/index.md): A text label and its rendering resources. Normally created with GLViewer.addLabel. Remove it with GLViewer.removeLabel so the viewer also releases… - [Matrix3](https://3dmol.org/doc/matrix3/index.md) - [Matrix4](https://3dmol.org/doc/matrix4/index.md) - [Quaternion](https://3dmol.org/doc/quaternion/index.md) - [Ray](https://3dmol.org/doc/ray/index.md) - [ROYGB](https://3dmol.org/doc/roygb/index.md): rainbow gradient, but without purple to match jmol Reverse gradients are supported when min>max so that the colors are displayed in reverse order. - [RWB](https://3dmol.org/doc/rwb/index.md): Color scheme red to white to blue, for charges Reverse gradients are supported when min>max so that the colors are displayed in reverse order. - [SceneObjectControls](https://3dmol.org/doc/sceneobjectcontrols/index.md): Map and annotation controls share the manager's change notifications. - [SelectionEditor](https://3dmol.org/doc/selectioneditor/index.md): Searchable checklists keep multi-value selection usable with touch and keyboards. - [Sinebow](https://3dmol.org/doc/sinebow/index.md): rainbow gradient with constant saturation, all the way to purple! Reverse gradients are supported when min>max so that the colors are displayed in… - [Sphere](https://3dmol.org/doc/sphere/index.md) - [StateManager](https://3dmol.org/doc/statemanager/index.md): Owns UI appearance layers without taking ownership of the rest of the scene. Each enabled selection replaces the styles on its atoms, in list order;… - [Surface](https://3dmol.org/doc/surface/index.md): A surface. - [TrajectoryControls](https://3dmol.org/doc/trajectorycontrols/index.md): Accessible transport controls for the frames of all models in a viewer. - [Triangle](https://3dmol.org/doc/triangle/index.md): plane specified by three points - [UI](https://3dmol.org/doc/ui/index.md): Guided controls for an existing viewer, supplied by the optional 3Dmol.ui bundle. Load that bundle after the core browser bundle and construct a… - [Vector2](https://3dmol.org/doc/vector2/index.md) - [Vector3](https://3dmol.org/doc/vector3/index.md) - [VolumeData](https://3dmol.org/doc/volumedata/index.md): A scalar grid parsed from a density or potential map. Use GLViewer.addIsosurface to draw a contour or GLViewer.addVolumetricRender to display a… ## Namespaces - [GLDraw](https://3dmol.org/doc/gldraw/index.md): Lower level utilities for creating WebGL shape geometries. These are not intended for general consumption. ## Interfaces - [AmbientOcclusionStyle](https://3dmol.org/doc/ambientocclusionstyle/index.md): AmbientOcclusion style configuration parameters - [ArrowSpec](https://3dmol.org/doc/arrowspec/index.md): Arrow shape specification. - [AtomSelectionSpec](https://3dmol.org/doc/atomselectionspec/index.md): Atom selection object. Used to specify what atoms should be selected. Can include any field from AtomSpec in which case atoms must equal the… - [AtomSpec](https://3dmol.org/doc/atomspec/index.md): Atom representation. Coordinates are in angstroms. Depending on the input file format, not all fields may be defined. Use index for positions in a… - [AtomStyleSpec](https://3dmol.org/doc/atomstylespec/index.md): Atom style specification - [BondStyle](https://3dmol.org/doc/bondstyle/index.md): Style override for one entry in an atom's bonds array. Atom line or stick styles must also be enabled for the corresponding representation to appear. - [BoxSpec](https://3dmol.org/doc/boxspec/index.md): Box shape specification. - [BuildInfo](https://3dmol.org/doc/buildinfo/index.md): Information identifying the source used to build this library. - [CartoonStyleSpec](https://3dmol.org/doc/cartoonstylespec/index.md): A visualization of protein or nucleic acid secondary structure. Applying this to other molecules will not show anything. In nucleic acids, the base… - [ClickSphereStyleSpec](https://3dmol.org/doc/clickspherestylespec/index.md): Invisible click sphere style specification. This lets you set larger (or smaller) click targets on atoms than the default radii or have clickable… - [Colored](https://3dmol.org/doc/colored/index.md): RGB components in the range 0 to 1. Set opacity separately in the relevant style. - [CrossStyleSpec](https://3dmol.org/doc/crossstylespec/index.md): Cross style specification - [CurveSpec](https://3dmol.org/doc/curvespec/index.md): Curve shape specification. - [CustomShapeSpec](https://3dmol.org/doc/customshapespec/index.md): Specification for adding custom shape. - [CylinderSpec](https://3dmol.org/doc/cylinderspec/index.md): Cylinder shape specification. - [DashedBondSpec](https://3dmol.org/doc/dashedbondspec/index.md): Dashed Bond style specification - [FogSpec](https://3dmol.org/doc/fogspec/index.md): Fog specification. - [IsoSurfaceSpec](https://3dmol.org/doc/isosurfacespec/index.md): Isosurface style specification - [LabelSpec](https://3dmol.org/doc/labelspec/index.md): Text label appearance and placement. Pixel sizes are logical display pixels; resolution increases texture detail without changing the displayed… - [LineSpec](https://3dmol.org/doc/linespec/index.md): Line shape specification. Default to wireframe. - [LineStyleSpec](https://3dmol.org/doc/linestylespec/index.md): Line style specification - [OutlineStyle](https://3dmol.org/doc/outlinestyle/index.md): Outline style configuration parameters - [PickingIntersection](https://3dmol.org/doc/pickingintersection/index.md): Ray intersection with a clickable or hoverable atom or shape. - [ShapeSpec](https://3dmol.org/doc/shapespec/index.md): GLShape style specification - [SphereSpec](https://3dmol.org/doc/spherespec/index.md): Sphere shape specification. Extends ShapeSpec. - [SphereStyleSpec](https://3dmol.org/doc/spherestylespec/index.md): Sphere (spacefill) style specification - [StickStyleSpec](https://3dmol.org/doc/stickstylespec/index.md): Stick (cylinder) style specification - [SurfaceStyleSpec](https://3dmol.org/doc/surfacestylespec/index.md) - [TrajectorySettings](https://3dmol.org/doc/trajectorysettings/index.md): Playback settings read and updated through the optional UI controls. - [UIConfig](https://3dmol.org/doc/uiconfig/index.md): Configuration for StateManager and its optional UI controls. - [UIControlOptions](https://3dmol.org/doc/uicontroloptions/index.md): Availability of the optional viewer controls. Disabling controls does not remove models. - [UIModelSource](https://3dmol.org/doc/uimodelsource/index.md): Describes a user-requested load without prescribing how an embedding stores it. - [UnitCellStyleSpec](https://3dmol.org/doc/unitcellstylespec/index.md): Style specification for a unit cell shape. - [ViewerGridSpec](https://3dmol.org/doc/viewergridspec/index.md): Grid GLViewer input specification - [ViewerSpec](https://3dmol.org/doc/viewerspec/index.md): GLViewer input specification - [ViewStyle](https://3dmol.org/doc/viewstyle/index.md): View style configuration - [VolumetricRendererSpec](https://3dmol.org/doc/volumetricrendererspec/index.md): Style for GLViewer.addVolumetricRender. Unlike an isosurface, volume rendering accumulates color and opacity along viewing rays through the grid. - [WithinSelectionSpec](https://3dmol.org/doc/withinselectionspec/index.md): Within selection object. Used to find the subset of an atom selection that is within some distance from another atom selection. When added as a… - [XYZ](https://3dmol.org/doc/xyz/index.md): A three-component coordinate or vector. Plain objects are accepted; a Vector3 instance is not required. Units depend on the consuming API: molecular… ## Typedefs - [ColorschemeSpec](https://3dmol.org/doc/colorschemespec/index.md): Atom coloring by a built-in scheme name, a numeric property gradient, or a discrete property-to-color map. Property lookup checks atom.properties… - [ColorSpec](https://3dmol.org/doc/colorspec/index.md): Color representation: a packed RGB number such as 0xff0000, an HTML color name, a hex string such as #ff0000 or #f00, an rgb(...) string, or an… - [GradientSpec](https://3dmol.org/doc/gradientspec/index.md): Gradient specification. ## Globals - [Globals](https://3dmol.org/doc/global/index.md) ## Tutorials - [Using 3Dmol within your code](https://3dmol.org/doc/tutorials/code/index.md) - [Embedding a 3Dmol Viewer](https://3dmol.org/doc/tutorials/embeddable/index.md) - [3Dmol Tutorials - Home](https://3dmol.org/doc/tutorials/home/index.md) - [Active Learning with 3Dmol.js](https://3dmol.org/doc/tutorials/learning-environment/index.md) - [Viewing Molecules with the 3Dmol Server](https://3dmol.org/doc/tutorials/url/index.md) ## Parsers - [FileFormats](https://3dmol.org/doc/fileformats/index.md): Molecular structure formats accepted by GLViewer#addModel and GLModel#addMolData. These are distinct from the density-map formats accepted by… - [ParserOptionsSpec](https://3dmol.org/doc/parseroptionsspec/index.md): Options for reading molecular structures with GLViewer.addModel or GLModel.addMolData. Options are format-dependent; unsupported options have no… ## Optional - [Site home](https://3dmol.org/doc/): the rendered documentation site