MarvinSketch Example - Query atoms, extra bond types, disabling elements

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 Periodic System 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", "double or aromatic" and "coordinate" bonds.

Make the Periodic System visible to see the effect of these changes.

<script LANGUAGE="JavaScript1.1" SRC="../../../marvin.js"></script>
<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../../..", 540, 480);
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,coordinate");
msketch_end();
//-->
</script>

 

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