Post on 24-Dec-2021
transcript
CONFIGURATION GUIDEBIOVIA DRAW 2016
Copyright Notice
©2016 Dassault Systèmes. All rights reserved. 3DEXPERIENCE, the Compass icon and the 3DS logo,CATIA, SOLIDWORKS, ENOVIA, DELMIA, SIMULIA, GEOVIA, EXALEAD, 3D VIA, BIOVIA and NETVIBES arecommercial trademarks or registered trademarks of Dassault Systèmes or its subsidiaries in the U.S.and/or other countries. All other trademarks are owned by their respective owners. Use of any DassaultSystèmes or its subsidiaries trademarks is subject to their express written approval.
Acknowledgments and References
To print photographs or files of computational results (figures and/or data) obtained using BIOVIAsoftware, acknowledge the source in an appropriate format. For example:
"Computational results obtained using software programs from Dassault Systèmes BIOVIA. The abinitio calculations were performed with the DMol3 program, and graphical displays generated withDraw."
BIOVIAmay grant permission to republish or reprint its copyrighted materials. Requests should besubmitted to BIOVIA Support, either through electronic mail to BIOVIA.Support@3ds.com, or in writingto:
BIOVIA Support5005Wateridge Vista Drive, San Diego, CA 92121 USA
ContentsBIOVIA Draw Configuration ivTasks ivConfiguration Tasks ivConfiguration Outside AccelrysDraw-net.xml vEditing the XML Configuration File v
Specify XML Configuration Files viSpecify the Path to Custom XMLConfiguration Files viiBefore: include= Points to Compiled ClassResources viiAfter: include= Points to Custom XMLConfiguration File vii
Setting a Startup Structure viiBiopolymers viiiBiopolymers: Sequence Tools viiiCase-sensitive Sequence Residues viiiDisabling the Feature viii
Customize Draw for Biopolymer Searches andRegistration ixProviding Standard Biopolymer Templatesto Users ixCustomizing the Standard AbbreviationDefinitions File xCustomizing BIOVIA Draw for Users xiCustomizing BIOVIA Draw forAdministrators xiiiCreating Additional Abbreviations xiv
Standard Abbreviation XML Reference xviiiEnhanced Stereochemistry xxDisable the Stereochemistry Dialog xxDisable Stereochemistry Actions xxExpose the Purity Section xxiHiding OR and AND Stereogroups xxiiCustomize Stereogroup Labels xxiii
Enabling the Data Sgroup Tool to ControlSgroup Data xxiiiExample for Data Sgroup Tool xxivCustomizing Draw for Attached Data xxvAttached Data in BiopolymerRepresentation xxvOther Attached Data xxvData Validation, Registration, and theAttached Data Dialog xxviiCleaning Data Sgroups xxvii
Enabling or Disabling Rgroup Atom andBuilding Block Tools xxix
Specify a Custom Ptable and CustomWeights xxix
Templates xxxAdding Templates to the Toolbar Manager xxxAdd a Directory to the Template Directory xxxiTemplate Security xxxii
Removing Template Toolbars xxxiiSpecify Display of Templates ContainingAbbreviated Structures xxxii
Display Preference Settings xxxiiiSpecify Display Preferences xxxiiiExample: AromaticRingCircles,AtomHighlightDotWidth xxxiii
Synchronize Display Settings xxxvdefault.xml with Custom Settings forDisplay Preferences xxxv
Removing a Feature xxxvExample: Removing the Data SgroupFeature xxxviExample: Removing from the Chemistrymenu xxxvi
Show Explicit Carbon Label xxxviiiDisabling Arrow Toolbar Autohide xxxixRemoving a Menu Item xxxixRemoving the Insert Option from the FileMenu xxxixRemoving the Formatting Toolbar Itemfrom theWindowMenu xli
ChemCheck Configuration xliiMigrating Custom Toolbars xlivCommand-line Image File Conversion xlviOnline Help on the ImageGenerator xlviConverting Single File Examples xlviConvert a Batch of Files Example xlvii
Creating a Custom Ptable xlviiiCustom Ptable Example xlviiiCustom Ptable Path xlviiiRunning the Example xlix
Add-Ins lCheshire Actions liSpecify a Custom Ptable and CustomWeights liAccelrysDraw-net.xml liiiAbout the Draw XML Configuration Files liiiHow to Edit XML Tags in the XML ConfigurationFiles liiiSample Screens liiiMain Screen livDrop-down Menu lviDialog box lvi
Attached Data Dialog lviiAttributes lviiParent Element lviiChild Elements lviiiExample lviii
Hierarchy of Elements lviiiXML Configuration Elements lixAlphabetic List of Elements lxiiDescription of Elements lxivabbreviationtoolbar lxivaction lxvbutton lxviiicheckbox lxviiicombobox lxixdialog lxxiDisplayPreferences lxxiidonetoolbar lxxiiifieldname lxxiiifolder lxxvilabel lxxvilistvalue lxxviimenu lxxviiimenuitem lxxixmenustrip lxxxmodule lxxximultitool lxxxiiioperator lxxxvpalette lxxxvpalettebar lxxxvipanel lxxxviipopup lxxxviiiradiobutton lxxxixradiogroup xciseparator xcishortcut xciishortcuts xciiselection xciiispace xciiitemplatedirectory xcivtemplatetoolbar xcvitemplatetoolbarmanager xcvitool xcviitoolbar c
Trigger Table ci
BIOVIA Draw ConfigurationXML tags define themenus, tools, toolbars, and other items that display inDraw. The AccelrysDraw-net.xml file is the primary XML configuration file and specifies the secondary class resources or XMLconfiguration files that affect Draw.
The AccelrysDraw-net.xml file is located in the installation directory. The AccelrysDraw-net.xmlfile points to secondary XML configuration files located in:
BIOVIA\BIOVIA Draw <version>\XmlConfig\
The menustrip.xml, a secondary configuration file, points to tertiary XML Configuration files thataffect each menu on themenu bar. The following are a list of affected menus:
n menubar-file.xmln menubar-edit.xmln menubar-object.xmln menubar-chemistry.xmln menubar-window.xmln menubar-help.xml
The XML parser in Draw does not validate parent-child tag relationships. However, if a relationship is notvalid, the object defined by the tags do not display.
Tasks iv
Biopolymers viii
Standard Abbreviation XML Reference xviii
Enhanced Stereochemistry xx
Enabling the Data Sgroup Tool to Control Sgroup Data xxiii
Enabling or Disabling Rgroup Atom and Building Block Tools xxix
Templates xxx
Display Preference Settings xxxiii
ChemCheck Configuration xlii
Migrating Custom Toolbars xliv
Command-line Image File Conversion xlvi
Tasks
Configuration TasksYou can configure Drawwithout writing applications or using the DrawAPI by updating theAccelrysDraw-net.xml configuation file or setting a custom start-up structure. The XMLconfiguration file affects the initial loading of BIOVIA Drawwhen a user opens the application. When aDraw application user changes one or more display settings, using Options > Settings, those localsettings override the default or custom values defined in the configuration file, AccelrysDraw-net.xml.
You must have administrator privileges to edit Draw, the AccelrysDraw-net.xml.
BIOVIA Draw Configuration | Page iv
Always back up the AccelrysDraw-net.xml beforemaking any changes in the configuration file. Theelements and attributes in the XML files are case-sensitive, for example, Dog, and not the same as dog inan XML file.
You can update the Action, Tool, and ContextMenu elements in the AccelrysDraw-net.xml file. Ifyou are editing the AccelrysDraw-net.xml configuration file to add the functionality of a third-partyadd-in, you should not make the add-in available from more than one location such as context menu,toolbar, or as a menu option in Draw.
You can make the following edits:
n Change the default value for a settingn Customize chemical drawingn Enforce business rules for biopolymer representationn Specify a custom Ptablen Enable or disable the Data Sgroup tool (attached data)n Hide enhanced stereochemistryn Enable or disable the Rgroup Atom and building block toolsn Add more templates to the toolbarn Edit display text or imagesn Remove certain actions or toolsn Edit dialog boxesn Migrate custom toolbars created in previous versions of Draw
Configuration Outside AccelrysDraw-net.xmlMost tasks described in the BIOVIA Draw Configuration Guide consist of edits inside the configurationfile, AccelrysDraw-net.xml and the XML Configuration files to which it points. The exceptions are:
n Writing one or more batch files that cause BIOVIA Draw to start up in association with a particularXML configuration file. See Specifying XML Configuration Files.
n Safeguarding and administering the central set of templates at your site. See Templates: Customizing.n Command-line conversion of structure files into image files. See Command-line Image File
Conversion: ImageGenerator.
Notes:
n BIOVIA Draw can be the structure editor for ISIS/Base (Options > Structure Editor).
Editing the XML Configuration FileTo customize the BIOVIA Draw graphical user interface, edit the primary XML Configuration file and theXML Configuration files it points to. See Specify the Path to Your Custom XML Configuration Files. Thedefault name of the primary XML Configuration file is AccelrysDraw-net.xml, which is installed inthe root directory of the BIOVIA Draw installation, which this document refers to as <draw_home>.
Page v | BIOVIA Draw • Configuration Guide
IMPORTANT!
n Keep a backup copy of the original versions of any XML Configuration files undergoing edits. It isvery easy to break the XML and not always easy to fix, so it is good to be able to revert to a versionthat works.
n Do NOT change entries in the AccelrysDraw-net.xml file (or the XML Configuration files itpoints to) except according to the product documentation and the instructions included in thecomments of the default AccelrysDraw-net.xml file and the XML Configuration files it pointsto. Any other changes might cause unexpected results. Only the BIOVIA Administrator shouldmake changes on behalf of the end-users. End-users should not alter the XML files.
n For each configuration task, make the change in only one of the following areas of the XML: Action,Tool, or ContextMenu. Unexpected results might occur, for example, if you make an add-inavailable in more than one of the following ways: from themenu bar (action), from the verticaltoolbar (tool), or from the right-click context menu.
n The entries in the XML files are case-sensitive. Be careful that the spelling of elements andattributes is exactly correct, including the case.
Specify XML Configuration FilesYou can specify the XML configuration file using the following methods:
At start up the BIOVIADraw.exe looks for the XML configuration file, AccelrysDraw-net.xmllocated in the installation directory. If Draw does not find AccelrysDraw-net.xml in the rootdirectory of the installation, it loads an internal XML configuration file.
If you launch Drawwith a batch file, the batch file can specify the primary XML configuration file. Theprimary XML configuration file and the secondary XML configuration files it points to implement thegraphical user interface, including which features are visible and enabled.
You can usemore than one XML configuration files, as follows:
n A file that points to palettebarStereochemistryEnable.xmlwith stereochemistry enabledn A file that points to palettebarStereochemistryDisable.xmlwith stereochemistry disabled.n A batch file that specifies a structure file to load at start-up.
Use the command line after launching Drawwith from a command-line console prompt. You can specifythe XML configuration file, the following as showing in the example:
n The simple path:C:\myFolder>BIOVIADraw.exe Alt_Config\MyConfig.xml
n A Path with spaces and quotation marks:\\"Program Files (x86)\BIOVIA\BIOVIA Draw<version number>\BIOVIADraw.exe"c:\myFolder\myAccelrysDraw-net.xml
n The UNC_path:\\Program Files (x86)\BIOVIA\<version_number>\BIOVIADraw.exe
\\myServer\sharedfolder\AccelrysDraw-net.xml
You can change the properties of the start menu shortcut to point to a custom target location for Draw.
Use the DrawAPI to set the primary XML configuration file. Always backup the original versions of anyXML configuration files that you plan to edit.
BIOVIA Draw Configuration | Page vi
Specify the Path to Custom XML Configuration FilesSome of the XML Configuration files point by default to compiled class resources, but you can makethem point to your custom XML Configuration files. To do so, give the full path after include=.
For complete step-by-step examples, see Adding a set of templates to the Toolbar Manager andRemoving a Menu Item.
For an explanation of which XML Configuration files can specify other XML Configuration files, see Aboutthe BIOVIA Draw XML Configuration Files.
Before: include= Points to Compiled Class ResourcesThe primary XML Configuration file, AccelrysDraw-net.xml, points to compiled class resources thatyou cannot edit.
<menustrip include="MDL.Draw.Editor.XmlConfig.menustrip.xml" /><maintoolstrip include="MDL.Draw.Editor.XmlConfig.maintoolstrip.xml"/><toolbar include="MDL.Draw.Editor.XmlConfig.templatetoolstrip.xml" /><palettestrip include="MDL.Draw.Editor.XmlConfig.palettestrip.xml" />
After: include= Points to Custom XML Configuration FileTo specify the XML Configuration files that contain your custom configuration, change the include=assignment for the element to point to the full path of your new XML configuration file(s).
In this example, we specify custom XML Configuration files with the full path for the my-menustrip.xml, my-maintoolstrip.xml, and my-templatetoolstrip.xml, but continue to usethe compile class resource for the palettestrip.xml.
<menustrip include="C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\XmlConfig\my-menustrip.xml" /><maintoolstrip include="C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\XmlConfig\my-maintoolstrip.xml" /><toolbar include="C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\XmlConfig\my-templatetoolstrip.xml" /><palettestrip include="MDL.Draw.Editor.XmlConfig.palettestrip.xml" />
Setting a Startup StructureFor testing purposes, you might want BIOVIA Draw to open with the display of a particular structure.The following example illustrates how to open a molfile when BIOVIA Draw starts up:
1. Close all open versions of BIOVIA Draw and navigate to the root directory of your BIOVIA Drawinstallation.
2. Make a copy of AccelrysDraw-net.xml and name it myXmlConfigFile.xml.
IMPORTANT! BIOVIA recommends that you always keep a backup copy of the original XMLconfiguration files.
3. Navigate to the Examples\C#\GettingStarted directory of your installation and copy test.molto the root directory of your Draw installation.
4. Make a batch file called MyDraw.bat file in the root directory of your BIOVIA Draw installation thatcontains the following text:BIOVIADraw.exe myXMLConfigFile.xml test.mol
5. Run MyDraw.bat to start the BIOVIA Draw Editor with the specified structure already loaded and thefile name in the title bar.
Page vii | BIOVIA Draw • Configuration Guide
Biopolymers
Biopolymers: Sequence ToolsYou can configure Draw and your company’s databases to comply with the business rules for searchingand registering biopolymers, by:
n Customizing the standard abbreviation definitions file, std_abbrev_defs.xml, to providebiopolymer templates for the Draw Sequence tools. The std_abbrev_defs.xml file is located in theinstallation directory.
n Customizing Draw to enforce your company’s business rules biopolymer representation.n Implementing subsequence searching in applications that access databases that contain
biopolymers.
For more information, see Biopolymer Representation in the BIOVIA Chemical Representation Guidelocated in the Draw installation directory's docs folder.
The Draw Sequence tools use the templates that are specified in the version of std_abbrev_defs.xmlthat is located in the BIOVIA Draw installation directory. BIOVIA recommends that you do not allowusers to modify the default Sequence tools.
Case-sensitive Sequence ResiduesThe default setting in BIOVIA Draw displays D- sequence residues with a single lower-case letter, and L-sequence residues with a single uppercase letter.
For example, "a" creates D-alanine and "A" creates L-alanine.
When this feature is enabled, the D- form also precedes the L- form for 3-letter residues.
Disabling the FeatureIn the Settings, dialog, setMake sequence residue case sensitive to Off.
BIOVIA Draw Configuration | Page viii
Customize Draw for Biopolymer Searches and RegistrationTo customize Draw so chemists can illustrate biopolymers to comply with business rules for biopolymerrepresentation, do the following:
n Provide standard templates for biopolymer residues, protecting groups, and polyethylene glycolgroups (PEG).
n Provide a read-only directory of templates on the company network.n Configure the standard abbreviation definitions file to reference the templates in the read-only
directory.n Edit the Draw configuration file to include customizations for your enterprise.n Distribute the customized version of Draw.
When Draw users start the customized application, the toolbars for each Sequence tool displays thebiopolymer templates in the write-protected directory. End-users cannot create their own residuetemplates. However, users can create templates for protecting groups in their personal templatedirectories.
Providing Standard Biopolymer Templates to UsersBIOVIA Draw supports four different conventions for representation of biopolymers. To enforce yourchosen structure convention, ensure that all chemists use the same set of write-protected templates forbiopolymer residues, protecting groups, and PEG groups:
1. Provide a directory for the templates that is visible in the corporate network. End-users should haveread-only privileges to this directory. Administrators should have write and delete privileges.
2. Install BIOVIA Draw on your workstation.3. Copy the directory that contains the biopolymer templates from your local hard drive to the
directory that you created in Step 1.
Notes:
Biopolymer templates are located in the following directory and its subdirectories in the BIOVIADraw installation on your local hard drive:<draw_home>\StdAbbreviations
4. Configure the standard abbreviation definitions file to reference the templates in the directory thatyou created in Step 1. See Customizing the standard abbreviation definitions file.
5. Copy the standard abbreviation definitions file that you edited in Step 3 to the directory that youcreated in Step 1.
6. Edit the BIOVIA Draw XML configuration file as needed. See Customizing BIOVIA Draw for end users.7. Provide your end users with a customized BIOVIA Draw that uses the edited BIOVIA Draw
configuration file that you created in Step 5.
When your users start the customized version of BIOVIA Draw, the toolbars for each Sequence Tool willdisplay the biopolymer templates in the write-protected directory. End-users will not be able to create
Page ix | BIOVIA Draw • Configuration Guide
their own residue templates, but they can create templates for protecting groups in their personaltemplate directories.
Customizing the Standard Abbreviation Definitions FileThe standard abbreviation definitions file, std_abbrev_defs.xml, specifies the biopolymer templatesthat display on the toolbar for each sequence tool.
Entries in the standard abbreviation definitions file specify the structure convention for eachabbreviation (full, *atom, or pseudoatom), the full structure that the abbreviation represents, and otherinformation. For more information see Standard Abbreviation XML Reference.
BIOVIA Draw provides four example versions of the standard abbreviation definitions file, eachcorresponding to one of the conventions for representation of biopolymers. Each file contains thefollowing abbreviations:
n Standard 1-letter abbreviations for 21 of the 22 naturally occurring amino acids, and for DNA and RNAnucleotides
n Abbreviations for widely used protecting groups for amino acids.n Example abbreviations for PEG structures
BIOVIA recommends that you use one of these files as the basis for creating your own standardabbreviation definitions file. You can customize this file to add your own abbreviations.
Note: The version of std_abbrev_defs.xml that is located in the BIOVIA Draw installation directoryis the same as std_abbrev_defs_fullctab.xml in the examples directory, except that the file inthe BIOVIA Draw installation directory references the <draw_home>\StdAbbreviations directory on your local hard drive. Therefore, BIOVIA recommends using std_abbrev_defs_fullctab.xmlinstead.
To configure the standard abbreviation definitions file:
1. Use the following table to choose the example standard abbreviation definitions file thatcorresponds to the biopolymer structure convention that you want to use in your database.
StructureConvention
File Name
Full <draw_home>\Examples\SequenceTool\std_abbrev_defs_fullctab.xml
*Atoms alone(condensed)
<draw_home>\Examples\SequenceTool\std_abbrev_defs_staratom.xml
Pseudoatomsalone(condensed)
<draw_home>\Examples\SequenceTool\std_abbrev_defs_pseudoatom.xml
*Atoms andpseudoatoms(condensed)
<draw_home>\Examples\SequenceTool\std_abbrev_defs_staratomPlusPseudoatom.xml
2. Copy the selected file to the location where the standard abbreviation templates are stored (seeStep 1 in Providing standard biopolymer templates to users).
3. Rename the copied file std_abbrev_defs.xml.4. Edit the directory specifications at the beginning of your std_abbrev_defs.xml to point to the
location where the biopolymer template files are stored.
BIOVIA Draw Configuration | Page x
For example, if the biopolymer template files are on a network drive named “x” in the directoryMyMolfiles/StdAbbrevs, change the text from the original:<!ENTITY ABBREVROOT "CompanyMolTemplates/StdAbbreviations/"><!ENTITY AADir "&ABBREVROOT;Sequence-AA/"><!ENTITY DNADir "&ABBREVROOT;Sequence-DNA/"><!ENTITY RNADir "&ABBREVROOT;Sequence-RNA/"><!ENTITY SAGDir "&ABBREVROOT;Sequence-SAG/">
To the following (changes are in bold):<!ENTITY ABBREVROOT "x:/MyMolfiles/StdAbbreviations/"><!ENTITY AADir "&ABBREVROOT;Sequence-AA/"><!ENTITY DNADir "&ABBREVROOT;Sequence-DNA/"><!ENTITY RNADir "&ABBREVROOT;Sequence-RNA/"><!ENTITY SAGDir "&ABBREVROOT;Sequence-SAG/">
where:
n ABBREVROOT defines the root directory that contains the biopolymer templates.n AADir, DNADir, and RNADir specify the locations of the directories that contain residue templates
for amino acid, DNA, and RNA sequences.n SAGDir specifies the directory that contains templates for single-attachment groups such as
protecting groups and PEG groups.
If the template files are on aWeb server called CompanyServer, you can specify ABBREVROOT asfollows:<!ENTITY ABBREVROOT "http://CompanyServer/StdAbbreviations/">
5. Customize the file as needed to provide additional abbreviation. See Creating additionalabbreviations.
Customizing BIOVIA Draw for UsersTo ensure that users create polymers that use the templates that you specify in your standardabbreviation definitions file, provide users with a customized version of BIOVIA Draw. To customizeBIOVIA Draw, you must edit the BIOVIA Draw XML configuration files, and provide them to your users.
To configure a custom toolbar:
1. Make a copy of AccelrysDraw-net.xml in your Draw installation folder. The version will appearas follows:<!-- This is an XML configuration file for the BIOVIA Draw Editor. Itdefines all the windows, menus, tools, and actions that will be displayedin the Editor's environment. By editing this file you can customizetheEditor's User interface to the needs of the end users.--><mdldraw width="950" height="700" name="BIOVIA Draw 2016">
<module class="MDL.Draw.Modules.Editor.EditorModule"><shortcuts>
<shortcut char=" " method="SwapTool"/><!-- <shortcut char="." method="ToggleDebug"
/> --></shortcuts>
<!-- If you edit any of the following files, keep a backup of theoriginal,
and change include= to point to the full path of your new file,
Page xi | BIOVIA Draw • Configuration Guide
for example,include="C:\Program Files\BIOVIA\BIOVIA Draw 2016\XmlConfig\my-
menubar.xml" -->
<!-- File edit etc menus--><menustrip include="MDL.Draw.Editor.XmlConfig.menustrip.xml"/>
<!-- new open etc buttons--><maintoolstrip include="MDL.Draw.Editor.XmlConfig.maintoolstrip.xml"/>
<!--template toolbar. --><!--<toolbar
include="MDL.Draw.Editor.XmlConfig.templatetoolstrip.xml"/> -->
<!--vertical tool strip lasso, etc--><palettestrip include="XmlConfig\palettestrip.xml"/>
<atomtoolbar name="Atoms" direction="Horizontal"/><bondtoolbar name="Bonds" direction="Horizontal"/><arrowtoolbar name="Arrows" direction="Horizontal" autohide="true"/>
</module></mdldraw>
It references palettestrip.xml in subfolder XmlConfig.
2. Make a copy of XmlConfig/palettstrip and place the following version in the Draw installationfolder. It has 2 lines modified lines:
Line 1190was added:
<abbreviationtoolbar name="Modified Amino Acids" path="%MDLDRAW%std_abbrev_defs.xml" sequence="true" toolbarType="Modified"/>
In line 1206 the toolbar type “modified” was added:<sequencetoolbutton name="Amino Acid Sequences" image="SeqToolAA1.png"toolbarType="AA,dAA,Modified,SAG,LINKER,ASM"/>
3. Make a copy of std_abbrev_defs and place it in your Draw installation folder.
The block with themodified residues and their location was added:<toolbarType name="Modified" class="AA">
<abbreviation displayName="Met_m" oneLetterDisplayName="M*" fullName="L-methionine_modified" isQueryOnly="no">
<molfile>%MDLDRAW%AADir;Methionine1.mol</molfile></abbreviation><abbreviation displayName="Phe-M" oneLetterDisplayName="F*" fullName="L-
phenylalanine_modified" isQueryOnly="no"><molfile>%MDLDRAW%AADir;phehylalnine1.mol</molfile></abbreviation><abbreviation displayName="Pro_M" oneLetterDisplayName="P*" fullName="L-
proline_modified" isQueryOnly="no"><molfile>%MDLDRAW%AADir;proline1.mol</molfile>
</abbreviation></toolbarType>
BIOVIA Draw Configuration | Page xii
The 3 .mol files were placed in the following folder:C:\Program Files \BIOVIA\BIOVIA Draw 4.2\StdAbbreviations\Sequence-AA
You can define an alternate folder and create a path variable in std_abbrev_defs.xml.
Customizing BIOVIA Draw for AdministratorsAdministrators are responsible for creating and maintaining the biopolymer template files that theSequence Tools use. To perform this task, administrators require access to the Enhanced TemplateEditor dialog, which allows you to edit attachment atoms on the structures of biopolymer residues. Thisdialog is hidden so that end users cannot accidentally alter the templates. Creating and editingbiopolymer templates requires additional settings that differ from the BIOVIA Draw defaults:
n Display explicit hydrogen leaving groups on non-terminal attachment atoms in contracted amino acidresidues. These groups are hidden by default.n For information on why explicit hydrogen leaving groups are necessary, see BIOVIA Chemical
Representation, Biopolymer Representation, “Explicit hydrogen leaving groups on attachmentatoms of reactive side chains”. This document is installed as:<draw_home>\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf
n Use right-click, rather than double-click, to start the Template Editor.n By default, clicking an abbreviation on a any template toolbar adds the corresponding structure to
the drawing area, while double-clicking displays the Template Editor. Using right-click avoids avoidaccidentally adding templates to the drawing area while you create and edit biopolymer templatefiles.
n Use the following procedure to customize BIOVIA Draw for administrator users:1. Create a settings file, biopolymer.xml, that contains the recommended settings for editing
biopolymer templates. See To create the settings file.2. Edit a copy of the BIOVIA Draw XML configuration files to provide access to the Advanced
Template Editor and to the settings file that you created in the previous step. See To edit theBIOVIA Draw configuration files.
3. Distribute the edited copy of the XML configuration and the settings file biopolymer.xml toadministrator users. Instruct each user to copy biopolymer.xml to the Preferences subdirectoryon their local hard drive:C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw\Preferences\
Create the Settings File
Two settings that administrator users require are available on the Settings dialog in BIOVIA Draw. Thesetting to display non-terminal leaving groups is hidden and therefore not available on the Settingsdialog. To specify the value of a hidden setting, you must edit the settings file manually. Use thefollowing procedure to create the settings file biopolymer.xml:
1. Start BIOVIA Draw using the customized version of the XML configuration that you created for endusers. For more information, see Customizing BIOVIA Draw for end users.
2. ChooseOptions > Settings from themenu. The Settings dialog opens.3. Change the General setting Invoke Template Editorwith from Double Click to Right-Click.4. (Optional) Change any other settings that administrator users require.5. On the Settings dialog, click Save As.6. Enter biopolymer.xml as the file name, click Save, and then click Cancel to exit the Settings dialog.7. Exit BIOVIA Draw.
Page xiii | BIOVIA Draw • Configuration Guide
8. Navigate to the directory on your hard drive that contains your personal settings:C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw\Preferences\
9. Edit biopolymer.xml to add the hidden setting that enables display of internal leaving groups:<DisplayInternalLeavingGroup>true</DisplayInternalLeavingGroup>
The following example shows a portion of biopolymer.xml, with the added setting in bold:<DisplayPreferences xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TemplateEditorInvokingGesture>RightClick</TemplateEditorInvokingGesture><DisplayInternalLeavingGroup>true</DisplayInternalLeavingGroup>...(additional settings)...</DisplayPreferences>
10. Save the edited biopolymer.xml file.
Edit the Configuration Files
Use the following procedure to enable the Advanced Template Editor and specify biopolymer.xml as thedefault settings file:
1. Create a copy of the version of the XML configurations that you customized for end users. For moreinformation, see Customizing BIOVIA Draw for end users. Edit this copy as described in the stepsthat follow.
2. To enable the Enhanced Template Editor dialog, edit the value forMDL.Draw.Modules.Editor.EditorModule. The following example shows the default XML:<mdldraw width="950" height="640" name="MDL Draw"><module class="MDL.Draw.Modules.Splitter"orientation="horizontal" percentage="70"><module class="MDL.Draw.Modules.Editor.EditorModule">
The following example shows the XML after editing (changes are in bold):<mdldraw width="950" height="640" name="MDL Draw"><module class="MDL.Draw.Modules.Splitter"orientation="horizontal" percentage="70"><module class="MDL.Draw.Modules.Editor.EditorModule"enableMultipleAttachmentTemplateMode="true">
3. To specify biopolymer.xml as the default settings file, change the name of the default settings file,default.xml, to biopolymer.xml. For example:<DisplayPreferences file="biopolymer.xml" />
IMPORTANT! The settings file must be located in the user’s personal settings directory, as shownin this example. You cannot use a different path for the file.
4. Save the edited copy of the XML configuration.
Creating Additional AbbreviationsYou can provide your users with additional abbreviations for biopolymer residues, protecting groups,and PEG groups. For example, you can provide abbreviations for non-natural amino acids like 2-aminoisobutyric acid (Aib), or PEG groups of differing molecular weights. All of these procedures involveadding entries to the standard abbreviations file. When you add new entries to the standardabbreviation file, the templates display on the sequence toolbars as soon as you restart BIOVIA Draw.
BIOVIA Draw Configuration | Page xiv
The sections that follow give procedures for each category of biopolymer abbreviation: biopolymerresidues, protecting groups, and PEG groups.
Note: To understand how to create new entries in your standard abbreviation definitions file, BIOVIArecommends that you study the entries in the example standard abbreviation definitions files and thecomments for the entries.
Creating Abbreviations for Biopolymer Residues
Creating abbreviations for additional biopolymer residues uses procedures necessary to ensure thatend-users cannot alter the templates. For example:
n BIOVIA Draw prevents users from accessing the Enhanced Template Editor, which must be used todefine attachment atoms and leaving groups on residue templates. If you want to add more residueabbreviations, you must edit your copy of the BIOVIA Draw XML configuration file to allow editing ofbiopolymer residues. See Customizing BIOVIA Draw for end users and Customizing BIOVIA Draw foradministrators.
n A biopolymer template does not display on the top toolbar of any sequence tool until you add anentry for that template to the appropriate section of the standard abbreviation definitions file.Consequently, creating a biopolymer residue template involves not only creating and editing thestructure in BIOVIA Draw, but also editing the standard abbreviation definitions file.
The complete procedure for creating a residue template consists of the following steps:
1. Use BIOVIA Draw to create the underlying structure of the residue, contract the structure to anabbreviation, and save the structure to a molfile in the directory where other residue templates arelocated.
For detailed instructions, see the following index entry in the BIOVIA DrawOnline Help: “biopolymeradministration, creating residue templates”.
2. Edit the standard abbreviation definitions file to add entries for each template that you created inStep 1. Add the entry to the section of the standard abbreviation file that corresponds to theabbreviation class of the residue:a. Use copy/paste to create a duplicate of an existing entry of the same abbreviation class. For
example, to create an abbreviation for an amino acid residue, duplicate the entry for L-alanine.b. Change the displayName attribute of the duplicate entry to the symbol that you want to
display on the toolbar.c. Change the molfile attribute in the duplicate entry so that it refers to the file that contains
the structure of the new residue.d. Change the fullName attribute of the duplicate entry.e. Change any other attributes that are required for full structure, *atom, or pseudoatom
representation. For information on which attributes to edit, see the examples of edited entrieslater in this section.
f. Repeat Steps a through e for additional abbreviations.3. Restart BIOVIA Draw and use the Enhanced Template Editor to define attachment atoms and leaving
groups, as described in the following index entry in the BIOVIA DrawOnline Help: “biopolymeradministration, creating residue templates.”
Full Structure Representation
The following example shows duplicate entries for the full structure representation of L-alanine:<abbreviation displayName="Ala" oneLetterDisplayName="A"fullName="L-alanine" isQueryOnly="No"><molfile>&AADir;alanine.mol</molfile>
Page xv | BIOVIA Draw • Configuration Guide
</abbreviation><abbreviation displayName="Ala" oneLetterDisplayName="A"fullName="L-alanine" isQueryOnly="No"><molfile>&AADir;alanine.mol</molfile></abbreviation>
The following example shows how the second entry has been edited to refer to the non-natural aminoacid 2-aminoisobutyric acid (Aib). The structure of the residue is in themolfile aib.mol, which is located inthe same directory as the structures of other amino acids. Aib lacks a 1-letter abbreviation, so thedisplayName appears in both 1-letter and 3-letter mode (changes are in bold):
<abbreviation displayName="Ala" oneLetterDisplayName="A"fullName="L-alanine" isQueryOnly="No"><molfile>&AADir;alanine.mol</molfile></abbreviation><abbreviation displayName="Aib"fullName="2-aminoisobutyric acid (Aib)" isQueryOnly="No"><molfile>&AADir;aib.mol</molfile></abbreviation>
*Atom Representation
The following example shows duplicate entries for the *atom representation of L-alanine:<abbreviation starAtomName="AA-Ala" displayName="Ala"
oneLetterDisplayName="A"fullName="L-alanine" isQueryOnly="No"><molfile>&AADir;alanine.mol</molfile>
</abbreviation><abbreviation starAtomName="AA-Ala" displayName="Ala"
oneLetterDisplayName="A"fullName="L-alanine" isQueryOnly="No"><molfile>&AADir;alanine.mol</molfile>
</abbreviation>
The following example shows how the second entry has been edited to refer to the non-natural aminoacid 2-aminoisobutyric acid (Aib). The structure of the residue is in the molfile aib.mol, which islocated in the same directory as the structures of other amino acids. Aib lacks a 1-letter abbreviation, sothe displayName appears in both 1-letter and 3-letter mode (changes are in bold):
<abbreviation starAtomName="AA-Ala" displayName="Ala"oneLetterDisplayName="A"fullName= “L-alanine” isQueryOnly="No"><molfile>&AADir;alanine.mol </molfile>
</abbreviation><abbreviation starAtomName="AA-Aib" displayName="Aib"
fullName="2-aminoisobutyric acid (Aib)" isQueryOnly="No"><molfile>&AADir;aib.mol</molfile>
</abbreviation>
Creating Abbreviations for Protecting Groups
1. Draw the abbreviated structures in BIOVIA Draw and add them to a personal toolbar on your localhard drive.
For detailed instructions, see the following index entry in the BIOVIA DrawOnline Help: biopolymeradministration, creating protecting groups.
BIOVIA Draw Configuration | Page xvi
2. After creating the new template files, copy the files from your local hard drive to the directory wheresingle-attachment groups are stored.
3. Edit the standard abbreviation definitions file to add entries for each template that you created inStep 1. Add the entry to the section of the standard abbreviation definitions file that containsprotecting groups:a. Use copy/paste to create a duplicate of an existing entry.b. Change the displayName attribute of the duplicate entry.c. Change themolfile attribute in the duplicate entry so that it refers to the file that contains the
structure of the new protecting group.d. Change the fullName attribute of the duplicate entry.e. Repeat Steps a through d for additional abbreviations.
Creating Abbreviations for PEG Groups
Templates for PEG groups contain solely a single *atom or pseudoatom. To create new PEG groups, youneed to duplicate an existing template and then edit the template in BIOVIA Draw.
Use the procedure that follows to create abbreviations for PEG groups:
1. Draw the abbreviated structures in BIOVIA Draw and add them to a personal toolbar on your localhard drive.
For detailed instructions, see the following index entry in the BIOVIA DrawOnline Help: "biopolymeradministration, creating PEG groups".
2. After creating the new template files, copy the files from your local hard drive to the directory wheresingle-attachment groups are stored.
3. Edit the standard abbreviation definitions file to add entries for each template that you created inStep 1. Add the entry to the section of the standard abbreviation definitions file that containsprotecting groups:a. Use copy/paste to create a duplicate of an existing entry.b. Change the displayName attribute of the duplicate entry to the symbol that you want to
display on the toolbar.c. Change themolfile attribute in the duplicate entry so that it refers to the file that contains the
structure of the new PEG group.d. Change the fullName attribute of the duplicate entry.e. Change the formulaWeight attribute of the duplicate entry to the desired averagemolecular
weight.f. Repeat Steps a through e for additional PEG groups.
The examples in the following sections show how to create an abbreviation for a PEG group with anaveragemolecular weight of 5,000 in both the *atom and pseudoatom representations.
*Atom Representation of PEG Groups
The following example shows duplicate entries for PEG-20000:<abbreviation displayName="PEG20000"
fullName="Polyethylene glycol, average molecular weight = 20,000"starAtomName="MPEG-20000" formulaWeight="20000.0000"isQueryOnly="No"><molfile>&SAGDir;PEG20000.mol</molfile>
</abbreviation><abbreviation displayName="PEG20000"
fullName="Polyethylene glycol, average molecular weight = 20,000"
Page xvii | BIOVIA Draw • Configuration Guide
starAtomName="MPEG-20000" formulaWeight="20000.0000"isQueryOnly="No"><molfile>&SAGDir;PEG20000.mol</molfile>
</abbreviation>
The following example shows how the second entry has been edited to represent PEG-5000 (changes arein bold):
<abbreviation displayName="PEG20000"fullName="Polyethylene glycol, average molecular weight = 20,000"starAtomName="MPEG-20000" formulaWeight="20000.0000"isQueryOnly="No">
<molfile>&SAGDir;PEG20000.mol</molfile></abbreviation><abbreviation displayName="PEG5000"
fullName="Polyethylene glycol, average molecular weight = 5,000"starAtomName="MPEG-5000" formulaWeight="5000.0000" isQueryOnly="No"><molfile>&SAGDir;PEG5000.mol</molfile>
</abbreviation>
Pseudoatom Representation of PEG Groups
The following example shows duplicate entries for PEG-20000:<abbreviation displayName="PEG20000" pseudoatomName="PDB"
fullName=" Polyethylene glycol, average molecular weight = 20,000”formulaWeight="20000.00000" isQueryOnly="No"><molfile>&SAGDir;PDB.mol</molfile>
</abbreviation><abbreviation displayName="PEG20000" pseudoatomName="PDB"
fullName=" Polyethylene glycol, average molecular weight = 20,000”formulaWeight="20000.00000" isQueryOnly="No"><molfile>&SAGDir;PDB.mol</molfile>
</abbreviation>
The following example shows how the second entry has been edited to represent PEG-5000, which isrepresented as the pseudoatom “PXY” in the Ptable (changes are in bold):
<abbreviation displayName="PEG20000" pseudoatomName="PDB"fullName=" Polyethylene glycol, average molecular weight = 20,000”formulaWeight="20000.00000" isQueryOnly="No"><molfile>&SAGDir;PDB.mol</molfile>
</abbreviation><abbreviation displayName="PEG5000" pseudoatomName="PXY"
fullName="Polyethylene glycol, average molecular weight = 5,000”formulaWeight="5000.00000" isQueryOnly="No"><molfile>&SAGDir;PXY.mol</molfile>
</abbreviation>
Standard Abbreviation XML ReferenceThe table describes the elements in the standard abbreviation definitions file, and specifies the followinginformation for each abbreviation.
BIOVIA Draw Configuration | Page xviii
Element Description
displayName (Required) Residue symbol. For amino acid sequences, this is the 3-letterabbreviation that displays in 3-letter mode. For DNA and RNA residues, this isthe 1-letter abbreviation that displays in the toolbars of the DNA and RNASequence Tools, respectively.
oneLetterDisplayName (Optional) For structures that have both 1-letter and multi-letter symbols (forexample, amino acid and nucleic acid residues), the 1-letter symbol. The 1-letter symbol displays when in amino acid 1-letter mode. One-letter symbolsmust be the standard symbols approved by International Union of Pure andApplied Chemistry and the International Union of Biochemistry andMolecular Biology,IUPAC-IUB Joint Commission on BiochemicalNomenclature (JCBN). For more information, see the Nomenclature andSymbolism for Amino Acids and Peptides .
starAtomName (Optional) The Sgroup data that is attached to the *atom representation ofthe residue and that uniquely identifies each residue. Required forabbreviations that use the *atom representation.
pseudoatomName (Optional) If the residue is to be represented as a pseudoatom rather than a*atom, the pseudoatom name.
formulaWeight (Optional) The formula weight of the residue or group. Use this for fragmentswhosemolfiles lack the full connection tables, such as the *atom andpseudoatom representations of PEG groups. The Chemistry > Calculatorcommand in Draw also uses this value in calculating molecular weight.
fullName (Optional, but recommended) Specifies the full name of the residue, forexample L-glutamine. The fullName displays as the tooltip for the template onthe top toolbar of the Sequence Tool.
isQueryOnly (Optional)Indicates whether the structure is usable only for queries. The validvalues are as follows:n Yes, use only for queries and do not register to a database.n No, the structure is usable in queries, and can be registered to a database.
comment (Optional) Comment
molfile (Required) Path to templatemolfile that contains the underlying structure ofthe abbreviation. This molfile contains the structure that displays when youright-click the structure and choose Expand. The Chemistry > Calculatorcommand in BIOVIA Draw also uses this structure to calculatemolecularweight and other values.
The starAtomName and pseudoatomName elements are optional. These three element names havethe following precedence:pseudoatomName > starAtomName > displayName
Element name precedence:
n If an entry in std_abbrev_defs.xml does not contain a pseudoatomName or starAtomName buthas displayName, then the structure of the corresponding abbreviation is saved as a fully definedstructure (full connection table or ctab) in a sequence.
Page xix | BIOVIA Draw • Configuration Guide
n If an entry in std_abbrev_defs.xml has both starAtomName and displayName, but does nothave a pseudoatomName, then the structure of the corresponding abbreviation is saved as a *atomin a sequence.
n If an entry in std_abbrev_defs.xml has both pseudoatomName and displayName, but does nothave starAtomName, then the structure of the corresponding abbreviation is saved as apseudoatom in a sequence.
n If an entry in std_abbrev_defs.xml has all three names (pseudoatomName, starAtomName, anddisplayName), then the structure of the corresponding abbreviation is saved as pseudoatom in asequence because pseudoatomName has the highest priority.
Enhanced StereochemistryYou can edit the XML Configuration for stereochemistry. For more information, see Specify the Path toCustom XML Configuration Files.
The Stereochemistry dialog and actions in BIOVIA Draw enable users to create structures withstereochemistry features. The original (classic) stereochemical representation is a subset of the current(enhanced) stereochemical representation.
For more information on stereochemical representation, see the following in BIOVIA ChemicalRepresentation, which is installed as <draw_home>\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf
Your users can continue to register structures that use your existing business rules until you adapt yourbusiness rules to the enhanced representation. If you have not yet upgraded your business rules, youcan customize BIOVIA Draw to hide the stereochemistry dialog and actions.
End-users can also change their own Stereochemistry preferences. Select theOptions > Settings >Stereochemistry > Label display at stereogenic centers > Classic instead of the default value of IUPACStyle.
Disable the Stereochemistry DialogTo disable the Stereochemistry dialog:
n Use comment notation (<!-- and -->) to remove all the lines related to StereoChemTool in theBIOVIA\BIOVIA Draw <version>\XmlConfig\palettestrip.xml file.
n Some tools havemultiple XML entries. The tool element looks similar to the following in thepalettestrip.xml"<tool class="MDL.Draw.Modules.Editor.Tools.StereoChemTool"
With comment notation:<!-- begin comment
<tool class="MDL.Draw.Modules.Editor.Tools.StereoChemTool"
...
...
</tool>
end comment -->
Disable Stereochemistry ActionsTo disable the stereochemistry actions:
BIOVIA Draw Configuration | Page xx
n Use comment notation (<!-- and -->) to remove all the lines in the BIOVIA\BIOVIA Draw
<version>\XmlConfig\\XmlConfig\palettestrip.xml file that are related to actions.
For example use comment notation as follows:<!-- begin comment
<menu command="stereo" text="Set StereoChemistry">
<menuitem command="abs" text="Absolute" />
<menuitem command="and" text="And Enantiomer" />
<menuitem command="or" text="Or Enantiomer" />
</menu>
end comment -->
Expose the Purity SectionIn Draw, the Purity section for unspecified stereocenters is disabled by default.
You can enable or disable sections to provide or hide functionality from end users. The following sectionof BIOVIA\BIOVIA Draw <version>\XmlConfig\\XmlConfig\palettestrip.xml file exposesthe Purity section.<panel margin="3">
<label text="Purity (optional):" style="bold" width="250" height="25" />
</panel>
<radiogroup>
<radiobutton text="Unknown / unimportant" command="unknown"update="T" width="250" />
<radiobutton text="Pure" command="pure" update="T" width="250" />
<radiobutton text="Partially resolved" command="partial"layout="horizontal" listener="MDL.Draw.Gui.GrayOutChildren" update="T"width="130">
<combobox command="puritycombo" editable="T" update="T" enabled="F"select="3" width="50">
<selection text="50%" />
<selection text="60%" />
<selection text="70%" />
<selection text="80%" />
<selection text="90%" />
<selection text="100%" />
</combobox>
<label text=" ee" enabled="F" />
</radiobutton>
</radiogroup>
<!-- END OF stereogroup's Purity values section -->
In the example above, the default value is the third selection as set by the value 3 in the select="3"attribute, making the default value 70%.
Page xxi | BIOVIA Draw • Configuration Guide
Hiding OR and AND StereogroupsBoth the OR stereogroups button and the AND stereogroups button are enabled in the [draw-home]
\XmlConfig\palettestrip.xml file. To hide these buttons, look in the XML palettebar.xml forthis comment:
<!-- To remove OR stereogroup comment out the following section
and assure that the features you want to hide are inside XML comments <!-- ... -->. For example,the following example is of a section that is not commented out:
<!-- To remove OR stereogroup, comment out the following section -->...
Here, the same section that is commented out:<!-- To remove OR stereogroup, comment out the following section...-->
In the following section, the OR stereogroups is not commented out:<!-- To remove OR stereogroup, comment out the following section--><space height="10" /><panel border="T" layout="horizontal">
<panel margin="4"><panel>
<radiobutton text="Add to OR# group" command="or#" variable="T"update="T" width="162" />
</panel><radiobutton text="Create new OR group" command="createor#"
width="162" /></panel><panel margin="3">
<label image="StereoOr.png" /></panel>
</panel>
The following AND stereogroups section has been commented out.<!-- To remove AND stereogroup, comment out the following section<space height="10" /><panel border="T" layout="horizontal">
<panel margin="4" width="140"><panel>
<radiobutton text="Add to AND# group" command="and#"variable="T" update="T" width="162" />
</panel><radiobutton text="Create new AND group"
command="createand#"width="162" /></panel><panel margin="3">
<label image="StereoAnd.png" /></panel>
</panel>-->
BIOVIA Draw Configuration | Page xxii
Customize Stereogroup LabelsYou can customize the appearance of stereogroup labels such as for ABS, OR, or AND stereogroups bymanually editing the default.xml. You can find the user preferences default.xml file in a locationsimilar to the following:\\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw <version_number>\Preferences
The following example of a default.xml file shows an user’s custom settings for the display ofstereochemistry preferences, which are set using Options > Settings, and setting the label options in theStereochemistry group.<?xml version="1.0"?>
<DisplayPreferences xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DisplayChiralStereoLabels>Enhanced</DisplayChiralStereoLabels>
<StereoAbsLabel>*</StereoAbsLabel>
<StereoAndLabel>#</StereoAndLabel>
<StereoGroupDisplay>LabelsAndBonds</StereoGroupDisplay>
</DisplayPreferences>
The resulting StereoAndLabel display uses the following pattern: #1, #2, #3. You cannot change &1 into #
because the numeric part is appended automatically when used with StereoAndLabel or StereoOrLabel.
Enabling the Data Sgroup Tool to Control Sgroup DataOrganizations have different business rules for chemically-significant data (attached data or Sgroupdata) that end-users attach to targets, such as atoms, bond, fragments, or entire structures. BIOVIAallows you to control the vocabulary for data Sgroups.
By default, <draw_home>\XmlConfig\palettestrip.xml enables the SimpleDataSgroupTool thatallows end-users to specify a database field, search operator, and data that might or might not be valid.
However, if you enable the DataSgroupTool, you can "pre-populate" picklists to control the dataSgroup choices available to end-users.
To specify the types of attached data and targets that your organization requires, edit the examples inthe comments for DataSgroupTool in <draw_home>\XmlConfig\palettestrip.xml.
Page xxiii | BIOVIA Draw • Configuration Guide
Notes:
n Keep a backup copy of the original versions of any XML Configuration files undergoing edits. It isvery easy to break the XML and not always easy to fix, so it is good to be able to revert to a versionthat works.
n If your company’s business rules require attached data, you need to customize BIOVIA Draw andcreate Sgroup fields in your databases. For complete information on the procedures that arerequired to implement business rules for attached data, see the "Attached Data" chapter in BIOVIAChemical Representation, which is installed as<draw_home>\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf
n If you enable the DataSgroupTool, you should disable the SimpleDataSgroupTool.<!-- <toolclass="MDL.Draw.Modules.Editor.Tools.SimpleDataSGroupTool"><popup><menuitem command="attachCol" text="Attach Data..." /></popup></tool> -->
See also
n Comments in <draw_home>\XmlConfig\palettebar.xml on DataSgroupTool, which provide:n Procedures for disabling or enabling the DataSgroupTooln XML code for examples of attached data for various targets, with explanatory comments. To
specify the types of attached data and targets that your company’s business rules require, editthese examples.
n fieldname in the XML referencen Attached Data dialog (data Sgroups) in Sample Screens, which shows an example of a dialog box for
end-users.n Specify the Path to Custom XML Configuration Files.
Example for Data Sgroup ToolThere aremany examples and many places to either comment out or uncomment.
Before (commented out) - disabled<!-- Vocabulary of allowed values: R, S, P, M, E, Z, none.<fieldname readablename="Non-tetrahedral chirality" name="CHIRAL_NONTETRAHEDRAL" target="sketch"
type="text" unit="" value="list"><listvalue value="(none)" /><listvalue value="R" /><listvalue value="S" /><listvalue value="P" /><listvalue value="M" /><listvalue value="E" /><listvalue value="Z" />
</fieldname>...-->
After (exposed) - enabled
The following snippet is one ofmany places where the comments are removed.
BIOVIA Draw Configuration | Page xxiv
Vocabulary of allowed values: R, S, P, M, E, Z, none. --><fieldname readablename="Non-tetrahedral chirality" name="CHIRAL_NONTETRAHEDRAL" target="sketch"
type="text" unit="" value="list"><listvalue value="(none)" /><listvalue value="R" /><listvalue value="S" /><listvalue value="P" /><listvalue value="M" /><listvalue value="E" /><listvalue value="Z" />
</fieldname>...
Note: In this context, "sketch"means any structure drawn on the canvas, not the sketch file formatwith the .skc extension.
Customizing Draw for Attached DataUsers have access to the Data Sgroup Properties dialog that allows them to type in a Field Description,which might or might not be the correct database Field Name. However, you can:
n Hide the Data Sgroup Properties dialog by commenting out its appearances in the XML configurationfile.
n Make available the Attached Data dialog, which can have a drop-down list for Field Name, so thatend-users choose from a standard set of field names that you establish.
Attached Data in Biopolymer RepresentationTo enable your users to create biopolymers that contain the correct types of attached data, seeCustomizing BIOVIA Draw for Registration and Searching of Biopolymers.
Note: The attached data required for biopolymer representation is invisible to end users. See BIOVIAChemical Representation > Biopolymer Representation. This document is installed as:<draw_home>\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf
Other Attached DataIf you have incorporated additional categories of attached data into your business rules for chemicalsubstance representation, enable the Attached Data dialog in BIOVIA Draw to allow your users to createand edit attached data. For information on enabling this dialog, see Data Validation, Registration, andthe Attached Data dialog.
The dialog is hidden in BIOVIA Draw. To make the dialog available, customize the BIOVIA Draw XMLconfiguration.
1. Add the required Sgroup fields to your database.2. Make a backup copy of the XML configuration files.3. Use a text editor or XML editor to open and locate the section that contains examples of attached
data. You can do this by searching for the text string "Examples of Attached Data".4. Follow the instructions in the comments to adapt relevant examples to the categories of attached
data that you have defined. Two elements are associated with the definition of attached data,operator and fieldname:n Each occurrence of the element operator specifies a comparison operator that is available for
searching numeric data.
Page xxv | BIOVIA Draw • Configuration Guide
n Each occurrence of the element fieldname in the XML configuration defines a type of attacheddata that the user can select in the Attached Data dialog box, and that is associated with aparticular Sgroup field.
For each category of attached data, you can optionally use the listvalue element to provide aset of allowed values (vocabulary) for user to choose from.
IMPORTANT! BIOVIA Draw does not check the name, type, or other attributes against informationin the database. If you enter incorrect values for these attributes, the attached data can be savedto a molfile but cannot be registered to the target database or used in a search. For example, if theSgroup field name is incorrect, the data is not registered to the database. If a search operator thatyou specify is not available in the target database, queries that use that operator will be invalid. Toensure that these attributes are correct, you need to test the customized XML configuration asdescribed in Step 7 below.
5. For each type of target for which you specified attached data in Step 4, remove the comments fromthe associated menu command.
Each menu command has the following format:<menuitem command="<target>" text="Attach data..."/></popup>
6. Save the edited XML configuration.7. Test the edited XML configuration:
a. Start BIOVIA Draw and open a structure file.b. Select the Properties Tool [X] from the palettebar.c. Select the target that you specified in Step 4.d. Select Attach data from the popup menu. The dialog, as defined in the XML file, appears.e. Save the file with the structure and its attached data to a molfile.f. Register the structure to a test database.
BIOVIA Draw Configuration | Page xxvi
g. Use the structure as a query to retrieve the structure that you registered in the previous step.h. Conduct additional searches to ensure that the customized XML configuration is valid. For
example, to ensure users can use search operators.8. Distribute the customized version of the XML configuration to end-users.
Data Validation, Registration, and the Attached Data DialogBIOVIA Draw does not validate attached data. For example, BIOVIA Draw provides no mechanism forlimiting the range of numeric data that end-users enter. Therefore, BIOVIA Draw cannot enforce thatattached data that represents a percentage lie between 0 to 100. Your searching or registrationapplication should therefore check the validity of attached data against your company’s business rules.
For text data, BIOVIA recommends that you provide a set of allowed values in the Attached Data dialog.If scientists want to find structures with more than one value for the attached data, they can runmultiple queries and then apply list logic to merge the result sets.
Use search operators in substructure-search queries. If you are customizing BIOVIA Draw for use in aregistration application, you can prevent users from adding operators to attached data by commentingout the operator values in the XML configuration. For example:
<!-- Hide numeric search operators<operator value="none"/><operator value=">"/><operator value=">="/><operator value="<"/><operator value="<="/><operator value="<>"/>-->
For information on using attached data in substructure search queries, see BIOVIA ChemicalRepresentation, Substructure Search (SSS), “Substructure Search of Attached Data”. The document isinstalled as:<draw_home>\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf
For examples of customizing BIOVIA Draw for attached data, see the <draw_home>\XmlConfig\palettestrip.xml file. For reference information on the XML elements in theexamples, see the AccelrysDraw-net.xml chapter.
Cleaning Data SgroupsThe end-user can click Chemistry > Clean to improve the appearance of one or more selected structuresby giving them uniform bond lengths and angles. In so doing, Clean changes the x- and y-coordinates ofthe atoms, bonds, and attached data (Sgroup data).
Relative Coordinates
An Sgroup basis is the atoms and bonds with which the attached data is associated. BIOVIA Draw usesthe version of the internal Cheshire Clean script that ensures that each Sgroup datum is located in thesame position relative to its Sgroup basis.
Page xxvii | BIOVIA Draw • Configuration Guide
Absolute Coordinates
You might want Clean to lock the attached data position at the original location in the drawing area(absolute coordinates), regardless of the location of the associated atom or bond. For example, yourorganization might have a business rule that requires all attached data to be in the lower right corner.
ISIS/Draw creates data Sgroups with absolute coordinates, and BIOVIA Draw creates data Sgroups withrelative coordinates. One structure can have both kinds of attached data if the structure was created inISIS/Draw (absolute coordinates), and gets a second data Sgroup in BIOVIA Draw (relative coordinates).BIOVIA Draw’s Clean operation converts the absolute coordinates of data Sgroups into relativecoordinates. You can configure BIOVIA Draw to preserve the absolute coordinates of attached datacreated in ISIS/Draw. This change does not affect the rule that BIOVIA Draw creates data Sgroups withrelative coordinates.
IMPORTANT!
n Preserving absolute coordinates for attached data means that the Clean operation might relocatethe atoms and bonds of the Sgroup basis at coordinates that are distant from their attached data.
To configure BIOVIA Draw to use the version of Clean that preserves the absolute coordinates ofattached data, perform the following two steps in <draw_home>\XmlConfig\menubar-chemistry.xml.
1. Comment out the default Clean that positions attached data relative to the structure (relativecoordinates):<action name="Cl&ean"class="MDL.Draw.Modules.Editor.Actions.Calcs.RelativeCleanAction"/>
2. Uncomment the Clean that preserves the original coordinates of the attached data (absolutecoordinates).<action name="C&lean"class="MDL.Draw.Modules.Editor.Actions.Calcs.CleanAction"/>
BIOVIA Draw Configuration | Page xxviii
Enabling or Disabling Rgroup Atom and Building Block ToolsThe Rgroup Atom and Building Block tools are enabled so that users of BIOVIA Draw can createMarkushstructures for registration into library and/or building blocks database.
Notes:
Although superficially similar to Markush queries, Markush structures differ in important ways. Toavoid confusion between the different types of Rgroup structures, BIOVIA Draw supplies a separatepalette of tools for drawing generic structures and building blocks.
The default setting for the Rgroup Query tool is enabled.
See also
Specify the Path to Your Custom XML Configuration Files
Rgroup Atom Tool and Building Block Tool in <draw_home>XmlConfig\palettestrip.xml
Specifying the Custom Ptable and CustomWeights
Markush structure in the BIOVIA DrawOnline Help
For more information about generic databases and building-blocks database, see the documentationfor Relational-Chemical Database Administration, such as the Relational-Chemical DatabaseAdministration Command Reference, which gives the syntax for the CREATE DATABASE command.
Specify a Custom Ptable and Custom WeightsBefore specifying a custom periodic table, review the information in Custom Ptable Example and CustomPtable Path.
If Draw is using a custom Ptable with custom weights, the BIOVIA Cheshire scripts must also use thecustom Ptable with custom weights. You can edit the Ptable and weights file to match any customelements and weights for your organization.
Although the Ptable contains a weight for each element, the custom weights file determines the weightfor calculations within Draw. Other BIOVIA products, such as BIOVIA Direct, might interpret the formatof the atomic weight as Fortran format F10more strictly leading to different results.If your businessrules require Ptable customization, you must customize Draw and set the chemical environment at yoursite for all products that interact with Draw to use the same Ptable.
Note: The bold format indicates updates you make to the configuration file.
To specify a custom Ptable and customWeights:
1. Close Draw.2. Navigate to the BIOVIA\BIOVIA Draw <version>\Examples\CheshireAction directory.3. Make a backup copy of CheshireActionExample.xml.4. Edit the following line in the CheshireActionExample.xml file to specify the custom Ptable for
Draw.<module class="MDL.Draw.Modules.Editor.EditorModule" ptable="BIOVIA\BIOVIADraw <version>\Examples\Ptable\MyPtable.txt">
5. Modify the line to look similar to the following:<module class="MDL.Draw.Modules.Editor.EditorModule" ptable="<draw_
home>\Examples\Ptable\MyPtable.txt">
The BIOVIA\BIOVIA Draw <version> represents the absolute path to the root directory of your
Page xxix | BIOVIA Draw • Configuration Guide
BIOVIA Draw installation.6. Edit the following line in the CheshireActionExample.xml file to make the calculations available
as options on the Draw Chemistrymenu use the custom weights associated with the custom Ptable.<menustripitem text="&Chemistry"> <action name="&Calculator..."class="MDL.Draw.Modules.Editor.Actions.Calcs.MolValuesAction">
7. Modify the line to look similar to the following:<menustripitem text="&Chemistry"> <action name="&Calculator..."class="MDL.Draw.Modules.Editor.Actions.Calcs.MolValuesAction"weights="custom" weightsscript="..\Ptable\MyWeights.cct">
To verify the implementation of the custom Ptable and weights:
1. Run the batch file, CheshireActionExample.bat.2. Open the CheshireAction.mol file.3. In Draw, select Chemistry > Cheshire Scripts > Rotate Molecule.
The Cheshire script rotates and cleans themolecule.
4. Right-click an atom and select Atom Symbol.
The three custom elements (PC1, PC2, PC3) of the custom Ptable are available.
5. Click PC1.6. Select Chemistry > Calculator.
The custom weight displays.
7. Paste the calculated values onto the canvas.
TemplatesYou can customize the structure templates by editing the XML configuration file. End-users cannotcreate or edit biopolymer sequence templates.
See also
Biopolymers: Sequence Tools
Specify the Path to Your Custom XML Configuration Files
Adding Templates to the Toolbar ManagerIn this example, we add two directories that contain structure files.
n myNitrogens is the default template directory (selected="true"), and has the display name ofmyNitrogens
n MySugarTemplates is specified with an absolute directory, and has the display name of mySugars1. Copy <draw_home>\XmlConfig\templatetoolstrip.xml and rename it to <draw_
home>\XmlConfig\myTemplatetoolstrip.xml.
BIOVIA Draw Configuration | Page xxx
2. In <draw_home>\XmlConfig\myTemplatetoolstrip.xml add entries:<templatetoolbarmanagerclass="MDL.Draw.Modules.Editor.Tools.ConfigTemplateTool"...>
...<templatetoolbar name="Rings" path="%MDLDRAW%Templates\Template
Sets\Rings\"/><templatetoolbar name="myNitrogens" path="%MDLDRAW%mynitrogens\"
selected="true"/><!--Adding a shared template folder with absolute path --><templatetoolbar name="mySugars" path="C:\MySugarTemplates\"
readonly="true" /></templatetoolbarmanager>
3. Copy <draw_home>\AccelrysDraw-net.xml and rename it to <draw_home>\MyTemplateToolbarPrimary.xml.
4. In <draw_home>\MyTemplateToolbarPrimary.xml, change the reference to the new XMLConfiguration file for the toolbar.
Before, with a reference to a compiled class resource.<toolbar include="MDL.Draw.Editor.XmlConfig.toolbar.xml"/>
After, with an absolute path to an XML file.<toolbar include="C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\XmlConfig\myToolbar.xml"/>
5. To test, create a batch file that uses the new XML Configuration.BIOVIADraw.exe MyTemplateToolbarPrimary.xml
6. Start the batch file.7. Open the templatetoolbar dropdown list.
For XML reference details, see templatetoolbarmanager.
Add a Directory to the Template DirectoryTo display a particular folder under the Imported Templates directory in the Template Directorywindow, add a corresponding folder element under the templatedirectory element in the XMLconfiguration file, in<draw_home>\XmlConfig\toolbar.xml:
<templatedirectory . . .><!-- Add folders here to add them into the Template Directory --><folder name="myNewTemplateDirectory" path="d:\test\mytest\"
readonly="true" /></templatedirectory>
Page xxxi | BIOVIA Draw • Configuration Guide
For XML reference details, see templatedirectory and folder in the XML Reference.
See also
Template Security
Template SecurityBIOVIA recommends that you set the user permissions to the directories with your corporate templatesfiles to be read-only. This precaution is to safeguard the templates from being overwritten. Be awarethat blocking write permissions on corporate templates does not prevent end-users from changing fileson their local machines.
Removing Template ToolbarsWhen a new version of BIOVIA Draw is installed, the user’s access to any custom template toolbars ispreserved. To remove access to any custom template toolbars, follow these steps:
1. Use Add/Remove Programs on theWindows Control Panel to uninstall the current version of BIOVIADraw.
2. Delete the following directories and all the files within them:n C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Drawn <draw_home>
where C: represents the drive on which BIOVIA Draw is installed, <user_name> represents thesubdirectory with the name of the computer user, and <draw_home> represents the directory inwhich BIOVIA Draw is installed, such as C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\
Specify Display of Templates Containing Abbreviated StructuresThe abbreviation display file, displayAbbreviations.xml, enables you to control the display of thetext label (abbreviation name) of individual abbreviated structures. You can use this file to:
n Apply formatting such as Greek letters, italics, subscripts, superscripts, and large or small fonts, toabbreviated structures that you save as templates.
When you create an abbreviated structure to save as a template, you cannot apply special formats tothe abbreviation name, because the abbreviation name is identical with the template filename. Theformatting instructions (markup) specify characters that cannot be used in filenames.
n Override formula recognition for specific cases where formula recognition is not appropriate.
BIOVIA Draw automatically applies appropriate formatting to any abbreviation name that can beinterpreted as a formula, and displays these formulas appropriately when you reorient the structure.For example, if you enter the text string "C2H5" as the abbreviation for an ethyl group, Draw textrecognizes the text "C2H5" as a formula and subscripts the numbers. Draw also recognizes "C" as the
BIOVIA Draw Configuration | Page xxxii
character that should attach to other structures (attachment character), so that the abbreviationname flips when you re-orient the structure.
Automatic formula recognition is not appropriate for all templates, however. For example, thetemplate for N-bromosuccinimide is named NBS. BIOVIA Draw displays the abbreviation as either"NBS" or "SBN", depending on whether the abbreviation is on the left or right side of the structure.You can override formula recognition by specifying "N" as the attachment character, so that theabbreviation name always displays as "NBS".
Each user of BIOVIA Draw has an abbreviation display file at the following location on the local harddrive:
C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIADraw\DrawdisplayAbbreviations.xml
This file contains any necessary markup for all templates that are supplied with BIOVIA Draw. If you havecustomized BIOVIA Draw to provide additional template directories and/or template toolbars, use thefollowing procedure to provide a customized version of the abbreviation display file to your users:
1. Edit the XML configuration file using the instructions in the section, Adding a set of templates to theToolbar Manager and/or To add a directory to the Template Directory.
2. Use an XML or text editor to edit the copy of displayAbbreviations.xml on your local hard drive toadd formatting instructions for all custom templates that need it.
For a detailed instructions on creating entries in the abbreviation display file, see the following indexentry in the BIOVIA DrawOnline help: "abbreviation display file".
3. Distribute the edited displayAbbreviations.xml to your users. Instruct each user to replacethe default abbreviation display file with the one that you provide.
Display Preference Settings
Specify Display PreferencesYou can set values for display preferences (display settings) in <draw_home>\XmlConfig\Menubar-options.xml. For XML reference details, see Display Preferences.
These values can also be set programmatically. See the API Reference forMDL.Draw.Renderer.Preferences.DisplayPreferences.
IMPORTANT!
n Preferences set by the end-user in the GUI (Options > Settings) override the values specified inDisplayPreferences.
See also
Specify the Path to Custom XML Configuration Files
Synchronizing Display Settings with default.xml
Example: AromaticRingCircles, AtomHighlightDotWidthAccelrysDraw-net.xml points to menubar-options.xml, which resides in <draw_
home>\XmlConfig.
Before you edit menubar-options.xml to add preference settings:<separator /><action name="&Settings..."class="MDL.Draw.Modules.Editor.Actions.PreferencesAction"><DisplayPreferences file="default.xml" />
Page xxxiii | BIOVIA Draw • Configuration Guide
Example rendering with default display settings:
After you edit menubar-options.xml to add preference settings:<separator /><action name="&Settings..."class="MDL.Draw.Modules.Editor.Actions.PreferencesAction"><DisplayPreferences file="default.xml" >
<AromaticRingCircles>true</AromaticRingCircles><BackColor>yellow</BackColor><AtomHighlightDotWidth>0.1</AtomHighlightDotWidth><HighlightColor>Red</HighlightColor><ForceV3000>true</ForceV3000>
</DisplayPreferences>
Example rendering with changed display settings:
Note:Preferences can also be set using the API, for example,MDL.Draw.Renderer.Preferences.AtomHighlightDotWidth.Preferences set by the end-user in the GUI override the values specified in DisplayPreferences.
See also
Synchronizing Display Settings with default.xml
BIOVIA Draw Configuration | Page xxxiv
Synchronize Display SettingsIf your company has corporate standards for display settings, you can define the standard in the XMLConfiguration files.
End-users can always locally set their own display settings for their copy of Draw by clicking Options >Settings to open the Settings dialog.
The local preference setting are stored in a file called default.xml located in \\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw \Preferences directory.
Software developers can synchronize the display settings ofmultiple renditors programmatically. Formore informaiton, see DrawDeveloper's Guide, DemoRenditorMulti Example.
The XML file for local preference settings that correspond to ISIS/Draw and earlier versions of BIOVIADraw is
IsisDraw.xml file. The IsisDraw.xml file is located in the same directory as default.xml file.
See also
Specify Display Preference Value
default.xml with Custom Settings for Display PreferencesThe following is sample content of default.xml indicating that aromatic rings are displayed as circles.
<?xml version="1.0"?><DisplayPreferences xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<molPrefs><PiBondWriting>0</PiBondWriting>
</molPrefs><LabelHeight>0.45</LabelHeight><AromaticRingCircles>true</AromaticRingCircles><AppsNeedingAuxThreading>iexplore.exe</AppsNeedingAuxThreading><AndStereoLabelText>custom text 1</AndStereoLabelText><OrStereoLabelText>custom text 2</OrStereoLabelText><DefaultAngleRangeVal>10</DefaultAngleRangeVal><PreferencesPath>C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA
Draw\Preferences\</PreferencesPath>
</DisplayPreferences>
where smith is the <user>.
To synchronize Display Settings, default.xmlmust be removed from every local machine.Alternatively, you can distribute your organization’s standard version of default.xml to each localmachine as C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIADraw\Preferences\default.xml
Some changes to default.xml cannot bemade through the Settings dialog. For an example, seeCustom Display of Stereogroup Labels such as abs, or, and.
Removing a FeatureTo remove a feature by editing the XML configuration file, comment out each and every occurrence ofthe feature in the appropriate XML Configuration file.
Page xxxv | BIOVIA Draw • Configuration Guide
See also
Specify the Path to Custom XML Configuration Files
Example: Removing the Data Sgroup FeatureTo disable a data Sgroup feature, comment out all the references in <draw_home>\XmlConfig\palettestrip.xml to DataSgroupTool. Items that are commented out arewithin the open and close comments: <!-- commented out-->
Enabled:<!-- To disable the DataSgroupTool for attaching data to an entirestructure, comment out the popup menu command for the DataSgroup Toolbelow. -->
<popup><menuitem command="attachMol" text="Attach Data..." />
</popup><!-- End comment to hide DataSgroupTool for attaching data to anentire stucture-->
</tool> -->
Disabled:<!-- To disable the DataSgroupTool for attaching data to an entirestructure, comment out the popup menu command for the DataSgroup Toolbelow.
<popup><menuitem command="attachMol" text="Attach Data..." />
</popup>End comment to hide DataSgroupTool for attaching data to an entirestucture-->
</tool> -->
Similarly, to re-enable a feature you have commented, remove the comments of each of the references.
Note: For developers, it is possible to remove the Chem Check feature that occurs when a user clicksthe Transfer button in an application that uses a Renditor. See the Developer’s Guide, “DisablingChem Check from Transfer back to Renditor”.
Example: Removing from the Chemistry menuTo hide part of the Chemistry menu, such as the section for Generate Text from Structure and GenerateStructure from Text (highlighted in yellow), complete the following steps.
BIOVIA Draw Configuration | Page xxxvi
Three XML Configuration files must bemodified: <draw_home>\AccelrysDraw-net.xml points toxmlConfig\menustrip.xml, which points to XmlConfig\menubar-chemistry.xml.
1. Make a copy of <draw_home>\XmlConfig\menubar-chemistry.xml and name the copymyMenubar-chemistry.xml
2. Locate the item (or section) that you want to remove in <draw_home>\XmlConfig\myMenubar-chemistry.xml
Page xxxvii | BIOVIA Draw • Configuration Guide
In the example above, a complete section was commented out, but you can comment out a singleaction. When you comment out a section, remove any nested comments.
3. Save myMenubar-chemistry.xml4. Make a copy of <draw_home>\XmlConfig\menustrip.xml and name the copy
myMenustrip.xml
5. Edit myMenustrip.xml to point to myMenubar-chemistry.xml
Replaceinclude="MDL.Draw.Editor.XmlConfig.menubar-chemistry.xml"/>
withinclude="<draw_home>\XmlConfig\myMenubar-chemistry.xml"/>
where <draw_home> represents the installation directory, such as C:\Program Files(x86)\BIOVIA\Draw 2016
6. Make a copy of <draw_home>\AccelrysDraw-net.xml and name the copyMyAccelrysDraw-net.xml
7. Edit MyAccelrysDraw-net.xml to give the path and name of the edited file.<!-- <menustrip include="MDL.Draw.Editor.XmlConfig.menustrip.xml"/>commented out --><menustrip include="<draw_home>\XmlConfig\myMenustrip.xml"/>
where <draw_home> represents the installation directory, such as C:\Program Files(x86)\BIOVIA\BIOVIA Draw 2016
8. Write a batch file that points to your custom primary XML Configuration file.BIOVIADraw.exe MyAccelrysDraw-net.xml
9. To view the customized Chemistry menu, start Draw by launching the batch file.
Show Explicit Carbon LabelAn example of a Display Preference you can configure is the context menu item, Show explicit Carbonlabel, which is governed by the XMLConfig\palettestrip.xml file.
<tool class="MDL.Draw.Modules.Editor.Tools.CExplicitTool"><popup>
<menu command="cshow" text="Show explicit Carbon label"/><menu command="chide" text="Hide explicit Carbon label"/>
</popup></tool>
BIOVIA Draw Configuration | Page xxxviii
Disabling Arrow Toolbar AutohideThe Arrow toolbar displays itself only when you are using the Arrow tool.
To force the Arrow toolbar to display at all times, edit AccelrysDraw-net.xml as follows.
Before<arrowtoolbar name="Arrows" direction="Horizontal" autohide="true"/>
After<arrowtoolbar name="Arrows" direction="Horizontal" autohide="false"/>
Removing a Menu Item
Removing the Insert Option from the File MenuComplete the following steps to remove the Insert option from the Filemenu of the Draw Editor andmodify the title bar.
1. Close any open versions of Draw.2. Make a copy of <draw_home>\XmlConfig\menubar-file.xml, and rename it <draw_
home>\XmlConfig\myMenubar-file.xml
3. Edit the myMenubar-file.xml file.
Find the Insert action by searching for "&Insert" and comment out the entire section:
4. Make a copy of <draw_home>\AccelrysDraw-net.xml and rename it <draw_home>\NoInsert-AccelrysDraw-net.xml
5. In NoInsert-AccelrysDraw-net.xml, change the name attribute of the MDLDraw element (online 6) so that it reads as follows:
<mdldraw width="950" height="700" name="My Draw - No Insert">
6. Edit NoInsert-AccelrysDraw-net.xml to point to a custom myMenustrip.xml that you willcreate.
<!-- <menustrip include="MDL.Draw.Editor.XmlConfig.menustrip.xml"/>--><menustrip include="<draw_home>\XmlConfig\myMenustrip.xml"/>
Page xxxix | BIOVIA Draw • Configuration Guide
where <draw_home> represents the installation directory, such as C:\Program Files(x86)
\BIOVIA\Draw 2016
7. Make a copy of <draw_home>\XmlConfig\menustrip.xml and name the copymyMenustrip.xml
8. In myMenustrip.xml, assure that include= gives the full path to the custom XML configurationfile.
<!-- <menu text="&File"include="MDL.Draw.Editor.XmlConfig.menubar-file.xml"/>-->
<menu text="&File" include="<draw_home>\XmlConfig\myMenubar-file.xml"/>
where <draw_home> represents the installation directory, such as C:\Program Files (x86)\BIOVIA\BIOVIA Draw 2016
9. Create a batch file called NoInsert-Draw.bat that starts Draw by pointing to <draw_home>\NoInsertAccelrysDraw-net.xml. The content of the batch file is:
BIOVIADraw.exe NoInsert-AccelrysDraw-net.xml
10. Verify the result.
Before, with the Insertmenu item under the Open menu item:
After, with no Insertmenu item:
The title bar now says "My Draw - No Insert" and there is no longer an "Insert" action under theOpen menu item.
See also
Specify the Path to Your Custom XML Configuration Files
BIOVIA Draw Configuration | Page xl
Removing the Formatting Toolbar Item from the WindowMenu1. Disable the Formatting Toolbar.
a. Open theWindows Registry Editor.b. Navigate to HKEY_CURRENT_USER\Software\BIOVIA\BIOVIADraw\Client\2016c. Set the value for Persistency.ShowFormattingToolbar to False.d. Exit theWindows Registry Editor.
If you do not want the user to be able to enable the Formatting Toolbar from theWindowmenu,you must also hide themenu item.
2. Hide themenu item.a. Edit <draw-home>\XmlConfig\menubar-window.xml by adding the <!-- before and the -
-> after:<!-- <menu text = "&Formatting Toolbar"><action name="&Enable Toolbar"class="MDL.Draw.Modules.Editor.Actions.FormattingToolbarOnOffAction" /><action name="Allow &Fading"class="MDL.Draw.Modules.Editor.Actions.FormattingToolbarFadeOnOffAction" /><action name="&Dynamic Position"class="MDL.Draw.Modules.Editor.Actions.FormattingToolbarDynamicPositionAction" /></menu><separator /> -->
b. Edit <draw-home>\XmlConfig\menustrip.xml to point to the file the you edited in theprevious step.
BEFORE<menu text="&Window"include="MDL.Draw.Editor.XmlConfig.menubar-window.xml"/>
AFTER<!-- <menu text="&Window"include="MDL.Draw.Editor.XmlConfig.menubar-window.xml"/> -->
<menu text="&Window" include="C:\Program Files (x86)\BIOVIA\BIOVIADraw 2016\XmlConfig\menubar-window.xml"/>
where C:\Program Files (x86)\BIOVIA\BIOVIA Draw 20162\XmlConfig\ representsthe absolute path to your Draw home directory.
c. Edit <draw-home>\AccelrysDraw-net.xml to point to the file you edited in the previousstep.
BEFORE<menustrip include="MDL.Draw.Editor.XmlConfig.menustrip.xml"/>
AFTER<!-- <menustripinclude="MDL.Draw.Editor.XmlConfig.menustrip.xml"/> --><menustrip include="C:\Program Files (x86)\BIOVIA\BIOVIA Draw2016\XmlConfig\menustrip.xml"/>
Page xli | BIOVIA Draw • Configuration Guide
where C:\Program Files (x86)\BIOVIA\BIOVIA Draw 2016\XmlConfig\ representsthe absolute path to your Draw home directory.
3. Test the result.
ChemCheck ConfigurationYou can configure the Chemistry > Run ChemCheck dialog for your end-users.
After (customized XML):
Copy menubar-chemistry.xml in the <draw_home>\XmlConfig folder, rename the copymyMenubar-chemistry.xml, and edit it to set add to true for options you want visible.
Before:class="MDL.Draw.Modules.Editor.Actions.Calcs.ConfigurableChemInspectorAction">
<checktypes><checktype text="for query (SSSQUERY/RSSQUERY)" type="SSSQUERY"
add="true"/><checktype text="for registration (RCG_SPECIFIC/RXNCARTRIDGE)"
type="RCG_SPECIFIC" add="true"/><checktype text="for transform (TRANSFORM)" type="TRANSFORM"
add="false"/><checktype text="for registration to Direct (DIRECT_SPECIFIC_2D)"
type="DIRECT_SPECIFIC_2D" add="false"/><checktype text="for registration to Direct (DIRECT_SPECIFIC_3D)"
type="DIRECT_SPECIFIC_3D" add="false"/><checktype text="for registration to Direct (DIRECT_REACTION)"
type="DIRECT_REACTION" add="false"/></checktypes><checks>
BIOVIA Draw Configuration | Page xlii
<check text="Reaction has Rgroup definition"command="RxnWithRgroup" add="true"/>
<check text="Valence Check" command="Valence Check" add="true"/><check text="Atoms are overlapped" command="Atom Overlap"
add="true"/><check text="Bonds are overlapped" command="Bond Overlap"
add="true"/><check text="Structure needs V3000 molfile format"
command="V3000Check" add="false"/></checks>
</action>
After (with changes in bold):class="MDL.Draw.Modules.Editor.Actions.Calcs.ConfigurableChemInspectorAction">
<checktypes><checktype text="for query (SSSQUERY/RSSQUERY)" type="SSSQUERY"
add="true"/><checktype text="for registration (RCG_SPECIFIC/RXNCARTRIDGE)"
type="RCG_SPECIFIC" add="true"/><checktype text="for transform (TRANSFORM)" type="TRANSFORM"
add="true"/><checktype text="for registration to Direct (DIRECT_SPECIFIC_2D)"
type="DIRECT_SPECIFIC_2D" add="true"/><checktype text="for registration to Direct (DIRECT_SPECIFIC_3D)"
type="DIRECT_SPECIFIC_3D" add="false"/><checktype text="for registration to Direct (DIRECT_REACTION)"
type="DIRECT_REACTION" add="false"/></checktypes><checks>
<check text="Reaction has Rgroup definition"command="RxnWithRgroup" add="false"/>
<check text="Valence Check" command="Valence Check" add="true"/><check text="Atoms are overlapped" command="Atom Overlap"
add="true"/><check text="Bonds are overlapped" command="Bond Overlap"
add="true"/><--! <check text="Structure needs V3000 molfile format"command="V3000Check" add="false"/> -->
</checks></action>
1. In the <draw_home>\XmlConfig\myMenuStrip.xml file, specify the path to myMenubar-chemistry.xml:
<!-- <menu text="&Chemistry" include="MDL.Draw.Editor.XmlConfig.menubar-chemistry.xml"/>--><menu text="&Chemistry" include="<draw_home>\XmlConfig\myMenubar-chemistry.xml"/>
where <draw_home> represents the installation directory, such as C:\Program Files(x86)\BIOVIA\Draw 2016
2. In the <draw_home> directory, copy AccelrysDraw-net.xml as myAccelrysDraw-net.xml,and edit it to specify the path to myMenuStrip.xml
<menustrip include="<draw_home>\XmlConfig\myMenustrip.xml"/>
Page xliii | BIOVIA Draw • Configuration Guide
where <draw_home> represents the installation directory, such as C:\Program Files(x86)\BIOVIA\Draw 2016
3. Write a batch file:"<draw_home>\BIOVIADraw.exe" "<draw_home>\myAccelrysDraw-net.xml"
where <draw_home> represents the installation directory, such as C:\Program Files(x86)
\BIOVIA\Draw 2016
4. Run the batch file to verify your changes.
Migrating Custom ToolbarsTo migrate custom toolbars from an earlier version, such as 3.3, to the current version, be aware of thefollowing differences.
Installation directory 4.0 or 4.1 3.3
AccelrysDraw-net.xml for 4.1and SymyxDraw-net.xml for 4.0
<arrowtoolbar name="Arrows"direction="Horizontal"autohide="true"/>
<arrowtoolbarname="Arrows"direction="Horizontal"/>
XmlConfigfile
4.0 or 4.1 3.3
atomtoolstrip.xml
Note: this file is not in 4.0 or 4.1 <atomtoolbar name="Atoms"direction="Horizontal" />
maintoolstrip.xml
<control type="SandBarButton"command="new" image="mtb_new.png"tooltip="New"/>
<control type="toolstripbutton"command="new" image="mtb_new.png" tooltip="New"/>
menubar-chemistry.xml
menubar-edit.xml
menubar-file.xml
filefilter="All structure files(*.skc;*.mol;*.rxn;*.smi;*.cdx;*.xml)|*.skc;*.mol;*.rx n;*.smi;*.cdx;*.xml|sketchfiles (*.skc)|*.skc|molfiles (*.mol)|*.mol|rxnfiles(*.rxn)|*.rxn|SMILES files (*.smi)|*.smi|ChemDraw files (*.cdx)|*.cdx|Uniprotxml files (*.xml)|*.xml"/>
filefilter="All structure files(*.skc;*.mol;*.rxn;*.smi;*.cdx)|*.skc;*.mol;*.rxn;*.smi;*.cdx|sketch files (*.skc)|*.skc|molfiles (*.mol)|*.mol|rxnfiles (*.rxn)|*.rxn|SMILESfiles (*.smi)|*.smi|ChemDraw files(*.cdx)|*.cdx"/>
menubar-help.xml
menubar-object.xml
BIOVIA Draw Configuration | Page xliv
XmlConfigfile
4.0 or 4.1 3.3
menubar-options.xml
<action name="&Small Buttons (16)"class="MDL.Draw.Modules.Editor.Actions.ButtonS izeAction" size="16" />
<action name="&Medium Buttons (24)"class="MDL.Draw.Modules.Editor.Actions.ButtonS izeAction" size="24" />
<action name="&Large Buttons (32)"class="MDL.Draw.Modules.Editor.Actions.ButtonS izeAction" size="32" />
<action name="&Custom Buttons"class="MDL.Draw.Modules.Editor.Actions.ButtonSizeAction" size="custom" />
<action name="&Smallbuttons"class="MDL.Draw.Modules.Editor.Actions.ButtonSizeAction" size="16" />
<action name="&Mediumbuttons"class="MDL.Draw.Modules.Editor.Actions.ButtonSizeAction" size="24" />
<action name="&Largebuttons"class="MDL.Draw.Modules.Editor.Actions.ButtonSizeAction" size="32" />
menubar-window.xml
[Note: support for tabbed windows]
<action name="Windows"class="MDL.Draw.Modules.Editor.Actions.TabMen uAction" />
<action name="&TranslucentToolWindows"class="MDL.Draw.Modules.Editor.Actions.TransluscentWindowsAction"/>
<action name="&Arrange"class="MDL.Draw.Modules.Editor.Actions.Til eWindowMenuAction"/>
<action name="Tile &Vertical"class="MDL.Draw.Modules.Editor.Actions.Til eWindowMenuAction"orientation="Vertical"/>
<action name="Tile&Horizontal"class="MDL.Draw.Modules.Editor.Actions.Til eWindowMenuAction"orientation="Horizontal" />
<action name="Windows"class="MDL.Draw.Modules.Editor.Actions.Wi ndowMenuAction" />
menustrip.xml
Page xlv | BIOVIA Draw • Configuration Guide
XmlConfigfile
4.0 or 4.1 3.3
palettestrip.xml
<toolclass="MDL.Draw.Modules.Editor.Tools.CExplicit Tool">
<popup>
<menu command="cshow" text="Showexplicit Carbon label"/>
<menu command="chide" text="Hideexplicit Carbon label"/>
</popup>
</tool>
templatetoolstrip.xml
Command-line Image File ConversionBIOVIA Draw includes the ImageGenerator command-line utility, which outputs image files thatcorrespond to structure files.The input formats aremolfile (mol), reaction files (rxn), sketch (skc), SMILES(smi), and ChemDraw Exchange (cdx). The output formats are: bmp (default), gif, png, and tif, true colorwhen possible, otherwise black structure on white backaground.
The ImageGenerator executable resides in the Tools subdirectory of your BIOVIA Draw installation.
The API provides programmatic access to convert to image files formats bmp, gif, png, tif or wmfwithMDL.Draw.Renderer.HeadlessRenderer.SaveMoleculeAsImage.
When you "convert" structure files to imagine files, the original files remain unaltered.
For conversion of MolfileString, SketchData, Smiles, StructureHandle, or Metafile, see theAPI Reference on MDL.Draw.StructureConversion.StructureConverter.
Online Help on the ImageGeneratorInvoke the ImageGenerator executable, which resides in the Tools subdirectory of your BIOVIA Drawinstallation.ImageGenerator
Usage information is printed to the screen.
Converting Single File ExamplesTo interactively convert the specified molfile to a bmp, the default format, use the following:
1. Run the ImageGenerator.exe located in the Tools subdirectory of your BIOVIA\BIOVIA Draw
<version>.2. ImageGenerator -i test001.mol
To interactively convert the specified molfile to a specified format, use the following:n BIOVIA\BIOVIA Draw <version>\Tools\ImageGenerator -i test001.mol -f png
where BIOVIA\BIOVIA Draw <version> represents the installation directory that is similar to thefollowing: \\Program Files (x86)\BIOVIA\BIOVIA Draw 2016>
The output file is put in the same directory as the input file, if you use the following:
BIOVIA Draw Configuration | Page xlvi
BIOVIA\BIOVIA Draw <version>\Tools>ImageGenerator -i "C:\myDir\objects.cdx" -f tif
The utility displays the following message:C:\myDir\objects.cdx converted to C:\myDir\objects.tif
To interactively convert the image using a specified width and height in pixels, use the following:n ImageGenerator -i test001.mol -w 300 -h 350
Convert a Batch of Files ExampleTo interactively convert a batch of files, use the following:
1. Create a list of the files in the directory using a DOC command such asdir/b > list.txt
2. Run the ImageGenerator.exe located in the Tools subdirectory of your BIOVIA\BIOVIA Draw
<version>.3. Use the following command to generate a batch of gif images from the list of files:
ImageGenerator -l list.txt -f gif
4. (Optional) Specify additional options such as foreground and background color using the followingcommand:ImageGenerator -l list.txt -f gif -fg purple -bg gold
Page xlvii | BIOVIA Draw • Configuration Guide
Creating a Custom Ptable
Custom Ptable ExampleTo specify a custom periodic table (Ptable), do one of the following:
Use PtableDemo.xml to understand Draw XML configuration for themodule element. The ptableattribute specifies the path and name of the Ptable.
n Before: module class="MDL.Draw.Modules.Editor.EditorModule"n After: module class="MDL.Draw.Modules.Editor.EditorModule" ptable="MyPtable.txt"
For an overview of the Ptable, see the "Customizing the BIOVIA Ptable" in BIOVIA ChemicalRepresentation Guide. You can find a copy at:
\\docs\Draw\devguide\BIOVIAChemicalRepresentation.pdf.
If you are developing a Java application and want to use a custom Ptable, see the DrawDevelopersGuide, custom Ptable for a JMolRendererCom Java application.
Custom Ptable PathThe custom Ptable, MyPtable.txt includes three elements that are not in the standard periodic table:PC1, PC2, and PC3.
The Ptable example includes batch file that specifies that Draw loads a specific XML configuration file thatidentifies the custom Ptable and provides its location.
You can specify relative, absolute, or a URL path to the Ptable. The following examples show thedifferent path:
n Relative<module class="MDL.Draw.Modules.Editor.EditorModule"
ptable="MyPtable.txt">
n Absolute<module class="MDL.Draw.Modules.Editor.EditorModule"
ptable="<BIOVIA Draw installation directory>\Examples\Ptable\MyPtable.txt">
where <BIOVIA Draw installation directory> represents the absolute path to the rootdirectory of your BIOVIA Draw installation.
n URL<moduleclass="MDL.Draw.Modules.Editor.EditorModule"ptable="http://myDir/MyPtable.txt">
To run the Ptable example:
1. Close Draw.2. Double-click the batch file in the Examples\Ptable directory in BIOVIA\BIOVIA Draw <version>.3. In the canvas, type the name of a custom element in the Ptable.
The custom elements in this Ptable are PC1, PC2, and PC3.
The keyboard sprouting feature places the custom element on the Draw canvas.The custom elementsalso appear in the list of available elements if the Show Extended Table check box is enabled.
Creating a Custom Ptable | Page xlviii
Running the ExampleFollow these steps to run the example:
1. Close any open versions of BIOVIA Draw.2. Start BIOVIA Draw by double-clicking the batch file in the Examples\Ptable directory of your
BIOVIA Draw installation.3. In the canvas, type the name of a custom element in the Ptable. The custom elements in this Ptable
are PC1, PC2, and PC3.4. The keyboard sprouting feature places the custom element on the BIOVIA Draw canvas.
The custom elements also appear in the list of available elements if the Show Extended Table checkbox isenabled.
Setting a Custom Ptable
Page xlix | BIOVIA Draw • Configuration Guide
Notes:
n See also Specifying the Custom Ptable and CustomWeights.n PC1 is a pseudoatom, which is different from an abbreviated structure (abbreviation Sgroup), such
as COOH.
Abbreviated structures can be expanded to reveal the underlying structure. Pseudatoms cannot beexpanded and do not have underlying structure.
Add-InsSoftware add-ins such as add-ins for ACD/Labs, Bioavailability (Rule of 5), and Isotopomer Distributionplace options on menus inDraw. After installing the add-ins and configuring Draw, you can access theadded functionality from within Draw.
Access these functions by selecting the newmenu item from the Chemistry menu.
To make Add-ins available to all users, load Add-ins to <Draw_Home>/AddIns.
To load Add-ins to the user's personal profile:
n Create the folder AddIns:C:\users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw 2016\
For example:
1. Go to <DRAW_HOME>/Examples/C#/AddInActionExample2. Create folder AddIns under C:\users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA
Draw 2016\
3. Copy XML Document (DisplaySmilesString) andbin/Release/MDL.Draw.AddIn.DisplaySmilesString.dll file to AddIns Folder
4. Launch BIOVIA Draw.5. Draw any structure on the canvas.6. Select Chemistry > Display SMILES String.
Creating a Custom Ptable | Page l
Cheshire ActionsBIOVIA Draw contains the functionality of Accelrys Cheshire in an embedded version to support featuressuch as such Clean and Uniprot file conversion.
See also
Specify a Custom Ptable and CustomWeights
Specify a Custom Ptable and Custom WeightsBefore specifying a custom periodic table, review the information in Custom Ptable Example and CustomPtable Path.
If Draw is using a custom Ptable with custom weights, the BIOVIA Cheshire scripts must also use thecustom Ptable with custom weights. You can edit the Ptable and weights file to match any customelements and weights for your organization.
Although the Ptable contains a weight for each element, the custom weights file determines the weightfor calculations within Draw. Other BIOVIA products, such as BIOVIA Direct, might interpret the formatof the atomic weight as Fortran format F10more strictly leading to different results.If your businessrules require Ptable customization, you must customize Draw and set the chemical environment at yoursite for all products that interact with Draw to use the same Ptable.
Note: The bold format indicates updates you make to the configuration file.
To specify a custom Ptable and customWeights:
1. Close Draw.2. Navigate to the BIOVIA\BIOVIA Draw <version>\Examples\CheshireAction directory.3. Make a backup copy of CheshireActionExample.xml.4. Edit the following line in the CheshireActionExample.xml file to specify the custom Ptable for
Draw.<module class="MDL.Draw.Modules.Editor.EditorModule" ptable="BIOVIA\BIOVIADraw <version>\Examples\Ptable\MyPtable.txt">
5. Modify the line to look similar to the following:<module class="MDL.Draw.Modules.Editor.EditorModule" ptable="<draw_
home>\Examples\Ptable\MyPtable.txt">
The BIOVIA\BIOVIA Draw <version> represents the absolute path to the root directory of yourBIOVIA Draw installation.
6. Edit the following line in the CheshireActionExample.xml file to make the calculations availableas options on the Draw Chemistrymenu use the custom weights associated with the custom Ptable.<menustripitem text="&Chemistry"> <action name="&Calculator..."class="MDL.Draw.Modules.Editor.Actions.Calcs.MolValuesAction">
7. Modify the line to look similar to the following:<menustripitem text="&Chemistry"> <action name="&Calculator..."class="MDL.Draw.Modules.Editor.Actions.Calcs.MolValuesAction"weights="custom" weightsscript="..\Ptable\MyWeights.cct">
To verify the implementation of the custom Ptable and weights:
1. Run the batch file, CheshireActionExample.bat.2. Open the CheshireAction.mol file.
Page li | BIOVIA Draw • Configuration Guide
3. In Draw, select Chemistry > Cheshire Scripts > Rotate Molecule.
The Cheshire script rotates and cleans themolecule.
4. Right-click an atom and select Atom Symbol.
The three custom elements (PC1, PC2, PC3) of the custom Ptable are available.
5. Click PC1.6. Select Chemistry > Calculator.
The custom weight displays.
7. Paste the calculated values onto the canvas.
Cheshire Actions | Page lii
AccelrysDraw-net.xml
About the Draw XML Configuration Files liii
How to Edit XML Tags in the XML Configuration Files liii
Hierarchy of Elements lviii
XML Configuration Elements lix
Alphabetic List of Elements lxii
Description of Elements lxiv
Trigger Table ci
About the Draw XML Configuration FilesXML tags define themenus, tools, toolbars, and other items that display in the Draw interface.
The AccelrysDraw-net.xml file:
n Is the primary XML Configuration filen Specifies the secondary class resources or XML Configuration files that affect the BIOVIA Draw Editorn Is located in the installation directory, <draw_home>n The secondary XML Configuration files that AccelrysDraw-net.xml points to are in <draw_
home>\XmlConfig\
n One of the secondary XML Configuration files, menustrip.xml, points to tertiary XML Configurationfiles that affect each menu on themenubar: menubar-file.xml, menubar-edit.xml, menubar-object.xml, menubar-options.xml, menubar-chemistry.xml, menubar-window.xml, and menubar-help.xml
n The Draw XML parser does not verify that parent-child tag relationships are valid. However, if arelationship is not valid, the object defined by the tags will not display. The valid parent-child taghierarchies are documented in the Descriptions of Elements section.
See also
BIOVIA Draw Configuration Tasks
Specifying XML Configuration Files
Specify the Path to Your Custom XML Configuration Files.
How to Edit XML Tags in the XML Configuration FilesYou can customize the BIOVIA Draw Editor user interface for your end-users by editing theAccelrysDraw-net.xml file and the files to which it points . For a list of typical tasks and associatedXML tags, see Configuration Tasks.
Sample Screens
See also
Hierarchy of Elements
Alphabetic List of Elements.
Page liii | BIOVIA Draw • Configuration Guide
Main Screen
The following shows a splitter, which divides the screen into two spaces. One possibler use of a splitter is to display a module that contains buttons.
AccelrysDraw-net.xml | Page liv
Page lv | BIOVIA Draw • Configuration Guide
Drop-downMenu
Note: Whereas a tool persists for reuse, an action is a one-time event, such as Save, Open, or Print. Theitems on a menu are actions.
Dialog boxTo view the sMolecular Value dialog box, open or draw a molecule and select Calculator in theChemistrymenu.
AccelrysDraw-net.xml | Page lvi
Attached Data DialogWhen the user right-clicks an atom and selects Attach Data, theData Sgroup Properties dialog displays.
AttributesThe data type of all attributes is CDATA.
Attribute Required Description
name No Specifies the name displayed in the title.
height No Specifies the height of the dialog in pixels.
width No Specifies the width of the dialog in pixels.
Parent ElementNone
Page lvii | BIOVIA Draw • Configuration Guide
Child Elements
Element Required Description
module No Specifies a component or sub-application within themain window.
ExampleNone
See also
Hierarchy of Elements
XML Configuration Elements
Hierarchy of ElementsThe element attributes are omitted to show the structure of the XML.<mdldraw>
<module class="MDL.Draw.Modules.Splitter" orientation="horizontal"percentage="70">
<module class="MDL.Draw.Modules.Editor.EditorModule">
<menustrip>
<menu>
<action />
...
<separator />
<action />
...
</menu>
<menu>
...
<actionclass="MDL.Draw.Modules.Editor.Actions.PreferencesAction">
<DisplayPreferences />
</action>
</menu>
<menu>
<action>
<dialog>
<panel>
<label />
<button />
</panel>
...
AccelrysDraw-net.xml | Page lviii
</dialog>
</action>
</menu>
...
</menustrip>
<donetoolbar>
<action>
</donetoolbar>
<toolbar>
<action>
...
<templatedirectory>
<folder />
</templatedirectory>
<templatetoolbarmanager>
<templatetoolbar />
</templatetoolbarmanager>
</toolbar>
<palettebar>
<palette>
<multitool>
<tool />
<abbreviationtoolbar />
<tool />
<abbreviationtoolbar />
</multitool>
...
</palette>
...
</palettebar>
</module>
</module>
</mdldraw>
XML Configuration ElementsThe table alphabetically lists the elements in the AccelrysDraw-net.xml configuration file. Theelements definemenus, tools, toolbars, and other items that display in the Draw user interface.
Page lix | BIOVIA Draw • Configuration Guide
Element Parents Brief Description
abbreviationtoolbar tool Specifies the location of the standard abbreviationdefinitions file that provides the abbreviations thatdisplay in the top toolbar of the Abbreviation SequenceTool.
action menu, toolbar,donetoolbar,palettebar
Specifies a menu item and the class that performs theaction when that item is selected
button panel, radiobutton,dialog
Specifies a push button control.
checkbox panel, dialog Specifies a check box control that allows the user toselect a true or false condition.
combobox panel, dialog,radiobutton, button
Specifies a dropdown selection box.
dialog action, menuitem,tool, button
Specifies a dialog box that opens when the parentmenu item or toolbar item is selected.
DisplayPreferences action Specifies the file that stores the changes the usermakes to display preference settings, and allows you toset values for display preferences.
donetoolbar module (Editor) Specifies a toolbar that goes in the upper left corner ofthe Editor window. In the default configuration, itcontains a button that transfers themolecule back tothe application that passed it.
fieldname tool (Data Sgroup tool only) Specifies that each occurrenceof field name defines a type of attached data (Sgroupdata) that the user can select in the Attached Datadialog box.
folder templatedirectory Specifies the display name and path of a directory thatcontains template files such as molfiles, rxnfiles, sketchfiles, or SMILES files. A sketch file means entirestructure.
label panel, radiobutton,dialog
Specifies a control that displays text.
listvalue fieldname (Data Sgroup tool only) Specifies a value that the usercan select in a list in the Attach Data dialog box for theparent type of attached data.
mdldraw None Specifies the root element.
menu menustrip, popup Specifies a menu such as a pull-down menu to displayon themenu bar or a sub-menu.
AccelrysDraw-net.xml | Page lx
Element Parents Brief Description
menustrip module (Editor) Specifies themenu bar at the top of the Editor window,contains all the primary menus.
menuitem menu, popup, tool Specifies a menu item.
module mdldraw Specifies a component or sub-application within themain window.
multitool toolbar, palette,palettebar
Specifies a control that can contain multiple toolcontrols within it.
operator tool (Data Sgroup tool only) Specifies an operator that theuser can select in the Attach Data dialog box whencreating a query molecule, for example, ’>’.
palette palettebar, toolbar Specifies a container for tools that allows only one ofthe contained tools to be visible at a time.
palettebar module Specifies a vertical bar that runs down the left side ofthe Editor window, that contains palettes, tools, andmulti-tools
panel dialog, radiogroup Specifies a container for other controls, such as labels,buttons, checkboxes, and radio buttons.
popup tool Specifies a popup menu that is opened when theparent tool is selected.
radiobutton panel, radiogroup,dialog
Specifies a radio button control.
radiogroup dialog, panel Specifies a container for grouping radio buttons.
selection combobox Specifies one of the items available for selection in acombo-box list.
separator menu, toolbar,palettebar, popup
Inserts a line in a menu, or a space between elementsin a toolbar or palette bar.
shortcut shortcuts Specifies the key assignment for keyboard shortcuts.
shortcuts module (Editor) Contains one or more keyboard shortcuts.
space dialog, panel Inserts a space between components.
templatedirectory toolbar Specifies a control on the toolbar that opens theTemplate Directory dialog box.
templatetoolbar templatetoolbarmanager
Specifies a directory that contains template groups.
templatetoolbarmanager
toolbar Specifies a control to add to a toolbar that enables auser to select the group of templates available on thetoolbar.
Page lxi | BIOVIA Draw • Configuration Guide
Element Parents Brief Description
tool multitool, palette,palettebar, toolbar
Specifies a control that, when selected, causes theDraw to call a specified class to handle events thatoccur in the drawing area such as mouse drags, mousemoves, key pressed, mouse pressed, and mousereleased.
toolbar module (Editor) Specifies a horizontal bar across the top of the Editor.Usually contains tools and actions.
Alphabetic List of Elements
Element Parents Description
abbreviationtoolbar tool Specifies the location of the standard abbreviationdefinitions file that provides the abbreviations thatdisplay in the top toolbar of this Sequence Tool.
action menu, toolbar,donetoolbar,palettebar
Specifies a menu item and the class that performs theaction when that item is selected
button panel, radiobutton,dialog
A push button control
checkbox panel, dialog A check box control that allows the user to select a trueor false condition
combobox panel, dialog,radiobutton, button
A dropdown selection box
dialog action, menuitem,tool, button
A dialog box that opens when the parent menu item ortoolbar item is selected
DisplayPreferences action Specifies the file that stores the changes the usermakes to display preference settings, and allows you toset values for display preferences
donetoolbar module (Editor) A toolbar that goes in the upper left corner of theEditor window. In the default configuration, it containsa button that transfers themolecule back to theapplication that passed it.
fieldname tool (Data Sgroup tool only) Each occurrence of fieldnamedefines a type of attached data (Sgroup data) which theuser can select in the "Attached Data" dialog box
folder templatedirectory Specifies the display name and path of a directory thatcontains template files (molfiles, rxnfiles, sketch files, orSMILES files). Note: In this context, sketch means entirestructure.
AccelrysDraw-net.xml | Page lxii
Element Parents Description
label panel, radiobutton,dialog
A control that displays text
listvalue fieldname (Data Sgroup tool only) Specifies a value that the userwill be offered in a drop-down list in the "Attach Data"dialog box for the parent type of attached data
mdldraw None The root element
menu menustrip, popup Amenu, such as a pull-down menu to display on themenu bar or a submenu
menustrip module (Editor) Themenu bar at the top of the Editor window.Contains all the primary menus
menuitem menu, popup, tool Amenu item
module mdldraw A component or subapplication within themainwindow
multitool toolbar, palette,palettebar
A control that can contain multiple tool controls withinit
operator tool (Data Sgroup tool only) Specifies an operator that theuser can select in the "Attach Data" dialog box whenthe user is creating a query molecule, for example, ’>’
palette palettebar, toolbar A container for tools that allows only one of thecontained tools to be visible at a time
palettebar module A vertical bar, which runs down the left side of theEditor window, that contains palettes, tools, andmultitools
panel dialog, radiogroup A container for other controls, such as labels, buttons,checkboxes, and radiobuttons
popup tool A popup menu that is opened when the parent tool isselected
radiobutton panel, radiogroup,dialog
A radio button control
radiogroup dialog, panel A container for grouping radiobuttons
selection combobox One of the items available for selection in a comboboxdrop down list
separator menu, toolbar,palettebar, popup
Inserts a line in a menu, or a space between elementsin a toolbar or palettebar
shortcut shortcuts A keyboard shorcut key assignment
shortcuts module (Editor) Contains one or more keyboard shortcuts
Page lxiii | BIOVIA Draw • Configuration Guide
Element Parents Description
space dialog, panel Inserts a space between components
templatedirectory toolbar A control on the toolbar that opens the "TemplateDirectory" dialog box
templatetoolbar templatetoolbarmanager
Specifies a directory that contains template groups
templatetoolbarmanager
toolbar A control, which can be added to the toolbar, thatallows a user to select which group of templates will beavailable on the toolbar
tool multitool, palette,palettebar, toolbar
A control that, when selected, causes the BIOVIA DrawEditor to call a specified class to handle events thatoccur in the drawing area (for example, mouse drags,mousemoves, key pressed, mouse pressed, mousereleased, etc.)
toolbar module (Editor) A horizontal bar across the top of the Editor. Usuallycontains tools and actions.
See also
Sample Screens
Hierarchy of Elements
Description of Elements
abbreviationtoolbarSpecifies the location of the standard abbreviation definitions file that provides the abbreviations thatdisplay in the top toolbar of this Sequence Tool.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
name Yes The tooltip for the sequence tool.
path Yes The path to the standard abbreviation definitions file. For example:
path="x:/MyMolfiles/StdAbbrevs/std_abbrev_defs.xml"
where x:/MyMolfiles/ is the location of the standard abbreviationdefinitions file.
AccelrysDraw-net.xml | Page lxiv
AttributeRequired
Description
toolbarType Yes Specifies the name of the section of the standard abbreviation file thatcontains templates for this sequence tool.
Allowed values are: AA, DNA, RNA
extraTemplates No (Optional) Specifies the location of additional templates (for example,protecting groups and PEG groups) in the standard abbreviations file.
sequence No (Optional) Specifies how abbreviations are arranged on the top toolbar ofthe sequence tool.
If True, BIOVIA Draw arranges abbreviations on the toolbar in the followingorder:
(1) templates from toolbarType
(2) templates from extraTemplates if available. Within each group, thetemplates are listed in alphabetical order.
If False, (the default), BIOVIA Draw arranges abbreviations on the toolbar inalphabetical order without differentiating templates from toolbarType orextraTemplates.
Parent Element
tool
Child Elements
None
Example<multitool name="SequenceToolAA1" image="SeqToolAA124.gif" tooltip="1-letter amino acid sequence">
<tool class="MDL.Draw.Modules.Editor.Tools.SequenceTool">
<abbreviationtoolbar name="Peptide Sequences 1-letter"path="%MDLDRAW%std_abbrev_defs.xml" sequence="true" toolbarType="AA"extraTemplates="SAG" />
</tool>
<tool class="MDL.Draw.Modules.Editor.Tools.SequenceLassoTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.AbbreviationBondTool" />
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
See also
Hierarchy of Elements
XML Configuration Elements
actionSpecifies the class associated with a particular action. An action added to a menu appears as a menuitem. An action added to a toolbar appears as a button, if an image file is specified. Defined in thetoolbar.xml, donetoolbar.xml, and menubar configuration files.
Page lxv | BIOVIA Draw • Configuration Guide
When an action is selected, the function is performed a single time. Once the action is done, it has nocontinuing effect on the Draw environment. When a tool is selected,it remains active until another toolis selected. The save operation is an example of an action. The save operation is performed once eachtime Save is selected.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
name Yes Specifies the text that displays for themenu item.
Begin the namewith & to enable keyboard selectionof the item, when viewed on themenu, for example,&Open enables the Draw user to open themenu bytyping alt-o.
class Yes Specifies the fully qualified name of the class associatedwith the action.
shortcut No Specifies a shortcut key combination such as Ctrl+O forOpen.
image No Specifies the name of the image file for the image to displayof the action is added to the toolbar.
tooltip No Specifies the tooltip that displays when the cursor hoversover the button.
file No Specifies the path to and name of the file used as input oroutput.
listener No Specifies the fully qualified name of the class listening for anevent on the widget, for example, the radio button mightuse a listener such aslistener="MDL.Draw.Gui.GrayOutChildren".
enabled No Indicates if the action in enabled. When set to True theaction is enabled. The default value is True.
weight No Do not use; for internal use only.
Parent Element
menu, toolbar, donetoolbar, palettebar
Child Elements
ElementRequired
Description
dialog No Defines a dialog box that is opened when this item is selected
AccelrysDraw-net.xml | Page lxvi
ElementRequired
Description
DisplayPreferences
No When the action class is:class="MDL.Draw.Modules.Editor.Actions.PreferencesAction"
Specifies the file that stores changes in the display preferences. Youcan also use DisplayPreferences to specify values for particularpreferences.
Example<action name="&Open..." shortcut="CtrlO" image="Load.gif"class="MDL.Draw.Modules.Editor.Actions.LoadAction"/>
Calculator Example with Exact Mass<actionname="&Calculator..."class="MDL.Draw.Modules.Editor.Actions.Calcs.MolValuesAction">
<dialog title="Molecular Values" command="calDialog">
<panel height="40">
<label text="" command="error" update="T" height="20"/>
</panel>
<panel layout="horizontal" width="300" height="35">
<checkbox text="Formula Weight" command="weightcheck" value="selected"update="T" width="150"/>
<label text="" command="weight" update="T" width="150"/>
</panel>
<panel layout="horizontal" width="300" height="35">
<checkbox text="Exact Mass" command="exactmasscheck" value="selected"update="T" width="150"/>
<label text="" command="exactmass" update="T" width="150"/>
</panel>
<panel layout="horizontal" width="300" height="35">
<checkbox text="Molecular Formula" command="formulacheck"value="selected" update="T" width="150"/>
<label text="" command="formula" update="T" width="150"/>
</panel>
<panel layout="horizontal" width="300" height="35">
<checkbox text="Molecular Composition" command="compositioncheck"value="selected" update="T" width="150"/>
<label text="" command="composition" update="T" width="150"/>
<label text="" command="composition" update="T" height="40">
</panel>
<panel layout="horizontal" align="center" width="280" command="ok"/>
<button text="Paste" command="paste"/><button text="OK"
Page lxvii | BIOVIA Draw • Configuration Guide
</panel>
</dialog>
</action>
See also
Hierarchy of Elements
XML Configuration Elements
Menu
buttonA push button control.
Attributes
The data type of all attributes is CDATA.
Attribute Require d Description
text Yes The text that displays for the button.
command Yes Specifies a value that is passed to the button widget
update No If "true", the button can be updated dynamically. Default is "false".
style No Sets the style for the font. Possible values: "bold", "italic", or
"bolditalic".
Parent Element
panel, radiobutton, dialog
Child Elements
Element Require d Description
dialog No Defines a dialog box that is opened when the button is clicked.
Example
See the Example for dialog.
See also
Hierarchy of Elements
XML Configuration Elements
checkboxSpecifies a check box control that allows the user to select a true or false condition. The check boxelement is defined in the menubar-chemistry.xml configuration file.
Attributes
The data type of all attributes is CDATA.
Element Required Description
text Yes Specifies the text that displays for the check box.
AccelrysDraw-net.xml | Page lxviii
Element Required Description
command Yes Specifies a value that is passed to the check box widget
value No Indicates if the value="selected", the check box is checked.
update No Indicates true or "T" means that BIOVIA Draw should dynamically provide avalue. For more information, see the Example.
width No Specifies the width of the check box in pixels.
height No Specifies the height of the check box in pixels.
style No Sets the style for the font. The valid values are bold, italic, or
bolditalic.
Parent Element
panel, dialog
Child Elements
None
Example<panel layout="horizontal" width="300" height="35">
<checkbox text="Molecular Formula" command="formulacheck"value="selected" update="T" width="150" />
<label text="" command="formula" update="T" width="150" />
</panel>
See also
Hierarchy of Elements
XML Configuration Elements
comboboxA dropdown selection box. If editable="true", the user will also be allowed to type in text.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
command Yes Specifies a value that is passed to the combobox widget
editable No If "true" (or "T"), this combobox can be edited.
update No If "true", the button can be updated dynamically. Default is "false".
enabled No If "true" (or "T"), this combobox is enabled. If this attribute is not specified, thedefault is enabled.
Page lxix | BIOVIA Draw • Configuration Guide
AttributeRequired
Description
select No Specify a number that indicates which of the items specified in the selection childelements should be selected by default. For example, if select="1", the first itemwill appear in the combobox. If select is not specified, the combobox will initiallybe empty.
width No Width of the combobox in pixels
height No Height of the combobox in pixels
tooltip No Tooltip to display when mouse cursor is over this combobox
listener No The fully qualified name of an action class that is listening for an event on thiswidget.
style No Sets the style for the font. Possible values: "bold", "italic", or
"bolditalic".
Parent Element
panel, dialog, radiobutton, button
Child Elements
Element Require d Description
selection No Preset value offered in a combobox
Example<dialog title="Molecular Values" command="calDialog" width="300"height="300">
<panel height="60">
<combobox command="puritycombo" editable="T" update="T" enabled="T"select="3" width="100">
<selection text="50%" />
<selection text="60%" />
<selection text="70%" />
<selection text="80%" />
<selection text="90%" />
<selection text="100%" />
</combobox>
</panel>
</dialog>
See also
Hierarchy of Elements
XML Configuration Elements
AccelrysDraw-net.xml | Page lxx
dialogDefines a dialog box that opens when the parent menu item or toolbar item is selected or the parentbutton is clicked. The child elements specify the controls in the dialog box.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
title Yes Title that displays at the top of the dialog box
command Yes Specifies a value that is passed to the dialog widget
update No Alerts the dialog widget that elements in the dialog box can be updated atruntime
Parent Element
action, menuitem, tool, button
Child Elements
Element Require d Description
panel No Inserts a panel of a specified size in the dialog box. Various GUI
elements can be added to the panel.
space No Inserts a blank space of a specified size between panels. Value is in pixels.
radiogroup No Inserts a container for radio buttons
radiobutton Yes A radio button control
button No A push button control
label No A control that displays text
combobox No A dropdown selection box control that also allows text to be typed in
checkbox No A check box control that allows the user to select a true or false condition
Example<dialog title="Valence Check" command="valencecheck" width="175"height="200">
<space height="7" />
<panel width="175">
<label text="# atom(s) has exceeded valence." command="exceedText"update="T" align="center" width="175" />
<label text="Every atom has correct valence." command="correctText"update="T" align="center" width="175" />
<label text="Not available for reaction." command="rxnerror"update="T" align="center" width="175" />
</panel>
<space height="7" />
Page lxxi | BIOVIA Draw • Configuration Guide
<panel layout="horizontal" align="center" width="175" height="40">
<button text="OK" command="ok" />
</panel>
</dialog>
See also
Hierarchy of Elements
XML Configuration Elements
DisplayPreferencesSpecifies the file that stores changes Draw users make to display preference settings, and enables settingvalues for display preferences. Preferences set by the user in Draw override the values specified inDisplayPreferences.
For information on property names, types, and possible values, see the DisplayPreference class inthe API Reference.
Data Types
The following tables describes the format of data types used in DisplayPreferences.
Data typeFormats / possiblevalues
Example
Boolean true or false <AromaticRingCircles>true</AromaticRingCircles>
Color Pre-defined names in theColor class
<Background>LightGray</Background>
RGB triplets <Background>211,211,211</Background>
Enumeration Name of an enumeratedvalue
<HydrogenDisplayMode>Hetero</HydrogenDisplayMode>
Example
The following example sets several properties and specifies the default.xml as the file that overrides theXML Configuration files. The user preferences are located in a directory similar to the following:\\Users\<username>\AppData\Roaming\BIOVIA\BIOVIA Draw\Preferences.<action name="&Preferences"class="MDL.Draw.Modules.Editor.Actions.PreferencesAction">
<DisplayPreferences file="default.xml" >
<AromaticRingCircles>true</AromaticRingCircles>
<BackColor>yellow</BackColor>
<AtomHighlightDotWidth>0.1</AtomHighlightDotWidth>
<HighlightColor>Red</HighlightColor>
<ForceV3000>true</ForceV3000>
</DisplayPreferences>
</action>
See also
Synchronizing Display Settings
AccelrysDraw-net.xml | Page lxxii
donetoolbarA toolbar that goes in the upper left corner of the Editor window.
When BIOVIA Draw is called from another program, the donetoolbar contains a button that transfersthemolecule back to the application that passed it.
Attributes
None
Parent Element
module (where class="MDL.Draw.Modules.Editor.EditorModule")
Child Elements
Element Require d Description
action Yes Adds a button to the toolbar that performs a specified action when it is clicked
Example<menubar>
<donetoolbar>
<action image="Done.gif"class="MDL.Draw.Modules.Editor.Actions.DoneAction" tooltip="Transferto the Web"></action>
</donetoolbar>
</menubar>
See also
Hierarchy of Elements
XML Configuration Element
fieldname(Data Sgroup tool only) Each occurrence of fieldname defines a type of attached data (Sgroup data)which the user can select in the "Attached Data" dialog box. The user can associate attached data with allor part of a structure. Each "type" of attached data:
n Has a display namen Is associated with a particular kind of object such as "atom", "bond", "collection"n Has an associated database field, called an Sgroup field. An Sgroup field is a special kind of database
field that assigns meaning to a specific type of attached data (Sgroup data) that is stored with thestructure. The Sgroup field specifies whether the attached data is text or numeric and, for numericdata, the units. The data in Sgroup fields is accessible solely through a graphical search query; youcannot display data from an Sgroup field in a form box.
n Might have a particular numeric or non-numeric data type for the data to be stored. See Examples forSgroup data.
n Might have display units
The "Attached Data" dialog box is displayed when the user selects some or all of a structure and thenchooses "Attach data..." from the popup menu.
n To enable the end-user to register a molecule with attached data, the exact name of the databasefield, which, you, the BIOVIA DrawAdministrator, has created for this type of attached data must be
entered into the name attribute.n The data Sgroup tool is commented out in the <draw_home>\XmlConfig\palettebar.xml file.
To enable this dialog box to display, you must uncomment out all the lines in the XML file that arerelated to the data Sgroup tool. To disable it later, you can comment out those same lines.
n To represent that there is no operator, you can use <listvalue value="(none)" />n Additional information is available at Enabling the Data Sgroup Tool to Control Sgroup Data.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
readablename Yes The display name for this type of attached data. This name appears in the"Sgroup Field Name" drop-down in the "Attach Data" dialog box.
Attribute Required
Description
target Yes The kind of object with which this attached data is associated. Possiblevalues are:
n atomn bondn sketchn fragmentn collectionn file
In this context, sketch means entire structure.
name Yes The name of the database field in which this attached data will be stored. Inorder to register molecules, this namemust match the name of the fieldthat the Administrator has created. The name can be up to 30 characterslong.
type No Data type of the attached data. For example, numerical data might be int ordouble, and non-numeric data might be text.
CAUTION: BIOVIA Draw does NOT validate the type of data.
unit No Units to display in the "Attach Data" dialog box
value No Value to display in the "Attach Data" dialog box
Parent Element
tool (where class="MDL.Draw.Modules.Editor.Tools.DataSGroupTool")
Child Elements
Element Require d Description
listvalue No; zeroor more
Specifies a value that the user will be offered in a drop-down list in the "AttachData" dialog box for this type of attached data
Examples for Sgroup data
Note: BIOVIA Draw does not validate the data type of Sgroup data.
The following example show using data of type text, integer, and double. This example involves thetype of data as text.
<!-- Example: Use text data to specify non-tetrahedral chirality foran entire structure (sketch), a collection, or a fragment -->
<!-- Vocabulary of allowed values: R, S, P, M, E, Z, none.
-->
<fieldname readablename="Non-tetrahedral chirality" name="CHIRAL_NONTETRAHEDRAL"
target="sketch"
type="text" unit="" value="list">
<listvalue value="(none)"/>
<listvalue value="R"/>
<listvalue value="S"/>
<listvalue value="P"/>
<listvalue value="M"/>
<listvalue value="E"/>
<listvalue value="Z"/>
</fieldname>
This example specifies the type of data as double or integer.<!-- Example: Numeric data shows fraction of bonds in E (trans)configuration
-->
<fieldname readablename="Fraction of E (trans) bond"
name="FRACTION_E_CONFIG"
target="bond"
type="double"
unit="E"
value=""
/>
<!--Example: Numeric data attached to counterion fragment shows numberof instances of counterion on the structure
-->
<fieldname readablename="Coefficient of ion"
name="COUNTERION_COEFF"
target="fragment"
type="int"
unit="" value=""
/>
See also
Hierarchy of Elements
XML Configuration Elements
folderSpecifies the display name and path of a directory that contains template files (molfiles, rxnfiles, or
SMILES files). Use folder to define what displays in the "Template Directory" dialog box.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
name Yes The display name of the template folder that displays in the left column of the"Template Directory" dialog box.
path Yes The path to the template folder. For example:
path="%MDLDRAW%Templates\Template Sets\"
where %MDLDRAW% represents the BIOVIA Draw installation directory (notethat the constant includes the ending backslash).
readonly No If "true", the user cannot update this directory.
Parent Element
templatedirectory
Child Elements
None
Example
See the Example for templatedirectory.
See also
Hierarchy of Elements
XML Configuration Element
labelA control that displays text. A label can also be used as a placeholder to display values that are to befilled in by BIOVIA Draw. To do this:
n Set the text attribute to "" (empty string) or insert a wild-card symbol for a number ("#") as a placeholder
n Set the update attribute to "true" (or "T")
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
text Yes The text the label displays.
To have BIOVIA Draw dynamically fill in the value, set the text attribute to ""(empty string) or insert a wild-card symbol (’#’) as a place holder. Note: Youmust also set the update attribute to "true".
command Yes Specifies a value that is passed to the label widget
update No "true" (or "T")means that BIOVIA Draw should dynamically provide the value forthe label
height No Height of the label in pixels
width No Width of the label in pixels
align Positioning in parent container. Possible values: "left", "center", or
"right". Default is "left".
variable No If "true", allows a "#" symbol in the value of the text attribute to be replaced bya variable at run time. Default is "false".
style No Sets the style for the font. Possible values: "bold", "italic", or
"bolditalic".
Parent Element
panel, radiobutton, dialog
Child Elements
None
Example
See the Example for dialog.
See also
Hierarchy of Elements
XML Configuration Elements
listvalueSpecifies one of the values that the user will be offered in a drop-down list in the "Attach Data" dialogbox for the parent type of attached data.
Attributes
The data type of all attributes is CDATA.
Attribute Require d Description
value Yes Specify a value to include in the drop-down list
Parent Element
fieldname
Child Elements
None
Example
See the Examples for Sgroup data for fieldname.
See also
Hierarchy of Elements
XML Configuration Element
menuSpecifies a menu such as a pull-down menu that is available from themenu bar. If menu is a child ofanother menu, it specifies a sub-menu. Defined in the menustrip.xml, palettebar.xml, and
the AccelrysDraw-net.xml configuration files.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
text Yes Specifies the keyboard key that initiates theaction, for example, pressing char = "1"
,representing the number 1 key on the keyboard,initiates the action.
Command No Specifies a value passed to the executing classwhen an item on themenu is selected.
Parent Element
menustrip, popup, tool, menu
Child Elements
ElementRequired
Description
action No Specifies a menu item
menu No Specifies a sub-menu, for example, use the menu element if a menu item hasseveral sub-choices.
separator No Inserts a separator line in themenu
menuitem No Specifies a menu item and the command to pass to the executing class whenthemenu item is selected.
Examples
Drop-down menu example<menustripitem text="&File">
<action name="&New Molecule" shortcut="Alt5" image="New.gif"class="MDL.Draw.Modules.Editor.Actions.NewStructureAction" />
<action name="&Open..." shortcut="CtrlO" image="Load.gif"class="MDL.Draw.Modules.Editor.Actions.LoadAction" />
<action name="&Insert..." shortcut="CtrlI" image="Load.gif"class="MDL.Draw.Modules.Editor.Actions.InsertAction" />
<separator />
<action name="&Save" shortcut="CtrlS" image="Save.gif"class="MDL.Draw.Modules.Editor.Actions.SaveStructureAction" />
<action name="Save As..." image="Save.gif"class="MDL.Draw.Modules.Editor.Actions.SaveStructureAsAction" />
<action name="Save As Image..." image="Save.gif"class="MDL.Draw.Modules.Editor.Actions.SaveAsImageAction" />
<separator />
<action name="&Print..." shortcut="CtrlP"class="MDL.Draw.Modules.Editor.Actions.PrintAction" />
<action name="Print Pre&view..."class="MDL.Draw.Modules.Editor.Actions.PrintPreviewAction" />
<action name="E&xit"class="MDL.Draw.Modules.Editor.Actions.ExitAction" />
</menu>
<!-- OTHER MENUS GO HERE -->
</menubar>
Popup menu example<tool class="MDL.Draw.Modules.Editor.Tools.RadicalTool">
<popup>
<menu command="radical" text="Radical">
<!-- definition of the radical menu -->
<menuitem command="mono" text="Monoradical" />
<menuitem command="di" text="Diradical(Singlet)" />
<menuitem command="di-triple" text="Diradical(Triplet)" />
<menuitem command="radicaloff" text="Off" />
</menu>
</popup>
</tool>
See also
Hierarchy of Elements
XML Configuration Elements
menuitemSpecifies a menu item and the command to pass to the executing class when this item is selected. Theclass that is executed is specified in the tool element under which this menuitem resides.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
text Yes The name of this menu item, for example "Atom symbol...".
command Yes A value passed to the executing class when this item is selected. If you createyour own widget you can use a command attribute to pass a value that youneed to have.
state No state="title" is the only possible value. Specify this attribute if the function ofthis menuitem is to specify a menu title for a popup menu.
Parent Element
menu, popup, tool
Child Elements
Element Require d Description
dialog No Defines a dialog box that is opened when themenu item is selected.
Example<tool class="MDL.Draw.Modules.Editor.Tools.RadicalTool">
<popup>
<menu command="radical" text="Radical">
<!-- definition of the radical menu -->
<menuitem command="mono" text="Monoradical" />
<menuitem command="di" text="Diradical(Singlet)" />
<menuitem command="di-triple" text="Diradical(Triplet)" />
<menuitem command="radicaloff" text="Off" />
</menu>
</popup>
</tool>
See also
Hierarchy of Elements
XML Configuration Elements
menustripSpecifies themenu bar at the top of the Draw user interface. Contains all the primary menus. Defined inthe menustrip.xml configuration file.
Attributes
None
Parent Element
module where class="MDL.Draw.Modules.Editor.EditorModule"
Child Elements
Element Required Description
menu Yes Specifies one or moremenus.
Example
menu
See also
Hierarchy of Elements
XML Configuration Elements
moduleSpecifies a component or sub-application that runs in the Drawwindow. You can use themoduleelement to add your own components to the Draw framework. Modules are found in theMDL.Draw.Modules namespace. Defined in the AccelrysDraw-net.xml configuration file.
Draw provides two types ofmodules listed in the following table.
Module Description Class Attributes
Splitter Divides themainwindow into tworesizable panes.
MDL.Draw.Modules.Splitter class,orientation,percentage
Editor Enables renderingand editing structures
MDL.Draw.Modules.Editor.EditorModule class,ptable
Attributes
The data type of all attributes is CDATA.
Attribute Required Description Module
class Yes The class that implements the functionality for this module. SeeExample for Editor module.
All
orientation Yes,splitteronly
The orientation of the windows created by a splitter. The validvalues are as follows:
n horizontal - windows are next to each other; splitter is verticaln vertical - windows are on top of each other; splitter is
horizontal
See Example for Splitter module.
Splitter
percentage Yes,splitteronly
Specifies the percentage ofmain window occupied by the firstwindow created by a splitter. See Example for Splitter module.
Splitter
Attribute Required Description Module
ptable No Specifies the path and name of a Ptable to use instead of theinternal Ptable. You can specify a URL that points to the Ptable.The path is relative to the directory from which the BIOVIA Drawexecutable is launched, for example: <moduleclass="MDL.Draw.Modules.Editor.EditorModule"ptable="myptable.txt"></module>
Editor
Parent Element
mdldraw
Child Elements
Element Required Description Module
module No Specifies a Splitter module can have child modules, forexample, an Editor or ButtonModule.
Splitter
shortcuts No Contains one or more keyboard shortcuts. Editor
menustrip No Defines themenu bar at the top of the Editor window. Editor
donetoolbar No Specifies a toolbar that displays in the upper left corner ofthe Editor window. In the default configuration, it contains abutton that transfers themolecule back to the applicationthat passed it.
Editor
toolbar No Inserts a horizontal bar across the top of the Editor orButtonModule, and can contain tools and actions. Only onetoolbar is allowed in a module.
Editor
palettebar No Specifies a vertical bar, which runs down the left side of theEditor window, that contains palettes, tools, and multi-tools.
Editor
Examples
Module Element Example<module class="MDL.Draw.Modules.Editor.EditorModule">
<shortcuts>
<shortcut char=" " method="SwapTool" />
</shortcuts>
<menubar>
<menu text="&File">
<action name="&New Structure" shortcut="CtrlN" image="New.gif"
class="MDL.Draw.Modules.Editor.Actions.NewStructureAction" />
...
</menu>
...
</menubar>
<donetoolbar>
<action image="Done.gif"class="MDL.Draw.Modules.Editor.Actions.DoneAction" tooltip="Transfer to theWeb">
</action>
</donetoolbar>
<toolbar file="HorizontalToolbar.xml" allowdrop="true">
<action image="Clear.gif"class="MDL.Draw.Modules.Editor.Actions.ClearAllAction" tooltip="Clear All" />
...
</toolbar>
<palettebar>
<palette>
<multitool name="SingleBondTool" image="SingleBond24.gif"tooltip="SingleBond Tool">
<tool class="MDL.Draw.Modules.Editor.Tools.BondTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.RingBondTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.KeyboardTool" />
<multitool name="MenuTool" trigger="rmro,rmr" /
</multitool>
</palette>
...
</palettebar>
</module>
Splitter Module Example<module class="MDL.Draw.Modules.Splitter" orientation="horizontal"percentage="70">
<module class="MDL.Draw.Modules.Editor.EditorModule">
...
</module>
<module class="MDL.Draw.Modules.ButtonModule">
...
</module>
</module>
See also
Hierarchy of Elements
XML Configuration Elements
multitoolSpecifies a control that can contain multiple tool controls. Each tool adds functionality to themultitool.When themultitool control is selected, the Draw calls a class specified in one of the child tools to handleevents that occur in the drawing area such as mouse drags, mousemoves, and mouse pressed. Themultitool element is defined in the palettebar.xml configuration file.
You can create a multitool by combing the Bond tool and an associated keyboard shortcut tool.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
image Yes Specifies the image file name containing the imagethat displays on the button. For moreinformation, see Image Specification.
name No Specifies a name for themulti-tool. If you specify aname, you can reference the definition for thatmultitool in the BIOVIA\BIOVIA Draw<version>\XmlConfig\palettebar.xml file, byspecifying another multitool that has the samename, helpful if you need to reuse a multi-toolthat has a very long definition. For moreinformation, seeMenuTool in palettebar.xmlexample.
tooltip No Specifies text to display in the tool tip.
default No If "true", this tool is selected when BIOVIA Drawstarts up. Only one tool or multitool in the XMLconfiguration file can be specified as the default.The BIOVIA Draw default is the LassoTool.
trigger No A comma delimited list of tool events that willtrigger this object
(example: trigger = "mdo, mpo, rmpo") (seeTrigger Table)
customfile No The name of a file in which BIOVIA Drawwill savethe changes if the user customizes this multitool.
button No Specify your own button class to be used in themain toolbar instead of the regular toolbarbutton. For example:button="MDL.Draw.Gui.TemplateSelectorButton"
file No Specifies a the path and name of a file that can beused as input or output.
Parent Element
toolbar, palette, palettebar, multitool
Child Elements
Element Require d Description
tool No Specifies a tool participating as part of themultiple tool combination.
multitool No Specifies a child multitool.
Example<!-- Doublebond tool with keyboard sprouting -->
<multitool name="DoubleBondTool" image="DoubleBond24.gif" tooltip="DoubleBond Tool">
<tool class="MDL.Draw.Modules.Editor.Tools.DoubleBondTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.KeyboardTool" />
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
See also
Hierarchy of Elements
XML Configuration Elements
operatorSpecifies an operator that the user can select in the Attach Data dialog when the user creates a querymolecule, for example, ’>’ to indicate that the target value is greater than the attached data value. Theoperator element is defined in the palettebar.xml configuration file.
Note: There is onemaster list of operators that is used for all types of attached data.
Attributes
The data type of all attributes is CDATA.
Attribute Require d Description
value Yes An operator to offer in the Attach Data dialog.
Parent Element
tool where class="MDL.Draw.Modules.Editor.Tools.DataSGroupTool".
Child Elements
None
Example
See the Examples for Sgroup data for fieldname.
See also
Hierarchy of Elements
XML Configuration Elements
paletteSpecifies a container for tools that:
n Allows only one of the contained tools to be visible at a timen Allows the user to open the palette to view all contained tools and to select a different one
The palette element is defined in the palettebar.xml configuration file.
A palette is indicated by a black triangle to the right of the displayed tool icon (button). Click on the blacktriangle to open the palette and view the other choices.
Attributes
The data type of all attributes is CDATA.
Attribute RequiredDescription
default No Indicates whether the tool is active at start up and is used when the userchanges tools.
Parent Element
palettebar, toolbar
Child Elements
A tool or multi-tool must exists.
Element Required Description
tool No Specifies a control that causes the BIOVIA Draw Editor tocall the specified class to handle events that occur in thecanvas.
multitool No Specifies a control that can contain multiple toolcontrols.
Example<palette>
<tool name="Rotate/Flip Tool" image="RotateTool24.gif"tooltip="Rotate/Flip Tool" class="MDL.Draw.Modules.Editor.Tools.RotateTool"/>
<tool name="Flip/Rotate Tool" image="FlipTool24.gif" tooltip="Flip/RotateTool" class="MDL.Draw.Modules.Editor.Tools.FlipTool" />
</palette>
See also
Hierarchy of Elements
XML Configuration Elements
palettebarSpecifies a vertical bar located down the left side of the Draw user interface. The palettebar elementcontains palettes, tools, multi-tools, or actions. Draw only allows one palette bar. The palettebarelement is defined in the palettebar.xml configuration file.
Attributes
The data type of all attributes is CDATA.
Attribute RequiredDescription
name No Specifies a string that contains a name for the palettebar.
visible No Indicates the visibility of the palette bar. If this attribute is set to false, thepalette does not display. The default value is true.
Parent Element
module where class="MDL.Draw.Modules.Editor.EditorModule".
Child Elements
Element Required Description
palette No, can occurmultiple times
Specifies a container for tools and multi-tools.
tool No, can occurmultiple times
Specifies a control that causes the Draw to call a specified class tohandle events that occur in the canvas.
multitool No, can occurmultiple times
Specifies a control that can contain multiple tool controls.
separator No Inserts a space between elements in a palette bar.
action No Adds a button to the toolbar that performs a specified action when itis clicked.
Example<palettebar>
<palette>
<multitool name="RotateTool" image="RotateTool24.gif"tooltip="Rotate/FlipTool">
<tool class="MDL.Draw.Modules.Editor.Tools.RotateTool"/>
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
<multitool name="Flip/Rotate Tool" image="FlipTool24.gif"tooltip="Flip/RotateTool">
<tool class="MDL.Draw.Modules.Editor.Tools.FlipTool" />
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
</palette>
</palettebar>
See also
Hierarchy of Elements
XML Configuration Elements
panelSpecifies a container for other controls such as labels, buttons, check boxes, and radio buttons. Panelsare used to group controls in a dialog. The panel element is defined in the palettebar.xml, toolbar.xml,donetoolbar.xml, menubar-chemistry.xml, mainpanel.xml configuration files.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
height No Specifies the height in pixels.
width No Specifies the width in pixels.
layout No Specifies the orientation of the panel. The valid valuesare horizontal or vertical. The default value is vertical.
align No Specifies the positioning in parent container. The validvalues are left, center, or right. The default value is left.
border No Indicates if a border is displayed. When set to T or true ,the panel is displayed with a border.
margin No Specifies the size of themargin within the panel in pixels
Parent Element
dialog, radiogroup
Child Elements
Element Required Description
label No Specifies a control that displays text.
checkbox No Specifies a check box control that enables selecting a true or falsecondition.
button No Specifies a button control.
radiobutton No Specifies a radio button control.
panel No Specifies a panel within the current panel.
space No Inserts a blank space of a specified size between components. Thespace value is defined in pixels.
Example
For more information, see the dialog example.
See also
Hierarchy of Elements
XML Configuration Elements
popupDefines a popup menu that is opened when the parent tool is selected. The popup can also be
"triggered" by mouse or keyboard activity (see the trigger attribute).
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
trigger A comma delimited list of tool events that will trigger this object
(example: trigger = "mdo, mpo, rmpo") (see Trigger Table)
Note: Triggers can also be specified for the parent tool or grandparent multitool.The actual triggers for this popup menu is the intersection of the three sets oftriggers.
Parent Element
tool
Child Elements
One of the following elements is required:
Element Required Description
menu No Defines a menu, such as a pull-down menu to display on themenu bar
menuitem No Specifies a menu item and the value to pass to the executing class identifyingthis menu item
separator No Inserts a line in a popup menu
Example<tool class="MDL.Draw.Modules.Editor.Tools.IsotopeTool">
<popup>
<menu command="isotope" text="Isotope">
<!-- definition of the isotope menu -->
<!-- definition of the specific value menu -->
<menuitem command="specific" text="Specific value..." />
<menuitem command="isotopeoff" text="Off" />
</menu>
</popup>
</tool>
See also
Hierarchy of Elements
XML Configuration Elements
radiobuttonSpecifies a radio button control. Place radio buttons in the same panel or in the same radiogroup. Theradiobutton element is defined in menubar-chemistry.xml and palettebar.xml configurationfiles.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
text Yes Specifies the text that displays with the radio button.
command Yes Specifies a value that is passed to the radio button widget.
variable No Indicates if a pound (#) symbol can replace a variable. If the attribute is set totrue, a pound (#) symbol in the value of the text attribute to be replaced by avariable at run time. Default is "false".
update No Indicates if "true" (or "T")means that BIOVIA Draw should dynamically provideupdates.
listener No Specifies the fully qualified name of an action class that is listening for an eventon this widget, for example,listener="MDL.Draw.Gui.GrayOutChildren".
layout No Use horizontal to lay out the child elements horizontally and vertical tolayout the child elements vertically. The default is vertical.
width No Specifies the width of the radio button in pixels.
height No Specifies the height of the radio button in pixels.
style No Sets the style for the font. The valid values are bold, italic, or bolditalic.
Parent Element
panel, radiogroup, dialog
Child Elements
ElementRequired
Description
combobox No Specifies a drop-down selection box control that also enables adding text tothe list of choices.
button No Specifies a push button control.
label No Specifies a control that displays text.
Example<dialog title="Chemistry Check" command="cheminspector" width="300"height="300">
<panel width="300" height="80">
<radiobutton text="Validate structure query (SSSQUERY)"command="sssquery" update="T" width="280" height="40"/>
<radiobutton text="Validate structure for registration (RCG_SPECIFIC)"command="rcgspecific" update="T" width="280" height="40"/>
</panel>
<panel layout="horizontal" align="center" width="300" height="40">
<label text="no result yet" command="result" update="T" align="center"width="280" />
</panel>
<panel layout="horizontal" align="center" width="300" height="80">
<button text="OK" command="ok" update="T" />
<button text="Cancel" command="cancel" update="T" />
</panel>
</dialog>
See also
Alphabetic List of Elements
Hierarchy of Elements
radiogroupA container for grouping radiobuttons. Only one button in a radiogroup can be selected at one time.
Attributes
None
Parent Element
dialog, panel
Child Elements
Element Require d Description
radiobutton Yes A radio button control
panel No Inserts a panel in a dialog box
See also
Hierarchy of Elements
XML Configuration Elements
separator(palettebar.xml, toolbar.xml, menubar- files) Inserts a line in a menu or popup menu, or a spacebetween elements in a toolbar, palette or palettebar.
Attributes
AttributeRequired
Description
target No Specifies themenu to which the separator applies. Needed when adding aseparator to a popup menu. For example, <separator target="atom" /> appliesthe separator to the "Atom Properties" popup menu. Possible values: "atom","bond", and "fragment".
Parent Element
menu, palettebar, toolbar, popup
Child Elements
None
Example
See the Example for menu.
See also
Alphabetic List of Elements
Hierarchy of Elements
shortcutSpecifies a keyboard shortcut key assignment. Defined in the AccelrysDraw-net.xml configurationfile.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
char Yes Specifies the keyboard key that initiates the action, for example, pressing char= "1" ,representing the number 1 key on the keyboard, initiates the action.
class No Specifies the fully qualified name of the class that contains themethod thatperforms the action. MDL.Draw.Modules.Editor.EditorModule is thedefault class if no class is specified.
method Yes Specifies themethod that performs the action. Only use with methods that donot have parameters or a return value.
Parent Element
shortcuts
Child Elements
None
Example
The example implements a keyboard shortcut that uses the zero (0) key to resize themolecule to fit thescreen.<shorcuts>
<shortcut char="0" class="MDL.Draw.Modules.Editor.Actions.ZoomAction"method="FitMolToScreen" />
</shorcuts>
See also
Hierarchy of Elements
XML Configuration Elements
shortcutsSpecifies one or more keyboard shortcuts. Defined in the AccelrysDraw-net.xml configuration file.
Attributes
None
Parent Element
module where class="MDL.Draw.Modules.Editor.EditorModule"
Child Elements
Element Required Description
shortcut Yes Specifies a Keyboard shortcut.
Example
Shortcut
See also
Hierarchy of Elements
XML Configuration Elements
selectionSpecifies one of the items available for selection in a combobox drop down list.
Attributes
The data type of all attributes is CDATA.
Attribute Require d Description
text Yes The value to display for this item.
visible No If "false", does not display. Default is "true".
Parent Element
combobox
Child Elements
None
Example
See the Example for combobox.
See also
Hierarchy of Elements
XML Configuration Elements
spaceInserts a blank space of a specified size between components. Value is in pixels.
Attributes
The data type of all attributes is CDATA.
Attribute Require d Description
height No Specifies vertical space to insert in pixels
width No Specifies horizontal space to insert in pixels
Parent Element
dialog, panel
Child Elements
None
Example<dialog title="Valence Check" command="valencecheck" width="175"height="200">
<space height="7" />
<panel width="175">
<label text="# atom(s) has exceeded valence." command="exceedText"update="T" align="center"
width="175" />
<label text="Every atom has correct valence." command="correctText"update="T" align="center"
width="175" />
<label text="Not available for reaction." command="rxnerror"update="T" align="center"
width="175" />
</panel>
<space height="7" />
<panel layout="horizontal" align="center" width="175" height="40">
<button text="OK" command="ok" />
</panel>
</dialog>
See also
Hierarchy of Elements
XML Configuration Elements
templatedirectoryA control on the toolbar that opens the "Template Directory" dialog box. Using this dialog box, a usercan add structural fragments to their structure (for example, atoms, rings, chains, or larger structures).
Use folder to define which templates are offered in the “Template Directory" dialog box.
Personal templates that are under the directory C:\Users\<user_name>\AppData\Roaming\BIOVIA\BIOVIA Draw\Personal Templates\ (in Windows 7) willappear in the "Template Directory" window.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
class Yes The fully qualified name of the class that manages template selection
AttributeRequired
Description
button Yes The button class that is used in themain toolbar
(button="MDL.Draw.Gui.TemplateSelectorButton")
customfile Yes The name of a file in which BIOVIA Drawwill save the changes if the usercustomizes the Template Directory
tooltip No Text to display in the tooltip
image No The name of the image file that contains the image to display on the toolbar forthe template group selector. See Image Specification.
Parent Element
toolbar
Child Elements
ElementRequired
Description
folder No Specifies the display name and path of a directory that contains template files(molfiles, rxnfiles, or SMILES files)
Example<toolbar file="HorizontalToolbar.xml">
...
<templatedirectory tooltip="Template Directory"
class="MDL.Draw.Modules.Editor.Tools.TemplateSelectorTool"
customfile="templateselector.xml"
image="TempDir24.gif"
button="MDL.Draw.Gui.TemplateSelectorButton">
<!--Add folders here to add it into Template Directory
<folder name="Predefined Templates" path="%MDLDRAW%Templates\"readonly="true" />
-->
</templatedirectory>
<templatetoolbarmanagerclass="MDL.Draw.Modules.Editor.Tools.ConfigTemplateTool" tooltip="Dragmolecule onto button to change template."button="MDL.Draw.Gui.MoleculeButton" image="TempGroup24.gif"customfile="templategroupselector.xml">
<!--Add more templatetoolbar here to add it into Toolbar-->
<templatetoolbar name="Default" path="%MDLDRAW%Templates\TemplateSets\Default\" selected="true" />
<templatetoolbar name="ISIS Draw Templates"path="%MDLDRAW%Templates\Template Sets\ISIS Draw Templates\" />
<templatetoolbar name="Carbonyls"path="%MDLDRAW%Templates\Carbonyls\" />
<templatetoolbar name="Nitrogen"path="%MDLDRAW%Templates\Nitrogen\" />
</templatetoolbarmanager>
</toolbar>
See also
Hierarchy of Elements
XML Configuration Element
templatetoolbarSpecifies a folder that contains the templates included in this template toolbar.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
name Yes The display name for this template toolbar
path Yes The path to the template toolbar folder. For example:
path="%MDLDRAW%Templates\Template
Sets\Default\"
where %MDLDRAW% represents the BIOVIA Draw installation directory (notethat the constant includes the ending backslash).
selected No If "true" (or "T"), this is the active template toolbar
Parent Element
templatetoolbarmanager
Child Elements
None
Example
See the Example for templatedirectory.
See also
Hierarchy of Elements
XML Configuration Element
templatetoolbarmanagerA toolbar manager control, which can be added to themain toolbar, that allows a user to select whichtemplate toolbars will be available on themain toolbar.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
class Yes The fully qualified name of the class that manages template toolbars
button Yes The button class that is used in themain toolbar
(button="MDL.Draw.Gui.MoleculeButton")
customfile Yes The name of a file in which BIOVIA Drawwill save the changes if the usercustomizes this toolbar
image No The name of the image file that contains the image to display on the toolbar forthe template group selector. See Image Specification.
tooltip No Text to display in the tooltip
Parent Element
toolbar
Child Elements
Element Require d Description
templatetoolbar Yes The name and path of a folder that contains template groups.
Example
See the Example for templatedirectory.
See also
Hierarchy of Elements
XML Configuration Element
toolSpecifies a control that causes BIOVIA Draw to call a class to handle events occuring in the canvas suchas mouse drags, mousemoves, and key pressed. The tool element is defined in the palettebar.xml,donetoolbar.xml, mainpanel.xml, and donetoolbar.xml configuration files.
Attributes
The data type of all attributes is CDATA.
AttributeRequired
Description
class Yes Specifies the fully qualified name of the class executes when the toolis activated.
name No Specifies the name of the tool.
default No Indicates if a default tool is selected when Draw starts. If set to true,the tool is selected when BIOVIA Draw starts up. Specify only onetool or multi-tool in the XML configuration file as the default. TheBIOVIA Draw default is the LassoTool.
image No Specifies the name of image that displays for the tool. For moreinformation, see Image Specification.
AttributeRequired
Description
enabled No Indicates if the Draw user can select the tool. When set to true or "T", the user can select the tool. The default value is true.
tooltip No Specifies the text to display as the tooltip.
trigger No Specifies a comma delimited list of tool events that triggers theobject, for example, trigger = "mdo, mpo, rmpo". For moreinformation, see the Trigger Table.
customfile No Specifies he name of a file Draw saves the changes if the usercustomizes the tool.
button No Specifies your own button class to be used in themain toolbarinstead of the regular toolbar button, for example,button="MDL.Draw.Gui.TemplateSelectorButton".
file No Specifies a the path and name of a file to use as source for inputs oroutputs.
initialshortlist No Specifies the list of elements to display when the end-user clicks onthe canvas. Separate each element with the pipe (|) character.
additionallistsize No Specifies the number of elements added to the element list when theDraw user clicksMore... , and adds an additional element. When thelimit is exceeded, the least-recent addition is replaced by a morerecent addition.
displayMDLIsotopes No For the IsotopeTool, if set to true, the end-user can set the isotope ’smass value to any value within the range of +12 to -18 relative to thenon-isotopic mass value. The default value is set to false limiting theDraw user’s choice to a mass value in the set of well-known,published mass values.
Parent Element
multitool, palette, palettebar, toolbar
Child Elements
ElementRequired
Description
popup No Defines a popup menu.
menuitem No Specifies a menu item and a value to pass to the class specified in the parenttool.
Note: To improve readability, insert a popup element under tool and makethemenuitems children of the popup.
dialog No Defines a dialog box that is opened when the button for the parent tool isclicked.
ElementRequired
Description
fieldname No, zeroor more
(Data Sgroup tool only) Each occurrence of field name defines a type ofattached data (Sgroup data) which the user can select in the Attached Datadialog.
operator No, zeroor more
(Data Sgroup tool only) Specifies an operator that the user can select in theAttach Data dialog when the user is creating a query molecule, for example,’>’.
Examples
The following example defines the Zoom Tool.<palette>
<tool name="ZoomTool" image="ZoomTool.gif" tooltip="Zoom Tool"class="MDL.Draw.Modules.Editor.Tools.ZoomTool" />
<tool name="PanTool" image="Pan24.gif" tooltip="Pan Tool"class="MDL.Draw.Modules.Editor.Tools.PanTool" />
</palette>
<!-- Example of a multitool -->
<palette>
<multitool name="ChainTool" image="ChainTool24.gif" tooltip="Chain Tool">
<tool class="MDL.Draw.Modules.Editor.Tools.ChainTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.KeyboardTool" />
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
<multitool name="MultiBondTool" image="MultiBondTool24.gif"tooltip="MultibondTool">
<tool class="MDL.Draw.Modules.Editor.Tools.MultiBondTool" />
<tool class="MDL.Draw.Modules.Editor.Tools.KeyboardTool" />
<multitool name="MenuTool" trigger="rmro,rmr" />
</multitool>
</palette>
Change Atom Type tool example<multitool name="PeriodicTableTool" image="ChangeAtom24.gif" tooltip="ChangeAtomType Tool">
<tool class="MDL.Draw.Modules.Editor.Tools.AtomTool"initialshortlist="F|Cl|Br|I|" additionallistsize="2" />
See also
Hierarchy of Elements
XML Configuration Elements
toolbarInserts a horizontal bar across the top of the Draw user interface or another module. The toolbarelement usually contains tools and actions. You can only define one toolbar in a module. The toolbarelement is defined in the donetoolbar.xml, mainpanel.xml, palettebar.xml, and toolbar.xmlconfiguration files.
Attributes
The data type of all attributes is CDATA.
Attribute Required Description
name No A string that contains a name for the toolbar
visible No If "false", does not display. Default is "true".
Parent Element
modulewhere class="MDL.Draw.Modules.Editor.EditorModule"
Child Elements
ElementRequired
Description
action No Adds a button to the toolbar that performs a specified actionwhen it is clicked
tool No Adds a control that, when selected, causes the BIOVIA DrawEditor to call a specified class to handle events that occur in thedrawing area
multitool No Specifies a control that can contain multiple tool controls withinit
templatedirectory No Adds a control that opens the Template Directory dialog toenable adding structural fragments to structures such asatoms, rings, chains, or larger structures.
templatetoolbarmanager No Adds a control that allows an end-user to select which group oftemplates to make available on the toolbar
separator No Inserts a space between elements in a toolbar
palette No Specifies a container for tools and multi-tools.
Example<toolbar file="HorizontalToolbar.xml">
<action image="Clear.gif"class="MDL.Draw.Modules.Editor.Actions.ClearAllAction" tooltip="Clear All" />
<action image="Undo.gif"class="MDL.Draw.Modules.Editor.Actions.UndoAction" tooltip="Undoes the lastedit" />
<action image="Redo.gif"class="MDL.Draw.Modules.Editor.Actions.RedoAction" tooltip="Returns drawingto the state before Undo" />
<separator />
<templatedirectory tooltip="Template Directory"class="MDL.Draw.Modules.Editor.Tools.TemplateSelectorTool"
button="MDL.Draw.Gui.TemplateSelectorButton"file="%MDLDRAW%Templates/Rings/ring6.mol"
selectiongroup="true" customfile="templateselector.xml">
<folder name="Predefined Templates (Read-Only)"path="%MDLDRAW%Templates\" readonly="true" />
<folder name="Predefined Template Sets (Read-Only)"path="%MDLDRAW%Templates\Template Sets\" readonly="true" />
</templatedirectory>
<separator />
<templatetoolbarmanagerclass="MDL.Draw.Modules.Editor.Tools.ConfigTemplateTool" tooltip="Dragmolecule onto button to change template."
button="MDL.Draw.Gui.MoleculeButton" selectiongroup="true"image="TempGroup24.gif" customfile="templategroupselector.xml">
<templatetoolbar name="Default"path="%MDLDRAW%Templates\TemplateSets\Default\" selected="true" />
<templatetoolbar name="ISIS/Draw Templates"path="%MDLDRAW%Templates\TemplateSets\ISIS Draw Templates\" />
<templatetoolbar name="Carbonyls" path="%MDLDRAW%Templates\Carbonyls\" />
<templatetoolbar name="Nitrogen" path="%MDLDRAW%Templates\Nitrogen\" />
</templatetoolbarmanager>
</toolbar>
See also
Hierarchy of Elements
XML Configuration Elements
Trigger TableList of possible values for the trigger attribute.
Trigger name Description of trigger Elements
always ALWAYS tool, multitool
mpo LEFT_MOUSEPRESSED_ON_OBJECT tool, multitool, dialog, popup
rmpo RIGHT_MOUSEPRESSED_ON_OBJECT tool, multitool, dialog, popup
kpo KEYPRESSED_ON_OBJECT tool, multitool, dialog, popup
mro LEFT_MOUSERELEASED_ON_OBJECT tool, multitool, dialog, popup
rmro RIGHT_MOUSERELEASED_ON_OBJECT tool, multitool, dialog, popup
kro KEYRELEASED_ON_OBJECT tool, multitool, dialog, popup
mmo MOUSEMOVED_ON_OBJECT tool, multitool
Trigger name Description of trigger Elements
mdo MOUSEDRAGGED_ON_OBJECT tool, multitool
oen OBJECTENTERED tool, multitool
oex OBJECTEXITED tool, multitool
mp LEFT_MOUSEPRESSED_ON_CANVAS tool, multitool, dialog, popup
rmp RIGHT_MOUSEPRESSED_ON_CANVAS tool, multitool, dialog, popup
kp KEYPRESSED_ON_CANVAS tool, multitool, dialog, popup
mr LEFT_MOUSERELEASED_ON_CANVAS tool, multitool, dialog, popup
rmr RIGHT_MOUSERELEASED_ON_CANVAS tool, multitool, dialog, popup
kr KEYRELEASED_ON_CANVAS tool, multitool, dialog, popup
mm MOUSEMOVED_ON_CANVAS tool, multitool
md MOUSEDRAGGED_ON_CANVAS tool, multitool