MarvinView Example - Display stereo configurations

This example demonstrates how to display stereo configuration of molecules.

1. Default settings: no chirality is shown

In the first case, the R/S chirality labels are hidden on the molecules. (This is the default option in Marvin.)
The code below is simply initializing a molecule table without any customization about chirality.

mview_name = "MView";
mview_begin("../../..", 600, 200);
mview_param("tabScale", "25");
mview_param("background", "#ffffff");
mview_param("molbg", "#ffffff");
mview_param("rows", "1");
mview_param("cols", "3");
mview_param("cell0", "|../../../mols-2d/l-tryptophan.csmol");
mview_param("cell1", "|../../../mols-2d/morphine.csmol");
mview_param("cell2", "|../../../mols-2d/dimethyl-octadien.csmol");
mview_end();

2. Showing chirality labels on molecules having chirality flag

Set the value of chiralitySupport parameter to selected to display chirality on those molecules only where the chiral flag is set. (In this example, the chiral flag is specified for only the first two molecules.)

mview_name = "MView";
mview_begin("../../..", 600, 200);
mview_param("tabScale", "25");
mview_param("chiralitySupport", "selected");
mview_param("background", "#ffffff");
mview_param("molbg", "#ffffff");
mview_param("rows", "1");
mview_param("cols", "3");
mview_param("cell0", "|../../../mols-2d/l-tryptophan.csmol");
mview_param("cell1", "|../../../mols-2d/morphine.csmol");
mview_param("cell2", "|../../../mols-2d/dimethyl-octadien.csmol");
mview_end();

3. Showing chirality labels and E/Z isomer information on all molecules

Set the value of the chiralitySupport parameter to all and the ezVisible parameter to true to display the chirality and the E/Z isomer information of all molecules.

mview_name = "MView";
mview_begin("../../..", 600, 200);
mview_param("tabScale", "25");
mview_param("ezVisible", "true");
mview_param("chiralitySupport", "all");
mview_param("background", "#ffffff");
mview_param("molbg", "#ffffff");
mview_param("rows", "1");
mview_param("cols", "3");
mview_param("cell0", "|../../../mols-2d/l-tryptophan.csmol");
mview_param("cell1", "|../../../mols-2d/morphine.csmol");
mview_param("cell2", "|../../../mols-2d/dimethyl-octadien.csmol");
mview_end();

 

So far, all the MarvinView examples have shown viewing related functionalities only. It is also possible to edit cells in tables.