Marvin JS : Editing

Select and Delete

Selection

Clicking on the lower right corner of the Selection  button of the Tools toolbar you can choose between two options: Rectangle Selection(Freehand Selection ( ).

With Rectangle Selection, you can select an area in rectangle mode while with Freehand Selection the area swept by the red line will be selected.Using either selection mode, an atom or a bond can be selected by clicking on it. Please note that in this case the bond gets selected along with the connected atoms. If you want to select a bond without its atoms, you have to choose Freehand Selection, and select the middle of the bond. Alternatively, press the "Ctrl" button and click on the bond, while either selection tool is active.

The background of atoms and bonds will become green when they are selected. In either selection mode, hovering over an atom or a bond, its background becomes green. When you click on this background, the green highlight gets lighter indicating that this part got selected. 
Whole molecules can be selected by double-clicking on them. The result is the same as it would be using Rectangle Selection. Whole structures, fragments of molecules, or even several molecules can be selected at the same time.

  • Separate parts of a molecule or even different molecules can be selected at the same time if the "Shift" button is pressed during selection.
  • The "Ctrl+A" keyboard shortcut can also be used to select the whole content of the canvas.
  • To clear the selection, you can press the "Esc" button, or simply click on a blank area on the canvas. If there is not any selection on the canvas, pressing the "Esc" button activates the Rectangle Selection tool.

Delete

Once you have made a selection (atom, bond, fragment, or a whole molecule), you can delete it either by clicking on the Delete  button on the Tools toolbar or pressing the "Del" button on the keyboard.
Selecting the Delete tool and clicking on an atom or a bond erases said atom or bond. In case of deleting a bond, its atoms will not disappear from the canvas. On the other hand, if you erase an atom, its bonds are also deleted.
The Delete button also works as a rectangle selection tool: click on the button and select the parts you want to erase (the selected parts are highlighted in red). When you release the left mouse button, the highlighted parts will be erased.
Erasing objects is also available from the contextual menu after a right-click on the atom, bond or the selected item you want to delete.
You can clear the whole canvas with one click using the Clear button on the General toolbar or pressing the "Ctrl+Del" keyboard shortcut.

Cut, Copy, and Paste Options

To copy a molecule or a fragment you have to select it first. The Cut and Copy buttons on the General toolbar or in the contextual menu place the content of the selected area on a virtual clipboard. Please note that the copy-paste function is available only within the application. The content of the clipboard can be imported to the canvas with the Paste button on the General toolbar. Their conventional shortcuts, "Ctrl+X", "Ctrl+C", and "Ctrl+V" can be used, too.

Pressing the "Ctrl" button and hovering the cursor over a selected area, you can move a copy of the selected structure by dragging it. When you do this, a "+" sign appears beside the cursor. A copy of the selected structure is placed on the canvas when you release the left button. Note that the original object remains selected, so it can be multiplied several times.

Direct copy-paste between Marvin JS and other applications is available in MRV and MDL Molfile (V2000 only) formats. If the extended functionalities provided by JChem Webservices are also available then structures can be pasted on the Marvin JS canvas in any of the supported text-based file formats (such as SMILES, Name, InChi...). Please note that copying content to the clipboard from Marvin JS is possible only via the Ctrl+C keyboard shortcut. This action always copies the structure in MDL Molfile (V2000) format. Similarly, if you want to paste chemical structures from the clipboard onto the Marvin JS canvas, you have to use the Ctrl+V shortcut.

If you use Marvin JS with a Firefox browser, please note, that copy-paste between Marvin JS and another applications works only with Firefox 22.0 and with newer versions.