<param>
HTML tag. Parameters of the MSketchPane
JavaBean can be set using the
setParams
method.
Parameter Meaning Default autoscale
How to display a loaded molecule:
"true"
- fit to the applet's window"false"
- use default scalingfalse
viewonly
Visualization mode: hide editing buttons; "true"
or"false"
.false
verticalbar
Enable vertical button bar and move atom, bond and edit buttons from the horizontal bar to the vertical; "true"
or"false"
.false
dispQuality
Display quality.
0
- low quality, faster rendering1
- high quality (antialiasing), slower rendering1
implicitH
How to display H labels.
off
hetero
- on heteroatomsheteroterm
- on hetero or terminal atomsall
- all atomsheteroterm
explicitH
Show explicit hydrogens. true
chiralitySupport
When 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
- alwaysoff
ezVisible
Show ( true
) or hide (false
) E/Z labels.false
background
Background color in hexa. molbg
Molecule background color in hexa. colorScheme
Color scheme.
mono
- monochromecpk
- Corey-Pauling-Kultunshapely
- shapely (residue types)group
- residue sequence numberscpk rendering
Rendering style.
wireframe
- wireframewireknobs
- wireframe with knobssticks
- 3D sticksballstick
- ball & stickspacefill
- ballswireframe
stickThickness
3D stick diameter for "sticks" and "ballstick" rendering modes, in Angstroms. 0.1 ballRadius
Ball radius for "ballstick" rendering mode, in units of covalent radius. 0.5 scale
Magnification. A 1.54 Å long C-C bond is magnified to scale pixels. 26.4 atomsize
Atom label font size in C-C bond length units:
atomsize*1.54 Å = atomsize*scale points 0.4 bondWidth
Width of double bond in C-C bond length units:
width*1.54 Å = width*scale pixels 0.18 stickdst
Stick distance of atoms in C-C bond length units. 0.3 mergedst
Merge distance of atoms in C-C bond length units. 0.1 downWedge
Wedge bond display convention. Down wedge points downward in MDL's convention ( mdl
), upward (at the chiral center) in Daylight's (daylight
).mdl
importConv
Conversion(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 cleanOpts
Options for cleaning (2D or 3D, depending on cleanDim) clean2dOpts
Options for 2D cleaning (0D->2D)
O0
- no optimizationO1
- optimize if neededO2
- optimizeO1
clean3dOpts
Options for 3D cleaning (0D->3D)
O0
- lightweight optimizationOD
- Dreiding optimizationO0
cleanDim
Number of space dimensions for cleaning. See also: cleanOpts, importConv.
2
- two-dimensional cleaning3
- three-dimensional cleaning2
showSets
Show the specified atom sets only. Comma separated list of set sequence numbers (0, ..., 63). setColoringEnabled
Atom/bond set coloring. true
atomSetColor0
atomSetColor1
...
atomSetColor63Atom set color in hexa. bondSetColor1
...
bondSetColor63Bond set color in hexa. undo
Maximum number of undo operations. 50 moreEnabled
Enable/disable the More button. true
elements
Comma-separated list of allowed elements ( H
,He
,Li
, ...). All elements in an atomic number interval can be specified with the shortX-Y
notation.
Example:"B-F,P-Cl"
. HereB-F
is equivalent toB,C,N,O,F
.
H-Ha queryAtoms
Comma-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.atomStrings
Comma-separated list of string type atom properties. Example:
alias
- atom alias, used in molfilessmarts
- SMARTS query atom string"smarts"
.extraBonds
Comma-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.reactionSupport
Enables/disables reaction arrow drawing. true
tmpls0
tmpls1
tmpls2
...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 xtmpls
File containing extra templates. Extra templates are left to the normal templates (see tmpls) in the template panel. abbrevgroups
File containing the abbreviated groups. chemaxon/marvin
/templates
/default.abbrevgroupmolFormat
Default file format: mol
,csmol
,smiles
,cml
,pdb
,pov
,sybyl
, orxyz
.mol
simpView
Switches 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
0
debug
Debug mode. Possible values: 0, 1, 2. 0 atomSymbolsVisible
Shows atom symbols
true
- displayfalse
- do not displaytrue
atomNumbersVisible
Show atom numbers
true
- displayfalse
- do not displayfalse
atomMappingVisible
Show atom mapping
true
- displayfalse
- do not displaytrue
valenceErrorVisible
Highlight (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 errorstrue
reactionErrorVisible
Highlight 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 rectangletrue
grinv
Set visibility of graph invariants.
true
- show graph invariantsfalse
- hide themfalse
skin
Change 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
.MetalLookAndFeelsketchHelp
Sketcher help contents. chemaxon/marvin/help
/sketch-index.htmlsketchQuickHelp
Sketcher quick help. chemaxon/marvin/help
/sketch.htmlviewHelp
Viewer help contents. chemaxon/marvin/help
/view-index.htmlviewQuickHelp
Viewer 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 menubar
Enable the embedded menubar in the Swing applet. true
detach
Detachment behavior. The value consists of two optional arguments, show/hide
andsize
. 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=
widthx
height"
Examples: "show
", "size=500x500
", "hide,size=500x500
".size=444x350
mol
The 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)"preload
Comma-separated list of external modules to preload. External modules are class files in the chemaxon/marvin/modules
directory.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"
getMol
from JavaScript in a buggy browser/JVM combination. Without preloading,getMol
might freeze Netscape 6 (Sun Java 1.3) and Netscape 3 would also fail because these browsers cannot call network functions from JavaScript.cacheMols
Store loaded molecules in an internal cache ( true
orfalse
).false loadMols
Comma-separated list of molfiles to preload. Useful for caching molecules in JavaScript "slideshows". usedJars
Comma-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. imageSaveURL
The 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.jsp
imageShowURL
The 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 filename
If 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. type
Sets the type of the file and its extension.
It can be:"mol", "csmol", "pdb", "sybyl", "xyz", "jpeg", "png", "pov", "svg"
.where
Sets 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.
data
If 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.JMenuItem
File/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"
Molecule
Molecule changed. "file"
java.io.File
Molecule file changed from File/Open or File/Save As. "implicitH"
String
Implicit Hydrogen display style changed. "explicitH"
Boolean
Explicit Hydrogen display style changed.
true
: show explicit H atoms
false
: hide explicit H atoms
"colorScheme"
String
Color scheme changed.
"autoscale"
Boolean
Autoscale changed.
"rendering"
String
Rendering style changed. "stickThickness"
Double
Sticks diameter changed.
"ballRadius"
Double
Ball radius changed.
"grinv"
Boolean
Graph invariants displayed/not displayed. "downWedge"
String
Down wedge bond orientation changed. "objectAtPointer"
Object
The MolAtom or MolBond object at the mouse pointer. "invisibleSets"
Long
Visibility of atom sets changed. "atomNumbersVisible"
Boolean
Visibility of atom numbers changed. "atomMappingVisible"
Boolean
Visibility of atom mapping changed. "popupMenusEnabled"
Boolean
Popup menus are enabled/disabled. "valenceErrorVisible"
Boolean
Visibility of valence errors changed. "reactionErrorVisible"
Boolean
Visibility 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()); } }