Abbreviated groups, also called abbreviated S-groups in MarvinSketch are used to represent a part of a structure with a text abbreviation.
The label of these abbreviations depend on the orientation. For example nitro is printed with O2N if connected from the left, or NO2 if connected from the right to its scaffold. The labels are updated dynamically upon the rotation of the molecule.
A collection of predefined abbreviated S-groups are available in MarvinSketch. The complete set is accessible in the Insert > Groups menu along with a shortcut for each group.
It is possible to replace the full built-in abbreviated group collection with a custom one
using the abbrevgroups
parameter as demonstrated by this example.
This example applet above contains only those abbreviated groups that have left and right abbreviations.
The desired definitions should be enumerated in a file in
ChemAxon SMILES Abbreviated Groups format and the file should be uploaded to the server beside the applet.
The value of the abbrevgroups
parameter should be the location of this file.
This example uses the custom abbreviated group file: rightName.abbrevgroup
.
It is located in the same directory as the html file that contains the applet example itself.
The source of the applet example is shown below:
<script type="text/javascript" SRC="../../../marvin.js"></script> <script type="text/javascript"> <!--msketch_begin("../../..", 540, 480); msketch_param("abbrevgroups", "examples/applets/sketch/rightName.abbrevgroup"); msketch_end();//--> </script>
In the next example, the Graphical User Interface is customized.