<param> HTML tag. Parameters of the MViewPane
JavaBean can be set using the
setParams function.
Parameter Meaning Default dispQualityDisplay 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 the chiral flag is set for the molecule or the atom's enhanced stereo type is absoluteall- alwaysoffezVisibleShow ( true) or hide (false) E/Z labels.falsenavmodeMouse drag action.
translate- move the structurezoom- change magnificationrotZ- rotate in the screen's planerot3d- 3D rotationrotZbackgroundBackground color in hexa. molbgMolecule background color in hexa. colorSchemeColor scheme.
mono- monochromecpk- Corey-Pauling-Kultunshapely- shapely (residue types)group- residue sequence numberscpk winScaleMagnification in the zoom window. A 1.54 Å long C-C bond is magnified to winScale pixels. 26.4 tabScaleMagnification in the molecule table. Each cell has the specified magnification if positive. The scaling is automatic if negative (-1). -1 autoTabScaleAutomatically change scale when component size changed. Only in the swing version, only applicable to the MViewPane bean. false atomsizeAtom label font size in C-C bond length units:
atomsize*1.54 Å = atomsize*scale points, where scale is the current magnification.0.4 bondWidthWidth of double bond in C-C bond length units:
width*1.54 Å = width*scale pixels, where scale is the current magnification.0.18 molFormatDefault file format: mol,csmol,smiles,cml,pdb,pov,sybyl, orxyz.moldebugDebug mode. Possible values: 0, 1, 2. 0 selectableUse selectable=falseto forbid molecule selection with mouse click.trueselection0
selection1
selection2
...Comma-separated list of atom numbers (0, ..., n-1).
Selected atoms are highlighted.
In a simple one-molecule viewer,selection0must be used. In a molecule table,selectionn corresponds to molecule cell n.editableModes: display only (0) or editable (1, 2). If editable=2, then doubleclick launches MarvinSketch (instead of a viewer window).0downWedgeWedge 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 cleaning2atomSet0.1 ... atomSet0.63
atomSet1.1 ... atomSet1.63
...Atom sets. Comma separated list of atom indices (0, ..., n-1). An atom in molecule cell number N will be in set M if its number appears in the atomSetN.M list. By default, all atoms are in set 0. atomSetColor0
...
atomSetColor63Atom set color in hexa. bondSet0.1 ... bondSet0.63
bondSet1.1 ... bondSet1.63
...Bond sets. Comma separated list of atom index pairs in i-j format, where i, j = 0, ..., n-1. A bond in molecule cell number N will be in set M if the corresponding atom pair appears in the bondSetN.M list. By default, all bonds are in set 0. bondSetColor1
...
bondSetColor63Bond set color in hexa. showSetsShow the specified atom sets only. Comma separated list of set sequence numbers (0, ..., 63). setColoringEnabledAtom/bond set coloring. trueatomSymbolsVisibleShow atom symbols
true- displayfalse- do not displaytrueatomNumbersVisibleShow atom numbers
true- displayfalse- do not displayfalseatomMappingVisibleShow atom mapping
true- displayfalse- do not displaytruegrinvDisplay graph invariants
true- displayfalse- do not displayfalseskinChange 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
.MetalLookAndFeeldetachableEnable or disable popping up detached viewer window. If this parameter is true, the selected molecule can be displayed in separate window by selecting "Window" menu item in the popup menu or by doubleclicking on the canvas. Viewer is not detachable if detachable parameter is false. (See also editable.) trueimportEnabledAllow or forbid molecule import. If this parameter is false, paste function is disabled in MarvinView, also Importoption is disabled in the Molecule Source window. (Use editable parameter to forbid the editing of the molecules.)truesketchHelpSketcher 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
Simple viewer applet example:
<applet CODE=MView WIDTH=100 HEIGHT=100> <param NAME="molbg" VALUE="#a0ffa0"> <param NAME="mol" VALUE="Pyrrole\ ... M END\ "></applet>
Parameter Meaning molThe URL of the molecule file or the molfile itself (inline) in MDL mol or compressed mol format.
If you specify the molfile inline in an HTML file (as an applet parameter), then you must end all 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 getM() 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"getMfrom JavaScript in a buggy browser/JVM combination. Without preloading,getMmight 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).loadMolsComma-separated list of molfiles to preload. Useful for caching molecules in JavaScript "slideshows".
Parameter Meaning Default 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 animateStart an XYZ animation sequence, or starts rotating the specified 3D molecule(s).
Possible values:off,all, or a comma-separated list of molecule indices (0...n-1).
Note: This parameter does not apply to beans, only to applet.offanimFPSNumber of frames per second in 3D animation. 10animDelayDelay (seconds) before repeating the animation. 0animSyncWhether the animations in different cells should be synchronized. falsespin
spin0
spin1
spin2
...Spinning rate and axis for animated molecules. Spinning rate is specified in degrees per second, the axis is specified with a 3D vector. Numbers are separated by commas.
Note: XYZ animations do not spin by default, only if this parameter is set.36,0,1,0script
script0script1script2...Script containing a subset of RasMol commands delimited by semicolons. If this applet parameter is specified, then the mol parameter is neglected. The molecule(s) must be loaded using the load command in the script.
Note: To load the script from a file, use the script command:
<param NAME="script" VALUE="script myscript.spt">
rowsNumber of "molecule rows", including the optional header row. colsNumber of "molecule columns". visibleRowsNumber of visible rows. The table is scrollable if less than rows. Default value: visibleRows = rows. visibleColsNumber of visible columns. The table is scrollable if less than cols. Default value: visibleCols = cols. layoutLayout of molecule, label, button and checkbox components in a cell. layoutHLayout for the header row. paramParameters of the components. paramHParameters for the header row. cell0
cell1
cell2
...Contents of the cells.
Use these instead of themolparameter.borderBorder width in pixels. Default: 0 (no border between cells).
Increases the total appletWIDTHby border*(cols-1), and theHEIGHTby border*(rows-1).
layoutlayout and layoutH parameters are in the
following format:
":rows:cols:type:k:l:h:w:anchor:fill:[weighty:[weightx:]]type:k:l:...",
where : is the field separator,
rows is the number of rows in the cell,
cols is the number of columns, type is the type of the
component in row k, column l of the current cell,
h is the height of the component (rows),
w is the width (columns).c (center), n (north), s (south),
e (east), w (west), ne (northeast), etc.
n (none), h (horizontal),
v (vertical) or b (both).
If you are familiar with Java, you might have noticed that anchor, fill, weightx and weighty have the same names as the fields of the GridBagConstraints class. The reason is that MarvinView uses the GridBagLayout class to determine the places and sizes of the components.
Component types: M (molecule), L (label),
B (button), C (checkbox), T (text field) and
I (image).
Example:
<param NAME=layout VALUE=":4:3: M:0:0:4:1:c:n: L:0:2:1:1:c:n:0:10: L:1:2:1:1:c:n:0:10: C:0:1:1:1:c:n: C:1:1:1:1:c:n: C:2:1:1:1:c:n: B:3:1:1:1:c:n:10">
paramparam or paramH parameter, the first character is
the field separator (`:' here).
The first field is the type of the first component
(M, L, B, C or T),
followed by its n parameters in the forthcoming n fields.
Then the same for the second component, etc.
Component parameters:
The fontprops field usually contains only one number, the font size. Additional properties are "b" (bold font) and "i" (italic). A 12pt bold italic font is specified as "12bi".
:M:width:heightwidth and height are in pixel units. :L:fontpropsfontprops: font properties. :B:fontprops::
:B:fontprops:description:
:B:fontprops:description:framefontprops: font properties,
description: description string,
target: target frame.:C:fontprops:
:C:fontprops:descriptionfontprops: font properties,
description: description string.
You may specify the checkbox group number in the type field, by writinggn next to the type-specifying characterC, where n is the group number. No more than one button in a group can be pressed at the same time.:T:fontprops
:T:fontprops:columns
:T:fontprops:columns:editablefontprops: font properties,
columns: number of columns,
editable: editable (rw) or read only (r).
Example:
<param NAME=param VALUE=": M:100:100: L:10b: C:10:select this molecule: Cg0:10:include this structure: B:10:search for more molecules like this:_self: T:10: T:10:15: T:10:15:rw">
cellicelli parameter, the first character is
the field separator (`|' here).
The fields contain the component parameters in order.
| Component | Parameters | Description |
|---|---|---|
M |
|molfile |
molfile: the molecule URL or the molecule itself (inline) in MDL mol or compressed mol format. |
L |
|label |
label: the label string. |
B |
|label|spec|action |
label: the button label, spec: the special character ( % from now),action: the action string. |
C |
||||||||state|||||state|-|-... |label0|label1|state|action1|action2 |
label0: label for the unchecked state, label1: label for the checked state, state: default state (0, 1 or nothing), action0: action string for unchecking, action1: action string for checking. For a "real" checkbox, both labels have to be empty string, otherwise the "checkbox" will be buttonlike. If both action strings are empty, then the checkbox is disabled. To make it enabled without specifying JavaScript actions, the action values must be " -". Example:
"|||1|-|-" |
T |
||string |
string: initial value. |
I |
|iconfile|||iconfile|action|title |
iconfile: GIF or JPEG file containing the icon, action: image file or js:JavaScript codetitle: window title, only used if action is an image file. |
js:javascript expression for buttons, checkboxes and images.
The button action string may contain %C
(where % is the special character), which is
substituted with the checkbox states represented as a hexadecimal number.
The nth bit in this number is the state of the nth
checkbox.
A javascript expression can be used only if you specify the
MAYSCRIPT attribute in the applet tag.
It is suggested to use celli parameter in MViewPane JavaBean to create an advanced layout (containing more visual elements than one molecule with a label, such as, checkboxes, buttons, images, etc.). Since Javascript is not supported in MarvinBeans: use ActionListeners and ItemListeners in your code instead of action strings. See marvinbeans/examples/view-checkbox/MViewExampleWithCheckbox.java.
Example:
<param NAME=cell2 VALUE="|\ MSketch 04169816382D\\ 66 72 0 0 0 0 0 0 0 0999 V2000\mcIWFRwV60\ l0i01\M END\| 1002| not bad| ||1|js:cbx(1002,'not selected')|js:cbx(1002,'selected')| Include | Include ||js:cbx(1002,'no include')|js:cbx(1002,'include')| Exclude | Exclude ||js:cbx(1002,'no exclude')|js:cbx(1002,'exclude')| Search |%|searchmore.cgi?mol=1002&n=5&cbx=%C">
MViewPane,
the java.beans.PropertyChangeListener interface must be implemented.
Property name Type Meaning "mols#"Molecule[]Molecule(s) changed in the specified cell (# = 0, ..., n-1). "implicitH"StringImplicit Hydrogen display style changed. "explicitH"BooleanExplicit Hydrogen display style changed.
true: show explicit H atoms
false: hide explicit H atoms
"navmode"StringDrag action changed.
translate: Translate,zoom: Zoom,rotZ: Rotate,rot3d: Rotate in 3D"colorScheme"StringColor scheme 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. "animFPS"DoubleAnimation frame rate changed. "animDelay"DoubleAnimation repeat delay changed. "animSync"DoubleAnimation synchronization changed. "invisibleSets"LongVisibility of atom sets changed. "winScale"DoubleZoom window magnification changed. "tabScale"DoubleMagnification for molecule cells changed. "atomNumbersVisible"BooleanVisibility of atom numbers changed. "atomMappingVisible"BooleanVisibility of atom mapping changed. "popupMenusEnabled"BooleanPopup menus are enabled/disabled. "detachable"BooleanDetachability of viewer changed.
Since the behaviour of buttons and checkboxes in molecule cells are similar as AbstractButton objects, they can fire ActionEvents and ItemEvents.
getC, setC,
setActionC, setActionB or setM
called with too large argument.