Lewis Structure Drawing Tool
The Lewis Structure Drawing Tool lets you create questions that require students to:
- Draw Lewis structures online.
- Select and edit parts of structure drawings you provide.
The tool uses the solutionAppletFlash answer type.
Note: For instructions on Organic Chemistry answer types (solutionOchemSkeletal and solutionOchemMechanism) that use the MarvinSketch drawing tool, see the release notes.
Requirements
To use the Lewis Structure Drawing Tool, you need:
- The Adobe® Flash® Player
- lewisdraw_authoring_2013.html, the Lewis Structure Drawing Tool file
- lewisdraw_authoring_2013.swf, the Flash applet for Lewis Structure drawings
- playerProductInstall.swf, the Flash applet for loading the Lewis structure drawing tool in the appropriate Flash version
- swfobject.js, JavaScript file
Important: To receive the last four files, contact Mastering Support. Be sure to save all of these files to the same folder. The drawing tool won't work if they're in separate folders.
Overview
- Set up the Lewis structure drawing answer.
- Specify drawing parameters in the Lewis Structure Drawing Tool.
- Copy drawing tool parameters into the answer box.
- Create correct expressions, correct answers, and wrong answers.
Optionally, if you want atoms or molecules to display on the canvas by default, you can create an xml file and add it to your assets. For details, see Creating assets that contain atoms or molecules.
The next sections provide details. For examples of using the tool, see Chiral molecular drawing example and Select atom example.
Note: Do not use this tool for complex ions since it doesn't handle brackets or ligands.
Set up the Lewis structure drawing answer
- Create a new item for the drawing.
- Under Value in the answer box, right-click and remove the solutionMultipleChoiceRadio answer type.
- Click add and select solutionAppletFlash.
- In the new answer box displayed, enter lewisdraw.swf beside Applet Name.
Specify drawing parameters in the Lewis Structure Drawing Tool
- Open the Lewis Structure Drawing Tool, lewisdraw_authoring_2013.html, in a browser that has the Flash plugin.
- Set the grading options for the problem on the lower left:
Click a grading setting option to toggle whether or not it will be active. (Any selected grading setting is highlighted in blue. Unselected settings are grayed out.)
![]() |
Grade hydrogen atoms | |
![]() |
Grade cis/tran isomers | |
![]() |
Grade chirality | |
![]() |
Grade lone pair electrons |
- Set how students will complete the problem by clicking the button in the upper right, labeled both by default, and selecting both (enables both drawing and selecting), draw, or select.
Note: The name of this button changes, reflecting the last choice made.
Copy drawing tool parameters into the answer box
- Right-click the drawing canvas and select get parameters.
- In the Parameters box, press Ctrl + V to paste the drawing’s parameters, which appear as codes. (See Parameter codes below for descriptions.)
Note: You no longer need to add a URL to the end of the parameters.
- Enter the pixel Width and Height for the drawing. The minimum size is width 500 and height 500. (Don't enter "pixels".)
- Create correct expressions, correct answers, and wrong answers.
Parameter codes
These codes are automatically entered into the answer box when you paste parameters from the Lewis Structure Drawing Tool. This table is for reference only (1 = graded, 0 = not graded).
Code | Meaning |
Qtype= |
draw – The part involves drawing only. both – The part involves both drawing and selecting. select – The part involves selecting only. |
Hydrogens=1 | Students must include all hydrogen atoms for a correct grade. The hydrogen grading option applies only to carbon atoms, since hydrogen atoms are automatically graded for all non-carbon atoms. Whether hydrogen grading is on or off, PF4H requires students to draw the H for a correct answer. If hydrogen grading is off, students can draw CH4 by entering C for a correct answer; drawing CH5 however, would still be incorrect. Hydrogen atoms generally are omitted from the grade for large alkanes or ring structures for which line-bond formulas are appropriate. |
Nonbinding=1 | Students must include all lone-pair and non-bonding electrons for correct grade. In most cases you will NOT want to grade based on nonbonding electrons. |
Chirality=1 | Students must draw a specific enantiomer for a correct grade. In most cases you will NOT want to grade chirality. |
Isometry=1 | Student must enter the correct cis or trans isomer to be marked correct. Unless you are dealing with alkenes you will probably NOT want to grade isometry. |
Skeleton=0 | This option is always set to 0. This feature is not available with the Lewis Structure Drawing Tool. |
Create correct expressions, correct answers, and wrong answers
Use the tabs at the top of the Lewis Structure Drawing Tool to create correct expressions, correct answers, and wrong answers, and then copy expressions and answers into the answer box. For a detailed example, see Chiral molecular drawing example.
Note: To allow multiple correct answers to be graded as equivalent for molecules with resonance (such as aromatics or the sulfite ion), code each correct resonance structure as its own Correct Answer(s) value.
Toolbar button | Purpose | How to use it |
Select
|
Moves atoms or bonds within a molecule. You can also change the angle or length of a bond using the arrow tool. |
|
Highlight (checkmark)
|
Enables selection of bonds or atoms in a selection question. For example: You might need to answer a question by selecting (i.e., identifying) a particular atom in a provided molecular drawing. |
To select individual items:
To select a group of items:
|
Bond
|
To draw bonds between atoms. Default = Single Bond When the Single Bond tool is selected, click on the canvas to add a C — C bond. |
To connect two existing atoms:
To add atoms and bonds at the same time:
To edit a bond type after you have added it:
|
Atom
|
To add an atom to the canvas. |
To change any element symbol that appears on the canvas:
If the atom you want is not available as an atom button:
|
Charge
|
To add or change an atom’s charge. The default charge is 0. |
To increase the charge on an atom:
To decrease the charge on an atom:
Alternate method to increase or decrease the charge:
|
Electron Dot
|
To place electron-dot pairs or single electrons on an atom. The default is two electrons (electron pair). |
To change the position of electron(s): With the electron dot button active, click the electron(s) on the canvas, and drag to rotate them around the atom. |
Eraser
|
To delete parts of molecules. To erase all of your work at once: Click the Reset button (described below). |
Note: If you click an atom with the Eraser button active, any associated bond is also deleted. |
Reset
|
Clears the canvas to its starting point, whether it was blank or contained portions of a molecule. To delete just a portion of your work: Use the Eraser button (described above). |
Click the Reset button to return the canvas to its original state. |
Tips for working with the Lewis Structure Drawing Tool
- The active button is outlined in blue.
- The identification color for molecular parts you select depends on the active button. If the Select button is active, selections are green. If the Highlight (checkmark) button is active, selections are blue.
- For “select” questions, use the Highlight button to select correct atoms.
- You can’t use copy and paste keyboard commands (Ctrl + C and Ctrl + V) to copy and paste molecular elements on the canvas.
Copying expressions and answers into the answer box
The answer string generated depends on the parameters that are set. Make sure the parameters are correct before generating the answer string with get answer string, as described below.
- When you're done creating the correct expression, right-click the canvas and choose get correct expression.
- In the Item Editor, click add correctExpression and paste (Ctrl + V) the information into the box.
- In the Lewis Structure Drawing Tool, right-click the canvas and choose get answer string.
- In the Item Editor, paste (Ctrl + V) the information into the Correct Answer(s) box.
- In the Lewis Structure Drawing Tool, change the molecule as needed for an incorrect answer.
- Right-click the canvas and choose get answer string.
- In the Item Editor, click add expression beside Wrong Answer(s), and paste (Ctrl + V) the information into the box.
See also:
Creating assets that contain atoms or molecules
Chiral molecular drawing example