<param> HTML tag. Parameters of the MSketchPane
JavaBean can be set using the
setParams method.
Parameter Meaning Default autoscaleHow to display a loaded molecule: 
"true"- fit to the applet's window"false"- use default scalingfalseviewonlyVisualization mode: hide editing buttons; "true"or"false".falseverticalbarEnable vertical button bar and move atom, bond and edit buttons from the horizontal bar to the vertical; "true"or"false".falsedispQualityDisplay quality. 
0- low quality, faster rendering1- high quality (antialiasing), slower rendering1implicitHHow to display H labels. 
offhetero- on heteroatomsheteroterm- on hetero or terminal atomsall- all atomsheterotermexplicitHShow explicit hydrogens. truechiralitySupportWhen to show atom chirality (R/S). 
off- neverselected- if chiral flag is set for the molecule or the atom's enhanced stereo type is absoluteall- alwaysoffezVisibleShow ( true) or hide (false) E/Z labels.falsebackgroundBackground color in hexa. molbgMolecule background color in hexa. colorSchemeColor scheme. 
mono- monochromecpk- Corey-Pauling-Kultunshapely- shapely (residue types)group- residue sequence numberscpk renderingRendering style. 
wireframe- wireframewireknobs- wireframe with knobssticks- 3D sticksballstick- ball & stickspacefill- ballswireframestickThickness3D stick diameter for "sticks" and "ballstick" rendering modes, in Angstroms. 0.1 ballRadiusBall radius for "ballstick" rendering mode, in units of covalent radius. 0.5 scaleMagnification. A 1.54 Å long C-C bond is magnified to scale pixels. 26.4 atomsizeAtom label font size in C-C bond length units: 
atomsize*1.54 Å = atomsize*scale points 0.4 bondWidthWidth of double bond in C-C bond length units: 
width*1.54 Å = width*scale pixels 0.18 stickdstStick distance of atoms in C-C bond length units. 0.3 mergedstMerge distance of atoms in C-C bond length units. 0.1 downWedgeWedge bond display convention. Down wedge points downward in MDL's convention ( mdl), upward (at the chiral center) in Daylight's (daylight).mdlimportConvConversion(s) after molecule loading. Currently the following options are implemented: 
"a" or "+a" aromatization "-a" dearomatization "H" or "+H" add explicit H atoms "-H" remove explicit H atoms "c" automatic cleaning cleanOptsOptions for cleaning (2D or 3D, depending on cleanDim) clean2dOptsOptions for 2D cleaning (0D->2D) 
O0- no optimizationO1- optimize if neededO2- optimizeO1clean3dOptsOptions for 3D cleaning (0D->3D) 
O0- lightweight optimizationOD- Dreiding optimizationO0cleanDimNumber of space dimensions for cleaning. See also: cleanOpts, importConv.
2- two-dimensional cleaning3- three-dimensional cleaning2showSetsShow the specified atom sets only. Comma separated list of set sequence numbers (0, ..., 63). setColoringEnabledAtom/bond set coloring. trueatomSetColor0
atomSetColor1
...
atomSetColor63Atom set color in hexa. bondSetColor1
...
bondSetColor63Bond set color in hexa. undoMaximum number of undo operations. 50 moreEnabledEnable/disable the More button. trueelementsComma-separated list of allowed elements ( H,He,Li, ...). All elements in an atomic number interval can be specified with the shortX-Ynotation.
Example:"B-F,P-Cl". HereB-Fis equivalent toB,C,N,O,F.
H-Ha queryAtomsComma-separated list of query atoms and properties. Example:
any- any atom ("A" in molfile, "*" in SMARTS),arom- aliphatic and aromatic, ("a" and "A" in SMARTS),conn- total number of connections, ("X" in SMARTS),H- total number of hydrogens, ("H" in SMARTS),hetero- heteroatom ("Q" in molfile, "[!C!H]" in SMARTS),list- atom list,notlist- atom 'NOT' list,Rgroup- Rgroups,rings- "R" in SMARTS,srs- smallest ring size, "r" in SMARTS,val- valence, "v" in SMARTS,"list,notlist".
See also: Query properties in file formats.atomStringsComma-separated list of string type atom properties. Example:
alias- atom alias, used in molfilessmarts- SMARTS query atom string"smarts".extraBondsComma-separated list of extra bond types. Example:
arom- Aromatic bond,any- Any bond,1or2- "Single or Double" query bond,aromany- "Single or Aromatic" and "Double or Aromatic" query bond types,topology- "Chain" and "Ring" bonds (in molfiles),wedge- Up and Down stereo wedge bonds,either- "Up or Down" and "Cis or Trans",ctu- "Cis or Unspecified" and "Trans or Unspecified"."arom,wedge".
See also: Query properties in file formats.reactionSupportEnables/disables reaction arrow drawing. truetmpls0tmpls1tmpls2
...The format of this parameter is :name:file, where name is the template group name, and file is the sdf or cssdf file containing the template structures. The file can be optionally compressed with GZIP (Java >= 1.1). A button can be rotatable if the rotation.unit fields are specified in the SDfile (the unit rotation angle in degrees). For template tables, the endrow fields must be specified for templates that are last in a row. Template tables are shown in their own window. Template buttons may have a title if the abbreviation fields are specified in the SDfile.
click here xtmplsFile containing extra templates. Extra templates are left to the normal templates (see tmpls) in the template panel. abbrevgroupsFile containing the abbreviated groups. chemaxon/marvin
/templates
/default.abbrevgroupmolFormatDefault file format: mol,csmol,smiles,cml,pdb,pov,sybyl, orxyz.molsimpViewSwitches on/off "visual fragment placement". This option can also be set from the View/Misc/Object in hand menu.
- 0 - show all
 - 1 - hide bonds
 - 2 - hide bonds and templates
 0debugDebug mode. Possible values: 0, 1, 2. 0 atomSymbolsVisibleShows atom symbols 
