Basic Features of Marvin JS

Importing and Saving Structures

Importing a Structure

Marvin JS handles MDL Molfiles V2000 (.mol extension) and ChemAxon Marvin Documents (.mrv extension) as input files. However, other file types (MDL RXNfile and RGfile, SMILES, ChemAxon Extended SMILES, SMARTS, ChemAxon Extended SMARTS, InChi, Name, CML, MDL Molfile V3000, MDL RXNfile V3000, MDL RGfileV3000, MDL SDfile, ChemAxon Compressed Molfile, ChemAxon Compressed SDfile, and XYZ) can also be imported if the appropriate webservice is available.

Press the Import button on the General toolbar to open the Import pop-up window. The dialog can be opened by pressing the "Ctrl+O" keyboard shortcut, too. Open the structure file in *.mol or *.mrv format with a text editor (e.g., Windows's Notepad), select all, and copy the file contents to the clipboard then paste it into the input area of the Import window. At the top of the window you can select the appropriate file format from a drop-down list. Finally, pressing the "Import" button loads the structure on the canvas.

import

Saving a Structure

A structure can be saved either in ChemAxon Marvin Document format or in MDL Molfile V2000 format. In order to export in other file formats (MDL RXNfile and RGfile, SMILES, ChemAxon Extended SMILES, SMARTS, ChemAxon Extended SMARTS, InChi, InChiKey, Name, CML, MDL Molfile V3000, MDL RXNfile V3000, MDL RGfile V3000, MDL SDfile, ChemAxon Compressed Molfile, ChemAxon Compressed SDfile, XYZ, CDX, and SKC) the appropriate webservice has to be available.
Please note that if you have a single step reaction on the canvas, then only those file formats will be available for saving which support reaction files.

To save the structures on the canvas, click on the Export button on the General toolbar, which opens the Save dialog window. Alternatively, you can use the "Ctrl+S" keyboard shortcut as well. In this window you can see the canvas contents in the default ChemAxon Marvin Document format. The structure file format can be changed by selecting an option from the drop-down list of supported file formats. To save that to a file, push the Download button at the bottom of the dialog window, click on the created link, and save the file with the preferred name and route. Alternatively, you can paste the structure source into a text editor and save it from there. In case of CDX and SKC file formats, only the first option can be carried out.

export

Saving as Image

In order to save an image of the structure in Marvin JS, select "Image" in the Save dialog. The supported image formats are PNG and JPEG. You can also set display options detailed elsewhere, determine the color of the image background (transparent or white), and set the width and height of the image.

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: Rectangle selection
Freehand Selection: Freehand selection

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.

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.

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.

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.

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 the clipboard. 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 as well.

Another option for copying is to drag the selected structures while you hold down the "Ctrl" key. 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.

Drawing Chemical Structures

Drawing atoms

You can choose from several options to draw a new atom or to modify an already existing one:

Drawing bonds

Drawing a molecule

Molecules can be created by connecting atoms with different chemical bonds or with the use of templates from the Templates toolbar.

You can create alkyl or conjugated hydrocarbon chains of arbitrary length using the Chain button on the Tools toolbar. A chain can be created as a new molecule or it can start from an already existing atom on the canvas. After selecting the button you can draw the alkyl chain by dragging or clicking repeatedly on the starting atom. The length of the chain is shown on the tip of the cursor. During drawing, the new chain can be rotated around its starting atom to the desired orientation by dragging. You can create a conjugated polyene chain by pressing the "Ctrl" button when chain-drawing.

Marvin JS supports different substructure group (S-group) types:

Merging structures

In Marvin JS you cal also merge separate fragments. Merging is helpful if you want to create ring systems (spiro, fused, or bridged ring systems: one, two, or more than two atoms in common, respectively) or to connect chain-like substructures. For merging two structures, one of them should be selected. When you hover the cursor over the selected fragment, the cursor will change to "move" type (crossed arrows) indicating that the fragment can be moved. Dragging the selected fragment until one or more of its atoms overlap with the "host" molecule atoms will merge the two structures.

Templates can also be merged with a molecule on the canvas. Choose a template from the toolbar (it appears on the tip of the cursor) and move it close to the atoms of the existing structure. When the distance between them has become sufficiently small, the possible merging points will be indicated by blue circles. Left-click will put the template in the merged position.

Spiro ring system Fused ring system

Sprout drawing

Single atoms can be connected to non-terminal atoms in a "sprouted" position. Select an atom symbol, hover the cursor over the atom to which you want to attach the new atom, and press the "Shift" key to see the result of sprouting. Click on the non-terminal atom to attach the new atom to it.

Symmetric templates (cyclohexane, cyclopentane, benzene, pyrrole) can be connected to an atom with a single bond: select the template from the Templates toolbar and hover the cursor over the desired atom to see a grey colored image of the template showing its would-be position. Clicking on the atom will connect the template to the atom with a single bond: one of the implicit hydrogens of the atom will be replaced by the template. Please note that non-symmetric templates (including naphthalene) cannot be sprouted.

When sprouting, the template and the connecting single bond can be rotated around the connecting atom of the original structure by dragging.

If you want to avoid sprouting, hold down the "Shift" key while clicking on the selected atom. In this case the attaching atom of the template will not replace the connecting atom of the original structure.

A template can be attached to an already existing bond which is about the same length as the template's bond: clicking on the bond connects the template to the selected bond. The template is rotated automatically in order to fit the chosen bond perfectly.

Transformations

Dragging structures

After selecting them, whole molecules or fragments (parts of molecules) can be moved on the canvas. When you hover the cursor over the selected structure, the "move" cursor will appear indicating that the highlighted part can be dragged on the canvas. If you select a whole molecule, it will be translated without any modifications, but when the selection contains only a fragment, the molecule will be distorted due to the changes in bond lengths and bond angles. Note that the positions of the atoms within the selected fragment are fixed, so only the bonds between the selected and non-selected part of the molecule will be distorted.

Rotating in 2D

When a structure has been selected, it can be rotated around its center in two dimensions.

The pink circle with a dot is the center of the selected area (pivot point). The molecule can be rotated around this point by clicking on the green dot and dragging the cursor on the canvas. During dragging, you can see the angle of rotation near this green dot. By default, rotation is done in 6° increments. For continuous rotation hold the "Shift" key while rotating.

When a whole molecule is selected, the original center of rotation can be relocated by dragging. In this case, if the new rotation center is too close to its original position, it will be snapped back to it. However, pressing the "Shift" key while dragging the center of rotation allows it to be as close to its original place as you wish. Moving the center lets you rotate the molecule around any point of the canvas. The image of the starting structure remains displayed in grey during rotation.

When a selected part is only a fragment which connects to the rest of the molecule with one bond only, you cannot move the pivot point (which is gray in this case). In such cases the rotation center will be that atom of the selected fragment which connects to the non-selected part of the structure.

Rotating in 3D

Structures on the canvas can be rotated in three dimensions. Please note that during 3D rotation, every molecule you have on the canvas will be rotated and their coordinates will change accordingly. If you want to rotate the molecules in 3D, push the 3D rotate button on the Tools toolbar, then drag the cursor over the canvas. While rotating, you can see the current angle of rotation around the vertical (y-) and horizontal (x-) axis next to the cursor, as well as on the two axis at the edges of the canvas.

If you hold down the "Shift" key while rotating, you can rotate the structure around the vertical or horizontal axis only, depending on the main direction of dragging (i.e., if you move the cursor from left to right, the structure will be rotated around the y-axis, while if you drag the cursor up and down, the molecules will be rotated around the x-axis).

Mirroring structures

Molecules or fragments can be mirrored either horizontally or vertically using the Mirror Horizontally or Mirror Vertically options in the pop-up menu. For mirroring, you should select the molecule or fragment concerned, right-click inside the selected area, and select the appropriate menu option. Mirroring is possible only for whole, unattached molecules or for fragments which connect with no more than one bond to the unselected part of the structure. In any other case, the mirror options remain inactive.

Finally, it has to be mentioned that the rules of undoing/redoing are the same for every kind of transformation: an event begins with pressing down the mouse button and ends with releasing it. The whole action between these two points can be undone or set back in one step.

Atom Properties

Currently Marvin JS supports the display of atomic charges, isotopes, monovalent radicals, enhanced stereo specifications, and manual atom maps as atom properties. All of these attributes can be set in the Atom properties dialog window available from the pop-up menu after a right-click on the atom.

The dialog provides options for changing atom type, setting new atomic symbols, or defining properties of atoms. You can choose from the following atom types: Element, Query, R-group, List/NOT list, Pseudo, or Homology Group. Choosing any of these types, only the relevant property fields appear on the dialog. For example, in case of a pseudo atom, there are three properties available: pseudo, charge, and enhanced stereo. Previously defined properties can be removed by clicking on the Remove property button.

These properties can be set for several atoms at the same time, by selecting the atoms in question and then opening the Atom Properties dialog from the context menu. In this case, only those properties are editable which are permitted for every selected atom type, and the same changes will be applied to every selected atom. If one or more of the selected atoms has/have attached properties, you can delete them by using the respective Remove property buttons.

If you use an 'Alias' for an atom, the label given in the textbox will replace the standard atomic symbol on the canvas, but the atom type remains unchanged. With the exception of enhanced stereo notations, atom properties are not displayed when an atom alias is used; however, they preserve their previously defined values and can be modified later.

The enhanced stereo notations (Off, Absolute, And, Or) can be added to chiral atoms (marked with wedge bonds) individually in order to assign them to stereogenic groups. The default value is the "Off" identifier, while in case of "Or" and "And" groups a number should accompany the identifier. If you leave the number field empty, number 1 will be associated with the group identifier automatically. Learn more about enhanced stereo specifications in Marvin JS.

The "OK" button closes the window, and the changes appear in the structure. As a result, a charge will appear as an upper right index of the given atom, while the mass number (isotope type) will be displayed as an upper left index. In case of hydrogen isotopes (deuterium and tritium), their specific atomic symbols can be used (D and T, respectively), or they can be displayed as 2H or 3H, too.

Note that atomic charges can be modified using the Increase Charge/Decrease Charge buttons on the Tools toolbar, too.

Drawing Graphical Objects

Currently, you can draw rectangle boxes in Marvin JS by using the Box button on the Tools toolbar. The boxes can be moved or resized and the color of their edges can be changed via contextual menu.

Display Options

Structure display options

Structure display options can be modified with the View settings button on the General toolbar, which opens the View settings dialog box. The options offered here are the following:

Wireframe Ball and Stick
2D
3D