Skip to content

Copy and paste

Ctrl+C copies the current selection, Ctrl+X cuts it, and Ctrl+V pastes. Molkit also pastes images, SVG, and MOL text from other apps, accepts files dropped on the canvas, and has a separate style clipboard for copying formatting from one object to another.

Edit > Cut, Copy, and Paste, and their buttons on the action bar, do the same as the keys. To paste from the menu, the browser may first ask whether Molkit may read the clipboard. If it does not allow it, the menu pastes Molkit’s own copy, and Ctrl+V still pastes from other apps.

A copy includes:

  • the selected atoms, every bond whose two ends are both selected, and any selected annotations;
  • projections (Newman, Fischer, Haworth, chair) whose atoms are all in the selection, even if you never clicked the projection itself (a projection never comes along without all of its atoms);
  • crystals, aromatic circles, and ring fills, with their atoms;
  • a named selection, resonance set, or visual set when all of its members are copied, and Molkit Script names and animations whose objects are all in the copy.

The status bar confirms the copy briefly with a message such as “Copied 6 atoms, 2 annotations”.

Where the copy goes:

  • Molkit’s own copy is kept in the browser’s storage, where it outlasts the page: you can copy in one Molkit tab and paste in another, or paste after a reload. A copied molecule keeps its export name when you paste it.
  • The system clipboard gets the copy too, so pasting it into Molkit brings back editable objects. If you then copy something in another app (a PDF viewer, for example), the newer content is what pastes. Molkit uses its stored copy only when the system clipboard has nothing that Molkit can paste.
  • Other apps, such as a word processor or a slide program, paste the copy as a picture of the selection, at the size it has in the document’s preset. An app that takes only the bitmap, such as a chat app, gets a sharp image at twice that size or more. A selection of more than 400 atoms and annotations pastes only inside Molkit, and the status message adds “too large to paste into other apps”.

A paste lands near the center of the view, offset slightly so that it does not sit exactly on the original. Each repeated paste moves a further 15 px, so a run of pastes fans out diagonally.

If the target document uses a different default bond length from the source, the pasted structure is rescaled to match.

In animation mode, a paste keeps its position relative to the frame: objects land at the same place in the target frame that they had in the source frame. A duplicate or a clone keeps its own place instead. See Matching.

When the newest clipboard content came from another app, Ctrl+V checks it in this order and uses the first kind that matches:

  1. SVG markup pastes as a vector annotation that stays sharp at any zoom. An SVG exported from Molkit with Include editable source selected pastes as editable atoms, bonds, and annotations instead, because it carries an editable copy of the drawing. A copy from Molkit’s own canvas always pastes back as editable objects. See Images, SVG, and charts.
  2. An image (a screenshot or a copied bitmap) pastes as an image annotation in the center of the view.
  3. MOL or SDF text is imported as a structure in the center of the view. Molkit recognizes the block by its counts line (the fourth line), which must end in V2000 or V3000. For example, if you copy the contents of an ethanol.mol file from a text editor and paste it into Molkit, Molkit draws ethanol. See MOL and SDF import.
  4. A SMILES string or an InChI is drawn as a structure in the center of the view, and a message says so. Press Ctrl+Z to remove it. A SMILES counts only when it has no spaces and has SMILES punctuation: a ring number, a bond sign (=, #, or - between three atoms or more), parentheses, or square brackets. For example, CC(=O)O is drawn as acetic acid, but CO, Cl, and H2O stay text. An InChI (text that starts with InChI=) is looked up on PubChem; if PubChem cannot be reached or has no match, the InChI pastes as text and a message says why.
  5. Any other text pastes as a text annotation that uses your current text defaults.

To insert a structure by name, or to see a SMILES string before you insert it, click Insert > Insert by Name or SMILES…; see SMILES and structure descriptions.

Drag files from your file manager onto the canvas. An overlay appears while you hover, and the dropped content lands where you release it.

  • .mol, .sdf, .sd, and .mdl files are imported as structures at the drop point.
  • SVG files insert as vector annotations. An SVG exported from Molkit with Include editable source comes back as editable objects.
  • Other image formats insert as raster images.

When you drop several files at once, each one is offset 20 px from the one before.

The style clipboard copies formatting without copying objects. To copy a style, select exactly one source object and press Ctrl+Alt+C (or Alt+Shift+C). To apply it, select one or more targets and press Ctrl+Alt+V (or Alt+Shift+V).

A style applies only to objects of the same kind:

Source and target What transfers
Arrow to arrow Stroke, both arrowheads, bond clearance, and endpoint gaps (gaps apply only to attached endpoints)
Text to text Font size, family, color, alignment, background, border, and opacity
Shape to shape Stroke, fill, and opacity (arrows follow the arrow rule)
Orbital to orbital Within one family (s, p, hybrid, d, dz2, pi overlap), the full geometry and style. Across families, only the shared visual properties: lobe shape, fill mode, opacity, phase colors, stroke, and the half-lobe and cover-label toggles

Position, rotation, and text content never transfer. The status bar reports how many objects received the style.

  • Ctrl+Shift+C or Edit > Copy as Image copies the selection to the system clipboard as a PNG image, ready to paste into other apps. See Export a PNG.
  • Ctrl+D duplicates the selection beside the original, to its right, and leaves the clipboard alone. A Shift-drag clone also leaves the clipboard alone. A duplicated 3D view follows the duplicated molecule; a 3D view duplicated without its molecule no longer updates when the molecule changes.