true- displayfalse- do not displaytrueatomNumbersVisibleShow atom numbers 
true- displayfalse- do not displayfalseatomMappingVisibleShow atom mapping 
true- displayfalse- do not displaytruevalenceErrorVisibleHighlight (by underlining) the labels of those atoms with valence errors. This option can also be set from the View/Misc/Valence Errors menu. 
true- display errorsfalse- do not display errorstruereactionErrorVisibleHighlight invalid reactions with a red rectangle around the reaction arrow. You can also change its value from View/Misc/Reaction Errors menu. 
true- display rectanglefalse- do not display rectangletruegrinvSet visibility of graph invariants. 
true- show graph invariantsfalse- hide themfalseskinChange the component's Look & Feel (only in SWING). If you do not specify this parameter, Marvin will use the default LookAndFeel style. 
This parameter value is the name of the new LookAndFeel class.javax.swing.plaf
.metal
.MetalLookAndFeelsketchHelpSketcher help contents. chemaxon/marvin/help
/sketch-index.htmlsketchQuickHelpSketcher quick help. chemaxon/marvin/help
/sketch.htmlviewHelpViewer help contents. chemaxon/marvin/help
/view-index.htmlviewQuickHelpViewer quick help. chemaxon/marvin/help
/view.html
Applet example:
Bean example:<applet CODE=MSketch WIDTH=480 HEIGHT=400> <param NAME="background" VALUE="#cccccc> <param NAME="molbg" VALUE="#ffffff"> <param NAME="implicitH" VALUE="hetero"> </applet>
MSketchPane sketchPane = new MSketchPane();
sketchPane.setParams(
    "background=#cccccc\n"+
    "molbg=#ffffff\n"+
    "implicitH=hetero\n");
