Namespace: $3Dmol

$3Dmol

All of the functionality of $3Dmol.js is contained within the $3Dmol global namespace

Classes

GLModel
GLShape
GLShape
GLViewer
Label
VolumeData

Namespaces

GLDraw

Members

<static> builtinColorSchemes

Properties:
Name Type Description
built

in color schemes The user can pass all of these values directly as the colorscheme and they will use the respective colorscheme

<static> elementColors

Preset element coloring - from individual element colors to entire mappings (e.g. '$3Dmol.elementColors.Jmol' colors atoms with Jmol stylings)

<static> Parsers

$3Dmol.Parsers stores functions for parsing molecular data. They all take a string of molecular data and options. The default behavior is to only read the first model in the case of multimodel files, and all parsers return a list of atom list(s)

$3Dmol.Parsers. corresponds to the parsers for files with extension ext

<static> ssColors

Preset secondary structure color scheme

<static> SurfaceType :number

$3Dmol surface types

Type:
  • number
Properties:
Name Type Default Description
VDW number 1
MS number 2
SAS number 3
SES number 4

<static> syncSurface :boolean

Render surface synchronously if true

Type:
  • boolean

<static> viewers

Contains a dictionary of embedded viewers created from HTML elements with a the viewer_3Dmoljs css class indexed by their id (or numerically if they do not have an id).

Methods

<static> getColorFromStyle(atom, style) → {$3Dmol.Color}

Return proper color for atom given style

Parameters:
Name Type Description
atom AtomSpec
style AtomStyle
Returns:
Type
$3Dmol.Color

<static> getExtent(atomlist) → {Array}

computes the bounding box around the provided atoms

Parameters:
Name Type Description
atomlist Array.<AtomSpec>
Returns:
Type
Array

<static> mergeGeos(geometry, mesh) → {undefined}

Parameters:
Name Type Description
geometry $3Dmol.Geometry
mesh $3Dmol.Mesh
Returns:
Type
undefined

<static> specStringToObject((String)) → {Object}

Parse a string that represents a style or atom selection and convert it into an object. The goal is to make it easier to write out these specifications without resorting to json. Objects cannot be defined recursively. ; - delineates fields of the object : - if the field has a value other than an empty object, it comes after a colon , - delineates key/value pairs of a value object If the value object consists of ONLY keys (no = present) the keys are converted to a list. Otherwise a object of key/value pairs is created with any missing values set to null = OR ~ - separates key/value pairs of a value object, if not provided value is null twiddle is supported since = has special meaning in URLs

Parameters:
Name Type Description
(String)

str

Returns:
Type
Object