Site announcements

How to insert chemical structures?

How to insert chemical structures?

by CHEMPU Administrator -
Number of replies: 0

The chemical structure below is generated on the fly from 'Chemaxon Smiles' format

CH3CH3CH3CH3H3CH3C

Steps to create  the chemical structures

1. Visit: https://marvinjs-demo.chemaxon.com/latest/demo.html 

Draw the molecule/reaction of your choice using drawing tools.

Marvin Drawing Windows

2. After completing your drawing, click save button (marked as 1 in figure below) and a new window will pop-up to select ChemAxon Smiles format from the dopdownbox (marked as 2 in figure below) 

 Marvin Drawing Save

3. Select the content and use Ctrl+c to copy the text. This defines the structure of your molecule

Marvin Drawing Save

4. You can now insert this string inside course contents/activities/questions/resources anywhere using the following special html format

Drawing Marvin

Note the copied Smiles format is enclosed between two 'chem' tags. Note the beginning and end tag formats. You should not change this markup format. 

When the document is displayed the image will appear as

CH3NH

The image produced with a default dimension of 200px by 200px

5. You can change the size of the image by adding them after the string like below 

Drawing Marvin

please note the '@w' for width description and '@h' for height description separator and you should not use any other separator. The first number represents width and second represents height of the image

The following image is scaled to a custom size of 100x100

CH3CH3CH3CH3H3CH3C

Please note that image appears only after saving the document.

-----------------------------------------------------

How to display chemical reactions

1. Go to https://marvinjs-demo.chemaxon.com/latest/demo.html 

2. Draw your reactions using the tools

3. Press save button and choose 'ChemAxon Marvin Document' from the format dropdown box appearing in the pop-up window

4. Copy the whole content (the text will be in xml format)

5. Insert the content copied, step 4 above, between special  html tag

6. You should see something like this (reaction is scaled to 400x200)

Drawing Mavin

OOOH[O]

7. The default size is 200x200. You can also change the size by using '@d  and '@d separator

---------------------------

An example of a big molecule (using Chemaxon Smiles Format)

CH3H3CHNONH2ONH3COHNOSOOONHONHH2NNH2HNOHNNHONHONHONOHNOH3CNHOCH3H3CCH3H3CCH3H3CCH3ONCH3ONHOH2NOHNOH3CHO

Another one with stereo-chemistry descriptions

H3CH3COOHOH3COH3CNNCH3OHCH3OOHCH3OHOCH3OH

--------------------------

A reaction display using Chemaxon smiles format

H3CONCH3H3CH3CNHCH3H3CO

-----------

Curved arrow display (mrv format)

H3CONCH3H3CH3COH3CNHCH3+