Parameter Meaning Default menubarEnable the embedded menubar in the Swing applet. truedetachDetachment behavior. The value consists of two optional arguments, show/hideandsize. If both arguments are included, they must be separated by a comma.
To detach the sketcher from the web page and display it in a window, set"show".
To detach the sketcher but do not display the window, set"hide".
Both settings make the applet on the web page look like a molecule viewer.
The initial size of the sketcher window can be specified with "size=widthxheight"
Examples: "show", "size=500x500", "hide,size=500x500".size=444x350molThe molecule file to be loaded at startup, as either a URL or the molfile itself (inline) in MDL mol or compressed mol format. 
If you specify the molfile inline, then you must end all the molfile lines with "\" (backslash). The file format and/or import options can be specified if one of the following forms is used:
"file(options)",
"file(MULTISET,options)",
"file(format:)",
"file(format:options)", or
"file(format:MULTISET,options)".
If the MULTISET option is specified, then a multi-molecule file is read into one molecule object containing multiple atom sets.
Examples: "foo.xyz(f1.4C4)", "foo.xyz.gz(gzip:xyz:MULTISET,f1.4C4)"preloadComma-separated list of external modules to preload. External modules are class files in the chemaxon/marvin/modulesdirectory.Note. Preloading is required if you call
module argument of getMol() call that requires it MolExport"mol","csmol"SmilesExport"smiles"CmlExport"cml"Parity"mol","smiles"(but not"smiles:0")PdbExport"pdb"PovExport"pov"SybylExport"sybyl"XYZExport"xyz"getMolfrom JavaScript in a buggy browser/JVM combination. Without preloading,getMolmight freeze Netscape 6 (Sun Java 1.3) and Netscape 3 would also fail because these browsers cannot call network functions from JavaScript.cacheMolsStore loaded molecules in an internal cache ( trueorfalse).false loadMolsComma-separated list of molfiles to preload. Useful for caching molecules in JavaScript "slideshows". usedJarsComma-separated list of additional jar files that can be used by the applet. The additional files have to be defined with their paths relative to the applet's base. imageSaveURLThe URL of the cgi, jsp or asp file use to save the image posted by the applet to the server. 
The cgi has to read the image from the standard input into a byte array, save it to a temporary file and send back the absolute path of the file to the applet.
A jsp example:saveimage.jspimageShowURLThe URL of the cgi, jsp or asp file that either saves the data into a file generated by the applet or shows the generated image that was saved to a temporary file by imageSaveURL.
The posted parameters:A jsp example:
name description filenameIf the applet generated an image, it was saved into a temporary file on the server. In this case this parameter contains the absolute path of the temporary file. typeSets the type of the file and its extension. 
It can be:"mol", "csmol", "pdb", "sybyl", "xyz", "jpeg", "png", "pov", "svg".whereSets the location in which the image will be "shown" 
Possible values:"file", "browser", null.
- "file" - the generated data will be saved into a file.
 - "browser" - the data will be displayed in a browser window.
 dataIf the applet generated a kind of molecule format file (see: formats), it is posted by this parameter. In this case the text file have to be saved as a file. showimage.jsp
MSketchPane,
the java.awt.event.ActionListener interface must be implemented.
Source name Source component type Meaning "close"javax.swing.JMenuItemFile/Close has been chosen, sketcher window should be closed. 
Example:
sketchPane.addActionListener(this);
    ...
public void actionPerformed(ActionEvent ev) {
    if(ev.getSource() instanceof JComponent) {
	String name = ((JComponent)ev.getSource()).getName();
	if(name.equals("close")) {
	    dispose();
	}
    }
}
MSketchPane,
the java.beans.PropertyChangeListener interface must be implemented.
Property name Type Meaning "mol"MoleculeMolecule changed. "file"java.io.FileMolecule file changed from File/Open or File/Save As. "implicitH"StringImplicit Hydrogen display style changed. "explicitH"BooleanExplicit Hydrogen display style changed. 
true: show explicit H atoms
false: hide explicit H atoms
"colorScheme"StringColor scheme changed. 
"autoscale"BooleanAutoscale changed. 
"rendering"StringRendering style changed. "stickThickness"DoubleSticks diameter changed. 
"ballRadius"DoubleBall radius changed. 
"grinv"BooleanGraph invariants displayed/not displayed. "downWedge"StringDown wedge bond orientation changed. "objectAtPointer"ObjectThe MolAtom or MolBond object at the mouse pointer. "invisibleSets"LongVisibility of atom sets changed. "atomNumbersVisible"BooleanVisibility of atom numbers changed. "atomMappingVisible"BooleanVisibility of atom mapping changed. "popupMenusEnabled"BooleanPopup menus are enabled/disabled. "valenceErrorVisible"BooleanVisibility of valence errors changed. "reactionErrorVisible"BooleanVisibility of reaction errors changed. 
Example:
    sketchPane.addPropertyChangeListener(this);
    ...
public void propertyChange(PropertyChangeEvent ev) {
    String name = ev.getPropertyName();
    if(name.equals("file")) {
	File f = (File)ev.getNewValue();
	if(f != null)
	    setTitle("MarvinSketch: "+f.getName());
    }
}