3D views on the canvas
A 3D view object is a picture of a molecule in 3D that sits on the canvas and remembers its molecule and its view, so you can turn it again at any time. It is drawn as a vector picture, so it stays sharp when you resize it, export it, or print it. Its box fits the picture closely, and when you turn the view or change its look the box fits the new picture, about the same center.
To make one, right-click a molecule and choose Molecule > 3D View on Canvas. The view is placed beside the molecule and is selected. It opens with its largest ring facing you, turned to match your drawing, and large enough to fill its box; a molecule with no ring faces the way you drew it. You can also send the 3D panel’s current view to the canvas with Capture this view (SVG, Insert on canvas).
To turn a 3D view in place
Section titled “To turn a 3D view in place”- Double-click the 3D view. It becomes a live 3D model in its own box on the canvas.
- Drag to turn it and scroll to zoom it. With the box focused, the arrow keys turn it and + and - zoom it. A small bar under the box chooses the Look, and its View menu turns the model to a named view (Front, Side, Top, Tilted 45 degrees, Level; a crystal has face-on, edge-on, body-diagonal and textbook views).
- Press Esc, click Done, or click anywhere outside the box to finish. The view is saved in one undo step, and the box keeps its size.
While the view is live:
- Delete and the arrow keys never move or delete it.
- The live box does not pan: the picture always fits its molecule, so to move the view, drag it on the canvas.
- More… opens the full editor in the 3D panel, described in the next section.
To turn a 3D view without making it live, hold Alt and drag it on the canvas: dragging left or right turns it about the vertical, up or down about the horizontal, and the front of the molecule follows the pointer. Hold Alt and scroll over it to zoom it. Each drag or scroll is one undo step, and a plain drag still moves the view.
To edit a 3D view in the 3D panel
Section titled “To edit a 3D view in the 3D panel”- Right-click the 3D view and choose Edit 3D View…, or click More… in the live bar. The 3D panel opens showing that view, with a bar at the bottom.
- Turn and zoom the model as usual (see Moving the model).
- Choose a Look: Ball and stick, Space-filling, Stick, Wireframe, or Cartoon. Cartoon is a ball-and-stick model in flat colors with dark outlines, like a textbook line drawing; the panel shows it as ball and stick, and the canvas draws it flat.
- Click Update canvas to update the picture and keep working, or Done (or press Esc) to update it and finish. Done closes the 3D panel if the edit opened it; a panel that was already open stays open. Clicking elsewhere on the canvas, closing the 3D panel, and popping it out also save. Each save is one undo step, and saving with nothing changed adds none.
The picture keeps the panel’s colors and labels as they are when you save: High-contrast colors, or Sync scheme to use your drawing’s element colors (the picture then follows the scheme if you change it), and Element labels. On the canvas, labels name the atoms other than carbon and hydrogen, sit inside their atoms with no background, and never overlap; an atom too small to hold its symbol gets none. Select Label backgrounds in the bar under the view to put the labels on small dark backgrounds instead.
Fade far atoms, in the bar under the view, makes the atoms farther from you paler, toward the picture’s background (white when it has none), so the front of the molecule stands out. It is off unless you turn it on, and it is saved with the view.
Shape and measurements
Section titled “Shape and measurements”While you edit a 3D view, the Shape row under the view changes the molecule’s shape (never its atoms or bonds, which you edit in the drawing) and keeps measurements on the picture. Each change is one undo step.
- Measure: click 2 atoms for a distance, 3 for an angle, or 4 for a dihedral. To keep a distance or an angle without going on, click its last atom again. The value is drawn on the picture, worked out from the shape each time, so it stays right after you turn a bond or minimize. A view keeps up to 12; remove one with its × in the list.
- Turn bond: click the two atoms of a single bond, then drag the slider. The smaller side of the molecule turns, as on a model kit. A double bond or a bond in a ring cannot turn. A positive turn turns the second atom’s side clockwise as seen from the first atom along the bond, so the dihedral through the bond grows by that much (the IUPAC sign).
- Flip ring: click an atom of a six-membered ring of single bonds. The ring flips to its other chair: axial groups become equatorial and the reverse, each staying on its side of the ring, so the stereochemistry is kept. MMFF94 then relaxes the shape. Fused rings such as decalin do not flip: trans-fused rings are locked, and a cis-fused pair flips both rings at once, which Molkit does not do; the hint says which case applies.
- Minimize relaxes the shape with MMFF94 in the browser; Minimize (xTB) uses GFN2-xTB and needs the calculation helper. The view keeps its angle.
- Conformers lists up to 10 shapes of the molecule relaxed with MMFF94, the lowest energy first. Click one to use it.
A dihedral uses the IUPAC sign: positive when the front bond turns clockwise onto the back one. If the molecule’s structure changes later, the 3D view is rebuilt from the drawing and its shape is reset; measurements stay on the same drawn atoms.
In a script: change water-3d measure: [2, 1, 3] minimize: mmff, change butane-3d turn: [2, 3] turn-by: 60, flip: 2, conformer: 1, and measures: off; describe lists the atom numbers (see Commands).
Layers on a 3D view
Section titled “Layers on a 3D view”While you edit a 3D view, the Show row under the view adds layers to the picture. Each change is one undo step, and the 3D panel shows the layers too.
-
Hydrogens: clear the box to hide the hydrogen atoms. The molecule keeps its size, and the box fits what is left.
-
VSEPR lone pairs (model): draws each lone pair as a lobe with its two electrons, where the VSEPR model puts it: in water, two lobes completing the tetrahedron; in XeF4, one above and one below the square. Lobes are drawn on the central atoms; a molecule with no central atom, such as HF, shows them all. Select on every atom to draw them on the terminal atoms too, such as the three on each F of XeF4. The counts come from your drawing, so a lone pair you drew in a Lewis structure is the one shown. This is a model of where the electron pairs are, not a computed orbital.
-
Dipole: draws the net dipole as an arrow toward the negative end, at the view’s own shape. Molkit works it out in the browser at once from Gasteiger charges. A more accurate B3LYP/def2-SVP dipole needs the calculation helper. The hint under the row gives the size in debye and the method, and
describesays them too. An ion has no single dipole, so nothing is drawn. An arrow that points straight at you is too short to see; turn the view. -
Vibration: choose a band of the molecule’s IR spectrum to draw it as a still picture: an arrow on each atom that moves, the longest about a bond long. The list is empty until you compute the spectrum (Compute > IR Spectrum…); the spectrum keeps its vibrations for molecules of up to 40 atoms.
-
ESP map: draws the molecule’s electrostatic potential map over the 3D view, at its angle, in the colors and settings of the 3D panel’s map. The map is a surface that only a 3D viewer can draw, so with the map on, the 3D view’s picture is an image of the 3D scene rather than lines, and it is drawn again whenever you turn the view or change a layer. The box is available once the molecule has a map (see Electrostatic potential maps).
-
Surface: draws a see-through surface over the model: van der Waals (each atom’s radius), Solvent-accessible (where the center of a water molecule can reach, a 1.4 angstrom probe), or Molecular (a smooth surface that rounds the crevices between atoms, close to the surface a water molecule touches). As with the ESP map, the picture becomes an image of the 3D scene, drawn again when you turn the view. A surface and the ESP map take turns: the one you choose last is shown.
-
Hybrid orbitals (textbook): draws the orbitals in place of the ball-and-stick model: a lobe along each bond, the lone pairs, and the p orbitals left over, as the hybridization of each atom in your drawing says (sp to sp3d2). The choices next to it:
- Orbitals: Textbook, or Computed (xTB), which draws the molecule’s computed orbitals, localized into bonds and lone pairs. Computed (xTB) needs the calculation helper. Radicals and very large molecules are refused with the reason, and the textbook orbitals stay. With computed orbitals, Show chooses Bonds and lone pairs or one molecular orbital, from HOMO-5 to LUMO+2, each listed with its energy in eV and drawn in its two phases. Point at an orbital to see a card that names it; with computed orbitals the card also gives the computed hybrid and its s and p shares next to the textbook label. The hint also says how many electrons the level holds. When levels lie very close in energy (the two pi* orbitals of O2 drawn with a double bond, for example), the calculation can spread a pair over them, so a level holds 1 electron or a fraction. The hint then says the level is partly filled, and HOMO names the highest level that holds any electrons.
- Colors and Finish: the palette (Textbook, All orange, Red / blue phases, Color-blind safe, Grayscale (print)) and the surface (Semi-soft by default, Matte, Soft, Glossy, Satin).
- End atoms: how an atom with one bond is drawn. Unhybridized (the default) gives it a plain s or p orbital pointing at its partner; sp gives it an sp hybrid; By domains hybridizes it from its electron domains, the same way as a central atom. In a script:
terminal: sp(orao,full). - Model, for a molecule such as SF6, PF5 or XeF2: Expanded octet (sp3d2 and sp3d hybrids) or Octet, which draws each straight F–X–F line as one p orbital shared by three atoms (a three-center four-electron bond) and uses no d orbitals.
- When a structure is drawn with more double bonds to one sp2 atom than the atom has p orbitals for, as in the expanded-octet O=S=O or SO3, its p orbitals are shown as one delocalized π system. Hover the central atom’s p orbital: the card says how many of the drawn π bonds have no p orbital, and that the textbook model pictures them through d orbitals.
- π, for a molecule with a π system: Separate p, Merged (each π system as one cloud above and below the atoms; it reads Merged (resonance hybrid) when the molecule has resonance forms), or Form 1 of 3, Form 2 of 3, and so on: one resonance form at a time, its π bonds merged and the other p orbitals holding lone pairs or empty. Any other π bond in the molecule stays merged in every form: a separate π system (a C=O beside a nitro group) is drawn as in Merged, and the second π bond of a triple bond stays in place. The forms are offered when the π bonds can sit in more than one place, as in ozone, nitrate, and benzene.
- Twist, for a double bond that can be turned (ethene, propene): turns one end by 30, 60 or 90 degrees. The p orbitals turn with their atoms, their overlap falls with the angle, and at 90 degrees they are crossed: the π bond is broken, which is why a double bond does not rotate.
- Only: keeps the σ bonds, the lone pairs or the π orbitals solid and shows the rest see-through, so a crowded molecule such as SF6 or nitrate shows its bonds. In a script:
show orbitals of: sf6-3d only: bonds. - View: turns the view to the textbook pose, face-on, edge-on, or down the central bond. Build up plays the atomic orbitals mixing into hybrids and the partner atoms moving in. It is offered only for a molecule with a central atom: a diatomic such as N2, O2, or HCl has no hybrids forming on a central atom, so the button is hidden.
Merged clouds, a resonance form, and computed orbitals are surfaces, so with any of them the 3D view’s picture is an image of the 3D scene, as with the ESP map.
Changing the shape (a turn, a minimize, or a rebuild after the molecule changes) works out the lone pairs and the dipole again for the new shape and removes the vibration, which belongs to the old one. Sending the 3D panel’s view to the canvas with Show net dipole on makes a 3D view with its dipole shown.
On a web page that uses the Molkit Viewer, the figure’s 3D view shows the same layers: the 3D view of a visual set, or, when a figure has one 3D view that is in no set, that view, opened at the angle and in the look you saved. With ESP map on, the page opens the 3D view with the live map, when the figure was exported with its map.
In a script, these commands set the layers.
hide hydrogens of: water-3d# add atoms: all for every atomshow lone-pairs of: water-3dshow dipole of: water-3d# the nearest band of the molecule's saved spectrum; run spectrum water firstshow vibration of: water-3d band: 1540show esp of: water-3d# kind: vdw, sas, or msshow surface of: water-3d kind: sasshow orbitals of: ozone-3dhide orbitals of: ozone-3d# a labeled SVG figure of the 3D view's orbitals, for printingexport ozone-3d as: orbitals# lists the layers and the bandsdescribe water-3dshow orbitals of: ozone-3d takes palette:, finish:, model: octet, source: computed (with mo: HOMO for one molecular orbital), pi: merged, form: 2, only: bonds, terminal: sp, or twist: 90 (on a molecule such as ethene); hide orbitals of: ozone-3d takes them off.
On a web page
Section titled “On a web page”On a web page that uses the Molkit Viewer, the figure’s 3D view is live, at the angle and in the look you saved, with its layers.
To choose what a web page plays:
- Edit the 3D view in the 3D panel.
- In the On the web page row under the view, choose Spin (the molecule turns), Vibration (the band chosen in the Show row), or Chair flip (a six-membered ring flips).
- Select Start by itself to play it as the page opens; otherwise the reader presses the play button.
- Loop is on by default, so the motion repeats. Clear it to play the motion once. A chair flip then stops at the other chair, and the button says Play again.
- Click Preview to play it in the 3D panel.
For a chair flip, Molkit works out the path with MMFF94 in the browser. A GFN2-xTB path needs the calculation helper. One ring torsion and then the one opposite it are turned in small steps while everything else relaxes, so the ring goes through the half-chair and the twist-boat to the other chair. One axial hydrogen is colored, so you can watch it become equatorial; the page names the method.
A reader who asks their system for reduced motion never sees it start by itself, and a vibration then shows as its arrows. For that reader, a chair flip’s button shows the other chair as a still picture (Show end), then the first again (Show start).
In Molkit’s own animations and in exported pictures and videos the 3D view stays still.
In a script: change cyclohexane-3d play: flip path: mmff (or path: xtb), play: spin loop: off, play: vibration (the band shown with show vibration), autoplay: on, and play: none; describe says what the page plays.
When the molecule changes
Section titled “When the molecule changes”A 3D view follows its molecule. Moving or restyling the drawing changes nothing; changing its atoms or bonds rebuilds the 3D view from the new structure, keeping its look, size, and angle, and the panel’s bar then says it was rebuilt. To keep a 3D view as it is, right-click it and choose Freeze 3D View; Follow the Molecule links it again. If you delete the molecule, the 3D view stays as it was and is frozen; you can still turn it and change its look.
In a script, derive water views: 3d makes the 3D view water-3d, and change water-3d pose: (20, -35, 0) zoom: 1.2 look: stick turns, sizes, and restyles it; linked: off freezes it (see Commands).
In a visual set
Section titled “In a visual set”A visual set can hold a 3D view as one of its views, beside the Lewis structure, the VSEPR sketch and the others.
- To add one, drag the 3D view into the set’s box. Its label in the set reads 3D, and in the set’s Opens on setting you can choose 3D so the figure opens on it.
- A set has one 3D view, of its own molecule. Another 3D view dragged in is refused with a message and stays outside the set.
- To take it out of the set, right-click it and select Remove from Set. It stays on the canvas as a 3D view of its own.
- Deleting the 3D view removes it from the set.
The 3D view still follows its molecule, or can be frozen, as any 3D view.
On a web page, the set’s 3D tab shows that 3D view in 3D, at the angle and in the look you saved, and a figure set to open on 3D opens there.
In a script, derive water views: 3d into: set "Water" puts water in the set and makes water-3d its 3D view, and change set "Water" opens-on: 3d opens the figure on it.