MarvinSketch Example 2

You can easily control which atom and bond types can be used in the applet.

In this example, we have made only certain atom and bond types available to the user. Using the elements parameter, we have disabled the use of all atoms except C, N, O, F, P, S, and Cl. We allow all the query atom and extra bond types that can be used in MDL molfiles, but disable the SMARTS-only ones. The SMARTS properties X, v, R, r, a, A are disabled because they are not listed queryAtoms. The textfield in the More window can only be used to enter molfile atom aliases because atomStrings parameter contains only the value "alias" The use of SMARTS strings can be enabled by adding the "smarts" value to this parameter. With the extraBonds parameter, we enable only the following extra bond types: aromatic bond, up/down stereo wedge bonds, up/down and cis/trans "either" bonds, "any" bond, "single or double", "single or aromatic" and "double or aromatic" bonds.
Press More to see these changes.

Furthermore, by setting the xtmpls parameter, we placed extra templates (two wedge bonds) left to the "normal" templates.

<script LANGUAGE="JavaScript1.1" SRC="../../marvin.js"></script>
<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../..", 460, 360);
msketch_param("elements", "C-F,P-Cl");
msketch_param("queryAtoms", "any,hetero,list,notlist");
msketch_param("atomStrings", "alias");
msketch_param("extraBonds", "arom,wedge,either,any,1or2,aromany,topology");
msketch_param("xtmpls", "chemaxon/marvin/templates/wedgebonds.t");
msketch_end();
//-->
</script>


And now let us see how to use the sketcher like a viewer.