Skip to content

Named selections

A named selection is a set of atoms and annotations saved under a name. After you name a selection, you can select it again with one click, move it as a unit, give it metadata, and export it, even after you edit the drawing around it. Named selections are saved in the .mkit file.

A named selection stores atoms and separate annotations (arrows, text, brackets, and so on). A bond belongs to it when both of the bond’s atoms do, and lone pairs, radicals, and orbitals go with their atoms. If you delete some members, the named selection keeps the rest.

Resonance sets and visual sets are named selections that group several drawings of one species. How to make them is covered in Views and resonance. The boxes and the panel work the same way for them as for any other named selection; for the differences, see Resonance sets and visual sets.

Select what you want to save, and then do one of the following:

  • In the Collections panel, click + (“Name the current canvas selection”). A row called “Untitled selection” appears, with its name ready to edit. Type a name and press Enter.
  • Right-click the selection and click Name Selection… (for a molecule, Molecule > Name Molecule…; when only annotations are selected, the item is under Arrange). The metadata editor opens, so you can enter the name and other details.
  • Export the selection (File > Export SVG, Export PNG, or Export PDF) with the selection still selected. The selection is saved under the name in Filename, typed or suggested, together with the SVG or PNG options you used.

If the selection is already saved, + tells you its name instead of making a second copy.

Each named selection has a thin violet box around its members, with the name set into the top edge of the box. The boxes are always shown. They are editing aids only and never appear in SVG, PNG, or PDF exports.

To Do this on the canvas
Rename Double-click the name on the box, type, and press Enter. Esc cancels.
Select and move the members Press on the box border and drag. The inside of the box does not respond to clicks, so you can still click individual atoms inside it.
Edit metadata Click the ✎ icon next to the name.
Export Click the ⤓ icon (“Export box as SVG”). Everything in the box is selected, and the SVG export dialog opens, set to export the selection.
Add a structure Drag the structure and release it with the pointer inside the box. A message confirms which named selection it joined. If you drag one box by its border into another, the two merge; Ctrl+Z undoes the move and the merge together.

Box names, tags, and icons keep a readable size as you zoom, and the box outline stays a thin line. When you zoom far out, the ✎ and ⤓ icons and the view labels above each structure (such as LEWIS or VSEPR) fade out, so they do not crowd small boxes.

The name of a visual set’s box carries a bold Vis tag, and the name of a resonance set’s box carries a bold Res tag.

The Collections panel lists the document’s named selections and its animations.

To show or hide the panel, click View > Collections Panel; a check mark shows when it is open. Until you choose, the panel opens by itself when a document has named selections or animations and closes when the last one is deleted. After you show or hide it yourself, it stays that way for all documents. This setting does not affect the boxes on the canvas.

To fold the panel to its header, click the header. The panel shares the panel column with the other panels.

The panel lists named selections and animations together, in alphabetical order by name. A tag in small capitals in front of the name tells the kinds apart: Vis for a visual set, Res for a resonance set, and Ani for an animation. The tags do not affect the order. The Search… box filters the list by name as you type.

To select a named selection’s members and zoom the canvas to them, click its row, or move focus to the row and press Enter. To rename it in place, double-click the name (Enter saves, Esc cancels). Each row also has two buttons:

Button What it does
✎ Opens the metadata editor (“Edit metadata”, “Edit visual set”, or “Edit resonance set”).
✕ Deletes the named selection. The drawing does not change, and Ctrl+Z brings the named selection back. Deleting a visual set removes only the grouping; each structure keeps its view label.

When the canvas selection matches a named selection, its row is highlighted and scrolled into view.

An animation’s row works the same way. Clicking it selects everything in the animation’s states and zooms to them, and double-clicking the name renames the animation. Its ✎ button opens the animation’s properties, its ⧉ button duplicates the animation beside the original, and its ✕ button deletes the animation; the molecules stay on the canvas, and Ctrl+Z brings the animation back. See Several animations in one document.

To change what a named selection contains, click its row to select its members, add to or take from the selection on the canvas, and then click the check mark button (“Update this name’s members to the current canvas selection”). The new selection must still hold at least one of the old members; for an entirely new set, name it with the plus button instead.

The update applies to the named selection that the current selection matches. If you have already changed the selection so that it no longer matches, the panel asks you to select the saved selection again first. To add a single structure, it is usually quicker to drag it into the box on the canvas.

The Collections panel with its plus and check buttons, a search box, and three named molecules: ammonia, methane, and water.
The Collections panel, listing a document's named selections in alphabetical order.

A few box and panel behaviors apply only to sets:

  • Each drawing in a visual set has a blue view label at its upper left, such as LEWIS, VSEPR, CONDENSED, BONDLINE, FISCHER, or ORBITALS for a drawing that has an orbital picture. A Lewis drawing adds its layout, as in LEWIS (SQUARE) or LEWIS (ANGLED), when it is the set’s only Lewis drawing or the set holds both layouts; the forms of a resonance set drawn in one layout read just LEWIS. A planar drawing that serves as both reads LEWIS + VSEPR. Like the boxes, the labels are not exported.
  • A set can hold several orbital pictures of the species. They are numbered pictures of one view, not resonance forms, so they get no Res box and no weights. While a drawing has an orbital picture, you cannot change its view in the metadata editor. When you add or remove a picture, the drawing’s view label changes to match, and one undo reverses both.
  • Drawings in the same view inside a visual set get a dashed inner box tagged Res. To take them out as a separate resonance set, drag that inner box by its border out of the visual set.
  • Opens on in the metadata editor sets which view the Molkit Viewer shows first when the set is embedded in a web page. On the canvas, that view’s label has an asterisk.
  • Dragging a structure into a visual set’s box adds it as a new drawing, labeled with the view that Molkit detects from its geometry.
  • Deleting a visual set in the panel removes only the grouping; each drawing keeps its view label.
  • When you use Derive View on a structure in a named selection or a set, Molkit places the new drawing at the right end of the box and adds it there as a new form. A named molecule that gains a derived view this way becomes a visual set. See Derive view.
  • To export one named selection, click its ⤓ icon on the canvas, or click its row and use Export > As SVG… or As PNG… from the right-click menu. The export dialog suggests the selection’s name as the filename.
  • File > Batch Export exports every named selection you select in its list, as SVG, PNG, or both, one file for each named selection, named after it. It uses the options last used for each selection. Files go to a folder you choose where the browser allows it; otherwise they download as a ZIP file. See Batch export.

See Export an SVG for the export options.

Named selections are separate from groups: a group changes how clicks select objects, while a named selection only remembers a set. For groups, see Layers and groups.