2.5.2 Pattern match with JME

Pattern match with JME combines the Pattern match algorithm with Peter Ertl’s JavaScript Molecular Editor (http://peter-ertl.com/ jsme/ [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)] ) to provide questions that allow students to draw their answer.

The JavaScript Molecular Editor is able to convert 2D (really 3D) molecular structures into SMILES strings (http://www.daylight.com/ dayhtml/ doc/ theory/ theory.smiles.html ) which may then be readily matched using Pattern match. A variety of specialised feedback options are provided.

The Question stem, Default mark and General feedback sections are as usual.

2.85 The Question text and General feedback for a Pattern match with JME question
2.86 Controls of how stereochemistry is handled by the JME.

1,2-Difluoroethene has the formula CHF=CHF. Stereochemically there are two possibilities E and Z.

Z-difluoroethene and E-difluoroethene

With stereochemistry turned on the JME will return F/C=C\F for the Z isomer and F/C=C/F for the E isomer.

Please be aware that the ‘\’ character is the ‘escape’ character in the pattern match algorithm that enables ‘special characters’ to be matched. For example match(\|) will match ‘|’. Consequently in the response match for Z-difluoroethene the ‘\’ character is used to ‘escape’ itself and the response match must be written as match(F/C=C\\F).

2.87 Synonyms can be defined
2.88 A response match of a SMILES string

Answer: The first answer must be the SMILES string for the correct answer as this is used as the basis for the Atom count feedback. In this case the correct answer for acetic acid is ‘CC(=O)O’. Please note that brackets are special characters that have to be ‘escaped’ as shown in the example.

Grade: Between ‘none’ and 100%. At least one response must have a mark of 100%.

Feedback: Specific feedback that is provided to anyone whose response is matched by the response matching rule in Answer.

Atom count feedback: If this is ticked the system generates feedback based on a comparison of the student’s response and the correct answer given in Answer 1

2.89 Feedback to all non-matched responses

The feedback for all non-matched responses should go into the ‘Any other answer’ field.

Atom count feedback: The student’s response is compared against the correct answer given in ‘Answer 1’ and feedback is generated on the atoms that are in both the student’s response and in the correct answer

The resulting question when run in 'interactive with multiple tries' style looks as follows:

2.90 How a Pattern match with JME question might look

The student draws their response using the tools provided by the JME.


Pattern match with JME questions are not accessible to totally blind students or to students who are unable to use the pointer.