# Developers: to add a description of changes you have made,
# add it on line starting with # below the "version=..." line

version=11.5.52

# new feature: calculate pointGroup
# new feature: draw pointGroup
# new feature: write pointGroup
#  including x = script("write pointGroup")
# new feature: webexport now compresses data files over 512 MB
# new feature: calculate pointGroup  -- preliminary only -- untested

# -----------------------------------------------------------------------------

#version=11.5.51

# bug fix: 11.5.49 and 11.5.50 broken for ".max"

# new feature: PRELIMINARY aniso_beta for cif files -- has not been checked for correct Ortep type -- set to 0 for now
# new feature: application select button reinstated
# new feature: application pick button reinstated
# new feature: application measure button tied to picking style
# new feature: application [>|] button
# bug fix: ramachandran/quaternion "reset" not decoupled from model decouple
# code: model orientation saved with model.
# bug fix: set axesOrientationRasmol finally correctly implemented
# new feature: axes labels change subtly for set axesMolecular and setAxesOrientationRasmol
# bug fix: JmolViewer interface deprecated "rotateTo..." methods changed to "rotate..."
#  because that's what they really do.
# bug fix: set defaults jmol/rasmol must do reset().

# new feature: webexport now cleans up scratch files on deletion of instances and program exit.

# -----------------------------------------------------------------------------

#version=11.5.50

# bug fix: vibration thread not closing down for applet destroy when applet is off-screen
# bug fix: was reading server path for local path from history in Webexport
# bug fix: $ptx[2] notation broken in 11.5.49
# code: various cleaning/simplifying
# code: way cleaner quaternion derivative calculation code

# -----------------------------------------------------------------------------

#version=11.5.49

# bug fix: strange "scripted: ?" message with measurements removed
# bug fix: extra values in measure reporting, and wrong format
# bug fix: 11.5.48 is broken for scripts with array definitions such as
#   p = array(); p[pt] = ....
# code: simplification/unification of statement length checking AFTER allowing for variable substitution
# code: removal of unnecessary/inflexible compilation step involving color parameters
# code: major refactoring/simplification of Token
# code: refactoring/simplification of Compiler
# code: compiler flags for allowed number of parameters removed (not consistent with Jmol math)
#       (defaultON and noArgs remain)
# new feature: dipole/draw/ellipsoid/isosurface/pmesh/mo/lcaocartoon ID keyword optional
#   but without ID, one is restricted to words that are simple text and not Jmol entities. 
#   with ID, the next quantity can be anything.
# new feature: $"xxx" quotations or $@{...} allows variable definition of object id reference  
# new feature: draw {point} PLANE [plane def, including xy, yz, x, etc.]

# -----------------------------------------------------------------------------

#version=11.5.48

# new feature: mol file bond type 8 as partial
# code: compiler error reporting improved
# bug fix: PDB site definition does not ignore empty site definitions
# bug fix: DEFINE can cause compiling error, e.g. "[2MO]" in 1tmo
# bug fix: quaternion derivative DRAW arrows placed on residue i+1 instead of residue i
# bug fix: connect aromatic auto; select connected([bond type],...)
# bug fix: queue thread termination when applets are off screen
# bug fix	: sheetsmoothing not consistent among structures in multi-chain systems
# bug fix: messages not sent to messageCallback
# code: simpler matrix-->quaternion code
# bug fix: 11.5.47 shows oddly sized arrow for very first rendering
# bug fix: quaternion frame "n" after rotationSelected does not reset NH hydrogen positions 
# new feature:  // at beginning of a line marks comments

# -----------------------------------------------------------------------------

#version=11.5.47

# bug fix: Removed stray semicolons from header script comments in webexport templates.  They
#   were causing WYSIWG web editors to corrupt the code scripts.
# bug fix: 11.5.46 broke standard "spin x 30" (b)
# new feature: draw ARC {pt1} {pt2} {ptref} {theta0, nDegrees, fractionalOffset}
# new feature: draw ARROW ARC {pt1} {pt2} {ptref} {theta0, nDegrees, fractionalOffset}
#
#  draws a circular arc or arrow around an axis defined by {pt1} and {pt2}
#   using {ptref} as a starting point (looking down the axis, angles
#   are measured in a clockwise manner, starting with the projected position
#   of {ptref} in a plane perpendicular to the axis. This is similar (but opposite)
#   to the way dihedral angles are indicated. 
#   theta0 is the the offset angle from 0
#   nDegrees is the number of degrees of arc to draw
#   fractionalOffset is the fraction of the distance from {pt1} to {pt2} for the 
#   plane containing the arc. 
#
# new feature: draw RAMACHANDRAN  
#   draws phi and psi angles in the form of draw ARROW ARC 
# new feature: write RAMACHANDRAN draw  

# -----------------------------------------------------------------------------

#version=11.5.46

# bug fix:  remove the skipping of semicolons if parentheses or braces have been closed. (11.5.43 bug)
# bug fix:  set picking on   broken in 11.5.39
#
# new feature: measure {atomExpression or point} {atomExpression or point} ...
#  measurements to POINTS, including using the mouse (set drawPicking on)
#  will persist and can be saved in the state (11.5.38 did not allow this)
# for example:
#  measure {0 0 0} {atomno=3} {atomno=5}
#  measure  $point2 {atomno=3} $line[1]
#
# new feature: rotate branch {atom1} {atom2} ...
# new feature: select within(branch, {atom1}, {atom2})
# new feature: Jmol math within("branch", {atom1}, {atom2})
# code: refactoring of getAtomsWithin() and getAtomBits() 
#
# bug fix: array size limited
# new feature: quaternion({atom expression}) -- returns calculated 
#              frame based on quaternionFrame setting.
# bug fix: drawhover not in state
# bug fix: ramachandran for systems including nucleic acids when quaternionFrame = 'n'
# new feature: isosurface functionXY can be used for mapping.
# new feature: spacegroup/symmetry for CML files with <module> tags
#
# bug fix: 11.5.39 could break isosurface/pmesh save/write state in certain cases.
# bug fix: Popin.png in WebExport replaced, was too large, causing dialog box to default to too big on small screens.
# bug fix: zap 2.1 for quaternion frame causes exception
# bug fix: quaternion r derivative2 nonfunctional in 11.5.45
# bug fix: isosurface functionXY not working
# bug fix for 11.5.45: application not returning echos and status messages to console
 
# -----------------------------------------------------------------------------

#version=11.5.45

# new feature: show rotation    aka  show orientation rotation
# new feature: show translation aka  show orientation translation 

# code: mouse manager refactoring

# bug fix: picking off structure did not clear picking for set picking spin
# bug fix: jmolScriptWait() improperly reporting to applet console
# bug fix: too many messages to applet console 
#
#  Note: planes, axisAngles, and quaternions are all saved as Token.point4f
#  axisAngle() and quaternion() are both processed to quaternion format
#  {x y z w} where w = cos(theta/2) and {x y z} = sin(theta/2)*unitNormal
#  quaternions are always fixed so that cos(theta/2) > 0 -- that is, so that
#  the reported theta (q %-2) is in the range [0, 180]
#  This is important. One can also get a directed theta based on a 
#  specified axis using q % {x y z w}. w is ignored; x y z is the 
#  axis to dot with the quaternion normal in order to switch the
#  sign of theta if that value is negative.
#
# new feature: show atom(s)
# new feature: show group(s)
# new feature: show selected
# new feature: draw {point} {plane}
# new feature: draw vector {point} {plane}
# new feature: draw arrow {point} {plane}
# new feature: q = axisAngle({x y z}, theta)
# new feature: q = axisAngle(x, y, z, theta)
# new feature: q = axisAngle("{x y x theta}")
# new feature: q = quaternion("{x y z w}")
# new feature: rotate @{quaternion(....)}
# new feature: rotate @{axisAngle(....)}
# new feature: rotate quaternion {x y z w}
# new feature: rotate axisAngle {x y z theta}

# new feature: {point1} == {point2} if distance < 0.000001
# new feature: {quaternion} == {quaternion2} if distance < 0.000001
# new feature: float1 == float2 if |float1 - float2| < 0.000001

# code: refactoring and simplification of rotate/spin 
# code: threads named

# bug fix: hover will find atom in hidden frame. 
# bug fix: ellipsoid translucency not saved in state.
# bug fix: local assignment var x = array() followed by x[n] = ... does not work
# bug fix: f(x[i],x[j]) selects only x[j], not both x[i] and x[j]
# bug fix: quaternion frame "n" recognizes file-based H atoms on N for frame definition

# -----------------------------------------------------------------------------

#version=11.5.44

# bug fix: Java exception with write(quaternion) instead of write("quaternion")
# bug fix: set picking spin did not enable draw spin/picking
# bug fix: _applet variable not initializing properly
# bug fix: math calculation .xyz, .color averages broken in 11.5.42
# bug fix: select @x broken in 11.5.43
# bug fix: integer addition not remaining integer

# -----------------------------------------------------------------------------

#version=11.5.43

# bug fix -- if last helix is last atom, SHOW STRUCTURE fails to identify it.
#
# new feature/feature change:
#
# selectX is no longer necessary. Simply use
#
#   select {atomExpression} (property expression)
#
# with no "x." An implied variable "_x" can be used explicitly:
#
#   select {*} (straightness < 0.995) # does not round
#   select {*.ca} (atomY < atomX)
#   select {*.ca} (phi < select(y; {*.ca}; y.resno = _x.resno + 1).phi))
#
# new feature: quaterion % point4f --- "thetaDirected" -- 
#   point4f is {x, y, z, w} (w ignored), where {x y z} is a
#   preferred direction. 
#   Returns a point4f angle-Axis equivalent with x, y, z the normal for the quaternion
#   rotation and w = theta for the rotation, where the normal and theta are chosen
#   to be directed with a positive dot product between the input {x y z}
#   vector and the output {x y z}.
#
# thus, because the negative angle switches the normal:  
#
#   print quaternion({1 0 0}, -20) % 1 ==> {-1 0 0}; %1 ==> 20
#
# but % {1 0 0 0} forces the angle associated with {1 0 0} to be reported 
#
#   print quaternion({1 0 0}, -20) % {1 0 0 0} ==> {1 0 0 20}
#
# bug fix: POV-RAY output of quadrilaterals.

# new feature: Ramachandran "r" --- includes third (Z) axis quaternion r difference2 X component equivalent

# bug fix: quaternion definition with dot-product check not effective -- removed
# bug fix: quaternion construction from matrix error
#
# new feature: _applet boolean
#
# new feature: extended quaternion math
#
#   q = quaternion({x y z}, angleDegrees)
#   q = quaternion(q0, q1, q2,q3)
#   q = {qx, qy, qz, qw}
#
# returning component values: 
#
#   q.x, q.y, q.z, q.w
#
# note that the Point4f equivalent stores w LAST, even though it is "q0" 
# because the Java Quat4f() and Point4f() both do that as well. We're just
# being consistent with other Java use.
#
# Modulus operator for extended information retrieval:
#
#   (q%0) -- q0 (w)
#   (q%1) -- q1 (x)
#   (q%2) -- q2 (y)
#   (q%3) -- q3 (z)
#   (q%-1) -- the vector {q1, q2, q3}
#   (q%-2) -- theta
#   (q%-3) -- equivalent rotational frame X-axis 
#   (q%-4) -- equivalent rotational frame Y-axis 
#   (q%-5) -- equivalent rotational frame Z-axis 
#   (q%{x y z})  -- rotational transform of a point or vector based on a quaternion
#
# thus, for example, (q%{1 0 0}) is the same as (q%-3)
#
#   (!q) -- quaternion inverse
#
# 
# Quaternion right division (difference "dq"):
#
#   q2 / q1 = q2 * (!q1)
#
# Quaternion left division (relative difference n):
#
#   q2 \ q1 = (!q1) * q2
#
# Examples:
#
#   q = quaternion({1 1 1},120)
#   print "" + (q%{1 0 0}) + " " + (q%{0 1 0}) + " " + (q%{0 0 1})    
#
#   {0 1.0 0} {0 0 1.0} {1.0 0 0}
#
# new feature: Numerical left division (integer divide)
#
#   3.6 \ 2 = 1
#   3.6 \ 1.3 = 2
#
# new feature: sqrt(x)
#
# bug fix: load trajectory for cases with different atom counts.
#
# experimental: "straightness" defined as 1 - 2 * acos(normal(dq[i]%-1) dot normal(dq[i+1])) / PI
# giving a measure proportional to the difference in local helical axis angle 
# and ranging from -1 (opposite direction) to 1 (same direction) for proteins 
# -- a work in progress. See
#
#   load =1d66
#   calculate straightness;color straightness

# -----------------------------------------------------------------------------

#version=11.5.42

# code: modified Jmol encoded PDB data output

# bug fix: color of NaN float values changed from "center of color scheme" to GRAY
# bug fix: connect "_1" was inadvertently dropped in 11.5.26.
# bug fix: state script fails to save data for atoms created using the quaternion command
# bug fix: axes/boundbox/unitcell dotted not working since 11.5.6
# bug fix: spin thread not stopped for applet destroy()
# bug fix: quaternion derivative for i/i+1 assigned to i+1 instead of i; now assigned to i
# bug fix: quaternion calculation using published algorithms was giving inverted quaternions
#
# new feature: set PICKLABEL "xxx"  -- allows customized pick reports
#
#  for example: set pickLabel "%n x = %x, y = %y, z = %z"
#
# new feature: "quaternion derivative" --> "quaternion difference", which is more
# appropriate, we think, with "absolute" and "relative" qualifiers:
# 
#   quaternion absolute difference # in the molecular frame
#   quaternion relative difference # in the (local) frame of first quaternion:
#
#   dq_absolute = q2 * q1_inverse
#   dq_relative = q1_inverse * q2
#
# absolute involves un-doing q1's rotation (making it the reference frame), then applying q2.
# relative involves applying q2 (maintaining the original reference frame), then undoing q1.
# 
# new feature: quaternion [w|x|y|z|a|r] [difference][2] [draw]
# new feature: draw quaternion [w|x|y|z|a|r] [difference][2]
# new feature: write quaternion [w|x|y|z|a|r] [difference][2] [draw]
#   and with that: write("quaternion" [,"w"|"x"|"y"|"z"|"a"|"r"][,"difference"|"difference2"][,"draw"])
#
# new feature: set quaternionFrame "N" -- for solid state NMR PISEMA 15N chemical shift frame
#  using alpha = 0 and beta = 17 degrees.
#
# new feature: select whatever; quaternion draw
#  draws x,y,z and n vectors for a quaternion center
# 
# new feature: straightness, defined as:
#
#   straightness =  2*|n(dq1).dot(n(dq2))| - 1
#
# where q1 and q2 are quaternions defined generally as:
#
#     q = frame{ vA, (vC x vA), vC }
#
# using quaternionFrame "p", which I define as 
#  
# protein:
#
#     vA = C--CA
#     vB = C--N[i+1]
#
# purine:
#
#     vA = N9--C4
#     vB = N9--C8
#
# pyrimidine:
#
#     vA = N1--C2
#     vB = N1--C6
#
# Differences dq1 and dq2 are absolute quaternion differences 
# on the two sides of a residue:
#
#        dq1 === q[i] * q[i-1]_inverse  
#        dq2 === q[i+1] * q[i]_inverse
#
# and n(dq) = the normal vector associated with this quaternion.
# Range is from -1 to 1
#
# applications (note that CALCULATE must be invoked first):
#
#    calculate straightness # must be invoked first; 
#    color straightness; 
#    select straightness < 0.70;   # rounds to nearest hundredth
#    selectX {*} x.straightness < 0.995 # does not round
# 
# new feature: "%T" label format for straightness

# -----------------------------------------------------------------------------

#version=11.5.41

# new feature: xyz reader reads partial charge in 5th field
# bug fix: carbohydrate popup menu script incorrect
# new feature: "load" of Jmol state scripts works same as "script" command
#   (file recognized as SPT type and read as a script instead)
# bug fix: Jmol Embedded scripts containing script comments /* */
# new feature: getproperty menu current
# bug fix: 11.5.40 cannot read most state scripts.

# -----------------------------------------------------------------------------

#version=11.5.40

# (with corrected 40_dev draw scale)
# new feature: new command:
#
# selectX {atomExpression} booleanEvaluation
#
#   same as select() function, but simpler to implement   
#
# new feature: full math on individual atom properties using 
#  a new function:
#
#   select(x;{atomexpression};booleanEvaluation)
#
# for example:
#
#  x = select(x;{*};x.distance({atomno=3}) / 3 > x.distance({atomno=2}))
#  x = select(x;{*.ca};x.phi < select(y; {*.ca}; y.resno = x.resno + 1).phi)
#
# bug fix: H1 and H3 in DNA are NOT backbone 
# new feature: quaternion derivative2 (2nd derivative) and quaternion e derivative [experimental]
# new feature: draw Vector [x y] or [x y %] {x' y' z'}
# new feature: draw [x y] or [x y %] can be incorporated into lines, curves, arrows
# bug fix: set picking center should not zoom -- just too annoying 
# new feature: set echo myecho [x y] and set echo myecho [x y %]
# new feature: axes position [x y] and axes position [x y %] 
#  sets the axes to the x y screen position or percent indicated. 
# bug fix: echos with active script and a model designation 
#   and multiple models select even if not displayed because it is not their model
#   that is displayed. 
# bug fix: missing echocallback, scriptcallback, measurecallback "set"able variables
# bug fix: "set picking identify" should be equivalent to "set picking ident"
# bug fix: popup menu had stereo reversed
#
# new feature: signed applet shows frank "Jmol-S" which is NOT removable.
# possibly to come: signed applet will send confirmation first time it reads a local file?
# bug fix: reading .mmol (biological unit) files such as
#  http://pqs.ebi.ac.uk/pqs-doc/macmol/1j7n_1.mmol
# new feature: frank appears RED in signed applet, and popup about menu identifies the applet as signed.
# code: better handling of twin script manager threads
# new feature: /*SPLIT*/ in a command string allows it to be processed by
#   the two independent processors. (just to isolate javascript from load commands
#   for the signed applet

# -----------------------------------------------------------------------------

#version=11.5.39

# new feature: --threaded  option for command processor uses
#  a watcher thread to monitor a Vector, allowing the signed applet to open any file
#  the signed applet uses this automatically unless there is a 
#    jmolSetCallback("useCommandThread", "false")
#  which overrides the default behavior and disallows reading of files from
#  JavaScript.
#
#  NOTE a limitation: scripts intended for the signed applet that
#  contain both load/script commands or the load() function
#  CANNOT be combined with the JAVASCRIPT command. This is because
#  in that environment, the JAVASCRIPT command must run on the browser's
#  JavaScript thread, and the load command -- if crossing server boundaries --
#  must NOT run on that thread. I have configured the ScriptManager to
#  detect the presence of the word "javascript" followed by a space (exactly that case)
#  and if found, use the JavaScript thread instead of the applet thread.
#    
#  Because it might be useful to combine LOAD and JAVASCRIPT (for the equivalent of a
#  "file loaded" callback (but see set LoadStructCallback), if a script contains
#  the phrase /*SPLIT*/ in upper case, exactly like that, it will be split and then run
#  correctly as two independent scripts.
#  
# new feature: _signedApplet boolean is available:
#
#  print _signedApplet
#  if(_signedApplet); 
#     javascript alert("you are using the signed applet");
#  end if;
#
# bug fix: JmolSimpleViewer caused null pointer exception -- needed setAppletContext()
# bug fix: model-based drawing in multiple-model mode using an
#  array of points to load causes null pointer exception:
#    load cyclohexane_movie.xyz;pts = {C5}.split();print pts;draw @{pts.xyz.sub({1 0 0})} "X"
# bug fix: quaternion derivative multiplication order
# bug fix: 3D echo text not centering properly with set ECHO myEcho CENTER
# bug fix: select _Xx; select unknown
# bug fix: better reporting of script commands and comments
# new feature: reading COMPND and HEADER records of PDB file
# new features for Protein Explorer:
# new feature: set messageStyleChime  
#   -- No atoms selected!
#   -- <n> atoms selected!
#   -- atom picking:
#        Atom: xxx Group: xxx Chain: xxx Model: xxx Coordinates: x y z
#   -- script <exiting>
#   -- Chime script completed.
# new features: 
#  show info
#  show residue(s)
#  show chain(s)
#  show sequence
#  show orientation moveto  # just the moveTo; no comments
#  set pdbGetHeader TRUE  # to get the header when loading (for Protein Explorer)
# new feature: jmolSetCallback("evalCallback", "someFunction")
#  -- overrides _jmol.noEval
#  -- canNOT be set using "set evalCallback"
#  -- was necessary for Protein Explorer javascript callbacks

# -----------------------------------------------------------------------------

#version=11.5.38

# bug fix: lcaoCartoon naming for multiple centers
# bug fix: pm rounding to integer value
# bug fix: scaling of draw object for multimodel environment can cause null pointer exception
# bug fix: scaling of VECTOR was from center, not origin
# bug fix: select n-m:c  chain selection inappropriately case sensitive
# bug fix: draw ARROW {atom center} {xyz}  draws arrow the wrong way
# bug fix: draw CIRCLE for multiple models
# bug fix: application -- "make crystal..." menu item does nothing -- removed
# bug fix: zap of quaternion also zaps model inappropriately
# bug fix: zap to one model assigns -1 to currentModelIndex instead of 0
# new feature: draw CIRCLE [FILL | MESH NOFILL] more intuitive open/filling syntax
# new feature: draw VECTOR {atom center} {dx dy dz}
# new feature: draw with mixed types processes them in order
#   (11.4 does {x,y,z}, then $xxx, then {atomExpression}, then @{{atoms}.split()})
# new feature: draw .... ">xxx" first character of title ">" forces title to 
#   last point, not first
# new feature: set quaternionFrame "c" "p" "q" 
#   - "c" -- CA-C and CA-N, as per Andy Hanson
#   - "q" -- peptide plane CA-C and N'-CA' as per J.R.Quine
#   - "p" -- peptide plane CA-C and C-N'
# new feature: random(a), random(a,b)  where a is lower bound and b is upper bound
# new feature: cross(a,b)
# new feature: sin(x), cos(x)
# new feature: set pdbSequential (default FALSE) for custom PDB files
#   -- bypasses inter-group bonding check when creating polymers 
# new feature: set drawPicking now enables measuring among atoms and DRAW points
#   -- not saved -- just transient measurements (see 11.5.46)
# new feature: CIF reading of B factors for thermal ellipsoids
# new feature: [draw|pmesh|isosurface] xxx* [on|off|delete]
#   -- turns on, turns off, or deletes all objects of the type starting with "xxx"


# code: refactoring of biopolyer resolver

# -----------------------------------------------------------------------------

#version=11.5.37

# code: faster ellipsoid rendering with precalc radius factors
# bug fix: spacefill ADPMIN/ADPMAX using probability ellipsoids
#          and ellipsoid size setting (Note -- ellipsoid command
#          must be run once prior to setting spacefill 
# bug fix: reading output from "set showscript 1"
# bug fix: ellipsoids for Uiso atoms uses simple r = sqrt(value) 
# bug fix: ellipsoids for applied symmetry causes odd shapes (s8.cif)
# bug fix: security for no mayscript may cause problem with measure callback
# bug fix: rocket positions after translateselected

# -----------------------------------------------------------------------------

#version=11.5.36

# bug fix: frame titles not positioning correctly for antialiased display
# bug fix: quaternions created with extraneous atom lines
# bug fix: select symop not behaving intuitively
# code: meshrenderer debug line not removed

# new feature: (popup menu) Biomolecules submenu added within title menu

# -----------------------------------------------------------------------------

#version=11.5.35

# bug fix: proper thermal ellipsoid probability measures
# code: better garbage collection in relation to JmolAdapter class
# bug fix: load FILTER not saved in state
# bug fix: application -- undo/redo buttons not disabling
# new feature: ZAP clears undo stack

# -----------------------------------------------------------------------------

#version=11.5.34

# bug fix: biomolecule really works this time!

# -----------------------------------------------------------------------------

#version=11.5.33

# bug fix: modelLoader was assigning too much array space for chains

# new feature: more load FILTER options:
#
#     #i   a specific BIOMT transformation
#    !#i   not a specific BIOMT transformation
#  [XXX]   a specific group ID
# ![XXX]   not a specific group ID (e.g. ![HOH])
#   *.XX   an atom name, such as .CA
#   !.XX   not a specific atom name
#    *:X   a chain ID
#    !:X   not a specific chain ID
#
#  Between types, or involving NOT, options are AND'd together
#  Within a type not involving NOT, options are OR'd together
#  Within a type, a single ! implies all are NOT
#  Within a type, a single * implies all are ANY

# new feature: load [file info] FILTER "BIOMOLECULE n;NOSYMMETRY"
# FILTER "BIOMOLECULE 1" by default now reads the symmetry;
#    use load FILTER "BIOMOLECULE 1;NOSYMMETRY" to not read symmetry 
#
# bug fix: ellipsoids for navigation mode and perspective depth
# bug fix: PDB biomolecule for many-BIOMT system

# -----------------------------------------------------------------------------

#version=11.5.32

# bug fix: load FILTER "BIOMOLECULE 1;APPLY SYMMETRY" does not read second line of chain list 
# bug fix: added connections do not save properly in state
#
# application only: command undo disabled automatically if saving takes more than one second
# flag is "set undo TRUE/FALSE"
#
# new feature: load [file info] FILTER "[filter string]"
# new feature: load [file info] FILTER "BIOMOLECULE n"
# new feature: load [file info] FILTER "[filter string];BIOMOLECULE n"
#
# The first format loads only those atoms matching a specific filter or set of 
# filter terms -- only a crude filter here, only for PDB and mmCIF files:
#
#   *.XX   an atom name, such as .CA
#   *:X    a chain ID
#
# multiple matches are allowed -- implied AND:
#
#  load "1sva.pdb" FILTER "*.CA"
#
# the match IS CASE SENSITIVE; * IS required
#
# also, "BIOMOLECULE 1" automatically selects for the chains listed for biomolecule 1
# in REMARK 350, and APPLY SYMMETRY applies the symmetry as described in those REMARKS
#
# new feature: isosurface ELLIPSOID id 
#           AXES {ix iy iz} {jx jy jz} {kx ky kz} 
#           CENTER {x y z} 
#           SCALE n.m 
#           COLOR [translucent [x.y] |opaque] [color] 
#           ON|OFF
#
#   id is a REQUIRED field. AXES is required if a new ellipsoid is being defined
#   these axes must be perpendicular
#   all other parameters are optional
#
# bug fix: isosurface ELLIPSOID was disabled
# bug fix: Vector4f in Sphere3D causes applet failure, as it includes
#          an implicit Vector4d call
# bug fix: stronger wireframe for antialiased display and generator (POV-ray)
# default change: ellipsoids ball only, no axes
# code: better ellipsoid fill method
# default change: ellipsoids ball only, no axes

# Hungarian translation

# -----------------------------------------------------------------------------

#version=11.5.31

# bug fix: set picking measure distance not doing callback (from 11.5.23)
# bug fix: picking echos not working with set antialiasdisplay
# default change: ellipsoids are so fast now, can use default "set ellipsoidBall true"
# bug fix: set ellipsoidAxisDiameter [int] sets the diameter in milliAngstroms
# bug fix: sequence range for missing sequence numbers returns 0
#
# code: fast ellipsoid ball+fill - axis idea; no luck with POV-ray fill
# code: ellipsoid equation/axes conversion in Sphere3D; 
# code: POV-Ray ellipsoid generation
# code: better ellipsoid ball rendering using Shade3D.calcIntensity()
# code: 2-fold improvement in rendering ellipsoids by not using getNormix()
# code: 4-fold improvement in rendering ellipsoids by using Miguel's no-mesh idea
# code: 2-fold improvement in rendering ellipsoids by using 40x40x40 shade cache
# code: overall 20-fold improvement in rendering over mesh/normix;
# code: full POV-ray support for ellipsoids
# code: proper partial derivative normalization of ellipsoid shading
# code: refactoring of static quadric surface methods into their own class

# -----------------------------------------------------------------------------

#version=11.5.30

# bug fix: measurement labels for angles do not appear in slab mode (goes WAY back before 10.0) 
# bug fix: U_iso_or_equiv fields not read in CIF 
# bug fix: (application) writeTip GT string not defined.
# bug fix: (forwared compatibility) invalid state setting (due to later version) now ignored.
# bug fix: state for draw arrow in multimodel context delivers wrong coordinates
# 
# new feature: ellipsoid ball rendering tied to "set wireframerotation" option
# new feature: set ellipsoidAxisDiameter x.y
#
# code: better ellipsoid arc rendering using Hermite fill
# code: CifReader cleanup

# -----------------------------------------------------------------------------

#version=11.5.29

# new features for ellipsoid rendering: 
#  
#  set ellipsoidAxes     [true]
#  set ellipsoidArcs     [true]
#  set ellipsoidFill     [false]
#  set ellipsoidDots     [false]
#  set ellipsoidBall     [false]
#  set ellipsoidDotCount [200]
#
#  [dots|stars|spacefill] ADPMIN [percent]
#  [dots|stars|spacefill] ADPMAX [percent]
#  
#    /* general logic:
#     * 
#     * 
#     * 1) octant and DOTS are incompatible; octant preferred over dots
#     * 2) If not BALL, ARCS, or DOTS, the rendering defaults to AXES
#     * 3) If DOTS, then turn off ARCS and FILL
#     * 
#     * note that FILL serves to provide a cut-out for BALL and a 
#     * filling for ARCS
#     */

# -----------------------------------------------------------------------------

#version=11.5.28

# bug fix: state "set measures angstroms" does not include "select *"
# bug fix: labels can change size in returning from antialiasdisplay=true to antialiasdisplay=false
# ELLIPSOID command -- with symmetry and crude footballs, including PDB files
#  note that for now PDB file reading of ANISOU requires using {x y z} in load
#  command, but you can use {1 1 0} to load ANISOU without applying symmetry  
#
# Italian translation

# -----------------------------------------------------------------------------

#version=11.5.27

# bug fix: data CLEAR command nonfunctional
# bug fix: "....".trim("xyz") function not properly trimming ANY x,y,z
# bug fix: draw OFFSET not working properly
# bug fix: PovRAY output of draw objects -- cylinder end caps not considered
# bug fix: draw width 0.05 {...} {...} -- line does not properly render
# bug fix: data "model"...end "model" saves state without first line if first line is empty 
# bug fix: "show data types" putting comma in wrong location
# new feature: DATA "data2d_xxxxx"..... end "data2d_xxxxx"
# new feature: isosurface FunctionXY "data2d_xxxxx" {origin} {ni x 0 0} {nj 0 y 0} {nk 0 0 z}
#   allows setting isosurface Z values using a block of data (ni rows by nj columns)
# new feature: isosurface FunctionXY "data2d_xyz_xxxx" {origin} {ni x 0 0} {nj 0 y 0} {nk 0 0 z}
#   allows setting isosurface values using a block of x y z data, all points for which should be
#   on the surface.
# new feature: GamessUK reader
# new feature: reset VARIABLES (replaces "reset ALL")

# -----------------------------------------------------------------------------

#version=11.5.26

# bug fix: draw adds extra circle in 11.5.25
# bug fix: minimization out-of-plane energy calculation error
# bug fix: better initial minimization parameters
# bug fix: (applet) script termination callback should not be sent to message queue
# bug fix: hover appears when a load script leaves an atom very close to (0,0) in the window
# bug fix: draw width -1 or draw mesh nofill with very short cylinders creates odd jumpy effect
# bug fix: draw CIRCLE for multiple model sets
# 
#
# new feature: draw CYLINDER
#
# Korean translation

# -----------------------------------------------------------------------------

#version=11.5.25

# new feature: draw CIRCLE
#
#   A circle is a 2D object that behaves like a halo, always appearing circular
#
#   draw circle {molecule=1} mesh nofill            # around specified atoms
#   draw diameter 2.0 circle {atomno=3} mesh nofill # 2.0 angstroms; scales
#   draw diameter 100 circle {_O}[1] mesh nofill    # 100 pixels (doesn't scale)
#   draw circle {*} fill  # a solid plane in the shape of a circle

# -----------------------------------------------------------------------------

#version=11.5.24

# new feature: minimization CONSTRAINTS {xx} {xx} [{xx} [{xx}]] x.y
# new feature: minimization FIX {atom expression}
#
#  multiple constraints can be present; one per line input
#  minimization CLEAR releases constraints and fixed atoms
#  also, minimize ENERGY saves a detailed listing, which can be
#  displayed using one of the two following commands:
#
# new feature: show minimization
# new feature: x = getProperty("minimizationInfo")
#
#  to dump the info to a file:
#    minimize
#    var x = getProperty("minimizationInfo")
#    write VAR x "myfile.out"
#
# new feature: isosurface MAXSET n # removes larger fragment sets
# new feature: isosurface DOWNSAMPLE n # down-factors the number of points in a CUBE file by a factor of n

# -----------------------------------------------------------------------------

#version=11.5.23

# new feature: minimize ENERGY # no stepping
# new feature: minimize STEPS n
# new feature: minimize CRITERION x.y
# new feature: minimize CLEAR # flushes logged info and saved atom info
#
# new feature: echoCallback 
# new feature: measureCallback
# new feature: minimizationCallback
# new feature: scriptCallback
# new feature: save/restore coordinates
# new feature: getProperty minimizationInfo
#
# code: more efficient minimize calculation setup; better logging
# code: "notify" methods in JmolStatusListener consolidated
# code: Tokens organized
# 

# -----------------------------------------------------------------------------

#version=11.5.22

# bug fix: UFF torsion calculation incorrect
# bug fix: UFF.prm not properly recognizing sp2 N in N-oxides
# bug fix: minimizer for compounds containing isotopes D and T
#
# code: eval/compiler error processing update

# -----------------------------------------------------------------------------

#version=11.5.21

# new feature: minimize command -- mostly untested
#
#   set minimizationSteps 100
#   set minimizationRefresh true 
#   set minimizationCriterion 0.001
#   set loglevel 4  # for a very minimal report
#   set loglevel 5  # for a summary report
#   set loglevel 6  # for a detailed report
#   minimize
#   minimize stop
#   minimize cancel
#   
#
# for example:
#
# load caffeine.xyz
# minimizationSteps = 80
# minimizationRefresh = true
# set loglevel 4
# select connected(2) or connected(3) or oxygen and connected(1)
# connect aromatic modify
# calculate aromatic
# set measurementunits pm
# measure {_O}[1] {_O}[2]
# color measure red
# minimize
#
# new feature: set loglevel 6 allows a "debugHigh" setting 
#
# bug fix: load unitcell {a b c alpha beta gamma} not working (since 11.5.8)

# -----------------------------------------------------------------------------

#version=11.5.20

# bug fix: zap file > 2  multiple models do not properly delete

# -----------------------------------------------------------------------------

#version=11.5.19

# bug fix: null surfaceGenerator causes MO exception
# bug fix: isosurface reading/writing JVXL files having insideout keyword 

# -----------------------------------------------------------------------------

#version=11.5.18

# bug fix: zap x.y additional work -- connections, isosurfaces
# bug fix: zap x.y not correcting Eval variables
# bug fix: isosurface user VolumeData not properly loading

# -----------------------------------------------------------------------------

#version=11.5.17

# new feature: delete {atom expression} NEEDS TESTING

# bug fix: zap x.y for dots
# bug fix: zap {atom expression} for not including all atoms in a model in the selection
 
# -----------------------------------------------------------------------------

#version=11.5.16

# new feature: zap {atom expression} # zaps models associated with given atoms.
#   use "show models" to see what models are present, then zap them with their
#   file.model number:
#
#   zap 1.1,2.1  # these two models deleted
#   zap atomIndex=0 # ALL ATOMS IN FIRST MODEL deleted
#
# Note that file.model numbers do not change after this. 
# So if initially there were two files loaded
#
#   zap 1.1
#
# removes the first model and leaves the second as "2.1"
#
# NEEDS THOROUGH TESTING, particularly in regard to saving/restoring the state

# bug fix: atomChooser not updated for zap
# bug fix: isosurface model keyword does not carry on to saved state
# bug fix: lcaocartoons do not color properly or get restored from state properly
# bug fix: popup menu selection of groups and symmetry operations does not work

# menu: internationalization of "Monomer" and "Shapely" 
# bug fix: mol2 reader cannot read files with single-line comments
 
# -----------------------------------------------------------------------------

#version=11.5.15

# bug fix: CAChe CSF reader not reading partial charges
# bug fix: WebExport with http:// files fails to save file
# bug fix: WebExport with local . directory fails to save JmolApplet.jar and Jmol.js
# code: refactoring of jmol.app.webexport: adding html subdirectory

# bug fix: state saving with rotateSelected spinning spins entire model  
# bug fix: getproperty("chaininfo") for non-biological model causes null pointer exception
 
# -----------------------------------------------------------------------------

#version=11.5.14

# bug fix: rotateSelected INTERNAL not adjusting for internal rotation center
# bug fix: .max/.min not allowed in context: "select resno=@{{visible}.resno.max}"
# bug fix: Parser: "3xxx" read as 3 instead of 0; "3.5xxx" read as 3.5 instead of NaN  
# application menu: Write state moved to main export menu; Export PDF to image writing
# new feature: MODEL/ENDMDL records in write PDB (still no TER records)
# bug fix: write PDB format incorrectly writes atoms with 4-length names
# bug fix: Spartan SMOL directory reader doesn't assign bonds
# new feature: Spartan archive reader now reads aromatic bonding
 
# -----------------------------------------------------------------------------

#version=11.5.13 BROKEN FOR XYZ READER

# bug fix: Parser: "3xxx" read as 3 instead of 0; "3.5xxx" read as 3.5 instead of NaN  
# application menu: Write state moved to main export menu; Export PDF to image writing
# new feature: MODEL/ENDMDL records in write PDB (still no TER records)
# bug fix: write PDB format incorrectly writes atoms with 4-length names
# bug fix: Spartan SMOL directory reader doesn't assign bonds
# new feature: Spartan archive reader now reads aromatic bonding

# -----------------------------------------------------------------------------

#version=11.5.12

# new feature: four optional defaults for Van der Waals radii:
#
#  set defaultVDW jmol
#  set defaultVDW rasmol
#  set defaultVDW babel
#  set defaultVDW user
#
# To set the user variety, first set one of the other sets as a basis
# Then add a DATA statement to include the specific elements you want to give
# new radii to:
#
#  set defaultVDW babel;
#  DATA "element_vdw" 6 1.7 END "element_vdw"; 
#  DATA "element_vdw" 6 1.7; 7 1.8 END "element_vdw"; # separate using semicolons or new lines
#
# For full state compatibility, these commands should be given prior to
# model loading, as they affect all calculations involving Van der Waals 
# radii -- except default zoom.
#
# Now select the user set:
#
#  set defaultVDW user
#  spacefill on
#
# To delete all user entries:
#
#  reset VDW 
#
# If user vdw radii are currently set, then this resets the defaults to Jmol.
#
# new feature: show vdw  shows a listing of the currently set VDW radii
#
# new feature: integration of star, halo, and spacefill code so all behave the same.
# 
# stars     1.0      # set to a specific angstrom radius
# spacefill 100%     # percent of CURRENT vdw set
# stars     100%Jmol # percent of Jmol standard
# stars     50%Babel # percent of Babel standard
# spacefill 5%Rasmol # percent of Rasmol standard
# spacefill 30%User  # percent of User-defined values (or CURRENT if not defined)
# spacefill +1.2     # angstroms added to current vdw scheme
# halos     50%Jmol  # -- halos also have an added bit to make sure they are visible 
# spacefill 250      # RasMol 250 units/Angstrom units still
# spacefill -20      # neg numbers same as percentages: 20% here, using current vdw set
# stars     @{x+0.1} # math OK
# spacefill @x%      # make sure x comes out integer, otherwise % is ignored
#
# note that dots do not have a %Jmol option:
#
# dots   30     # syntax already assumes percent for dots using an integer
#
#
#
# see src/org/jmol/_documents/vdw_comparison.xls

# -----------------------------------------------------------------------------

#version=11.5.11

# bug fix: save/restore of atom data incorrect when user has set propertyAtomNumberField or propertyDataField
# bug fix: functions, save/restore state were disabled by bug in 1.5.8
# bug fix: command "test()" where test() is a user-defined function causes array-out-of-bounds error
# bug fix: undocumented .vdw atom property was equivalent to .valence
# bug fix: GAMESS reading of F orbital order incorrect

# new feature: settable Van der Waals radius using {carbon}.vanderwaals = 1.7 
#  or using DATA "property_vanderwaals"
# new feature: DATA "property_x i j" .... END "property_x i j" 
#   overrides default propertyAtomNumberField (i) and propertyDataField (j)
# new feature: State save of property_xxx  now in easily readable Jmol Data Format

# -----------------------------------------------------------------------------

#version=11.5.10

# NOTE: REMOVED FROM SERVICE -- see 11.5.11
# bug fix: ISOSURFACE LIST command requires current isosurface
# bug fix: JVXL writing does not properly save pocket cavities or minsets
# bug fix: DATA command assigning property to last atom in structure fails

# -----------------------------------------------------------------------------

#version=11.5.9

# NOTE: REMOVED FROM SERVICE -- see 11.5.11
# bug fix: Gaussian reader not considering possibility of cartesian D and spherical F
# bug fix: ADF reader not reading coordinates for newer ADF output

# -----------------------------------------------------------------------------

#version=11.5.8

# NOTE: REMOVED FROM SERVICE -- see 11.5.11
# bug fix: lines starting with @{ redefine "{"
# bug fix: echo offsets do not correct for window position
# bug fix: menu reports too many chains
# new feature: menu includes all standard color scheme options
# new feature: inline math @{x+3} extended to all commands
# new feature: .sub(), .add(), .mul(), .div() extended to all operand types

# -----------------------------------------------------------------------------

#version=11.5.7

# bug fix: explicit "SELECT NONE" must be given for label defaults to be set

# bug fix: menu select element missing SELECT command
# bug fix: for delayed font scaling animation using the font command and antialias display

# -----------------------------------------------------------------------------

#version=11.5.6

# bug fix: HETATM atoms not automatically bonded to nearby ATOM atoms
# bug fix:  setParameterValue("perspectiveDepth",perspectiveDepth);

# bug fix: sets offset based on imageFontScaling, not overall font scaling
# bug fix: multiline labels not positioned properly with offset 0 0
# bug fix: labels not scaling properly
# new feature: label "scaleReference" if > 5.0 is taken to be a reference zoom setting
#   saying "make the font size X at a zoom of Y" 
# bug fix: labels not scaling properly when in script with file load
# bug fix: labels not appearing in contrast when given same color as background
# bug fix: fixes applet memory leak in relation to consoles

# -----------------------------------------------------------------------------

#version=11.5.5

# bug fix: fixes applet memory leak due to 
#   platform objects/delay threads not being destroyed

# new feature -- syncCallback -- intercepts messages that would otherwise go to applets for syncing
#   when syncCallback is set to a JavaScript function name, that function
#   intercepts the sync message and can pass it on (by returning it), 
#   consume it (by returning an empty string ""), or modify it as desired.
#   this allows, for example, monitoring of orientation information so that
#   zoom sliders and such can accurately portray their values

# -----------------------------------------------------------------------------

#version=11.5.4

# bug fixes -- font scaling

# new feature: Spartan input files read as Odyssey format
#
# new feature: set delayMaximumMs  sets the maximum delay that scripts will use, primarily for testing scripts
# new feature: set fontScaling TRUE/FALSE
# new feature: font [type] [size] [face] [weight] [scaleReference (Angstroms per pixel)]
#  atom labels and 3D echos then scale properly.
#  note that the current zoom affects the label size.
# bug fix: image writing does not scale fonts properly. 
# bug fix: antialias of images not functionally independent of antialias for display
# bug fix: label offset doubled for multiline labels with left/right/center alignment not specified
# bug fix: default label offsets mangled by default Front/Group

# new feature: getProperty("appletInfo") includes a key "registry" for which
#   the value is the static Hashtable htRegistry
#    //note that the following JavaScript retrieves the registry:
#        var registry = jmolGetPropertyAsJavaObject("appletInfo").get("registry")
#    // and the following code then retrieves an array of applets:
#        var AppletNames = registry.keySet().toArray()
#    // and the following sends commands to an applet in the registry:
#        registry.get(AppletNames[0]).script("background white")

# new feature: reading of Spartan spinput files (uses Odyssey reader)

# bug fix: PDB files with missing amino acid carbonyl O cause exception

# -----------------------------------------------------------------------------

#version=11.5.3

# bug fix: check if the file is CIF before PDB
# bug fix: color hbonds translucent
# bug fix: state: calculate hbonds not saved
# bug fix: state: calculate surfaceDistance WITHIN (({....}))
#  missing outermost parentheses
# bug fix: state: selection state "end function" missing semicolon
# bug fix: isosurface lcaoCartoon "pz" translucent not setting both lobes translucent 
# bug fix: color isosurface when isosurface is an lcaoCartoon only colors one lobe
# bug fix: save state for "color SelectionHalos"

# -----------------------------------------------------------------------------

#version=11.5.2

# Translation update: Estonian

# new feature: "getProperty FILECONTENTS ." in the context of
#  a zip directory defaultDirectory
# new feature: zip file reading extended to write FILE
#
# bug fix: unclosed InputStream readers in zip file accessing
#
# new feature: allows zip files to be designated as default directoriesusing
#    set defaultDirectory "myfile.zip"
#  and then using a filename
# bug fix: unclosed readers in Pmesh, FileManager, Jvxl
# new feature: pmesh BINARY "filename"
#   BINARY keyword is optional, but recommended for efficiency
#
#       *  4 bytes: P M \1 \0 
#       *  1 byte: \0 for bigEndian
#       *  3 bytes: reserved
#       *  4 bytes: (int) vertexCount
#       *  4 bytes: (int) polygonCount
#       * 64 bytes: reserved
#       *  ------------------------------
#       *  float[vertexCount*3]vertices {x,y,z}
#       *  [polygonCount] polygons 
#       *  --each polygon--
#       *    4 bytes: (int)nVertices (1,2,3, or 4)
#       *    [4 bytes * nVertices] int[nVertices]
#       *
#       * note that there is NO redundant extra vertex in this format
#
#  see little-endian example at http://chemapps.stolaf.edu/jmol/docs/misc/pmesh.bin
#  and http://chemapps.stolaf.edu/jmol/docs/misc/pmesh.bin.txt

# -----------------------------------------------------------------------------

#version=11.5.1

# bug fix: quaternion for nucleic acids
# code: inefficiencies in Quaternion code
# new feature: within(structure,atom_expression)
#  for proteins, just the helix or turn or sheet containing those atoms; 
#  for nucleic acids, just the chain

# bug fix: wing vectors for biopolymers 
#   not containing O improperly drawn for sheets 
#   and, in the case of set traceAlpha TRUE (the default), helixes
# bug fix: translateSelected/rotateSelected does not move cartoons
# bug fix: tainted occupancy not saved in state
# bug fix: biopolymers have wrong wing vectors (from 11.3.62)
# bug fix: restore of state does not reset user-defined atom properties
# code: refactoring Atom and AtomCollection 

# -----------------------------------------------------------------------------

#version=11.3.66

# bug fix: CIF reader not skipping loops with load of a specific model of a model set
# bug fix: explicit format LOAD "XXX::whatever" extended to XML variants
# code: adapter/readers/more/JmolDataReader.java removed.
# code: adapter/smarter/Resolver.java cleaned up in relation to XML and DOM options

# -----------------------------------------------------------------------------

#version=11.3.65

# full run of monster_script.spt

# bug fix: pmesh test1 "inline" "1 {2. 0. 0.} 0"  disallowed, but that should be OK
# bug fix: isosurface gridpoints "ch3cl_map.jvxl" -- gridpoints for jvxl files that are already mapped
# bug fix: isosurface lcaoCartoon "type" {atomExpression}

# files: JUnitTest for scripts -- 
#  monster script in run directory tests scripts now uses 
#    files at http://chemapps.stolaf.edu
#  all monster scripts made the same
#  tests/scripts/check_performance removed.
#  
# bug fix: better checking of scripts involving full run of all scripts
# bug fix: defaultDirectory for Jmol application not usable for http:// protocols
# bug fix: load "files" not properly loading zip files or files involving default directory

# -----------------------------------------------------------------------------

#version=11.3.64

# bug fix: version integer missing sometimes
# bug fix: isosurface with trajectories
#  interesting that if 1.1 and 1.2 are trajectories you can do
#    frame 1.2; isosurface select(*/1.1) sasurface
#  this creates an isosurface for model 1.2 that uses the atomic coordinates of model 1.1!
#
# bug fix: isosurface MEP mapped to plane not exactly reproduced in JVXL
# bug fix: isosurface COLOR RANGE by itself does nothing -- changed to use full range
# new feature: isosurface COLOR RANGE ALL added as an equivalent to COLOR RANGE with no numbers

# -----------------------------------------------------------------------------

#version=11.3.63

#  -- all functionality in new.htm, new2.htm, and new0.htm tested --

# bug fix: draw/isosurface/etc. on/off/delete should operate on all objects
# bug fix: display within(plane...)
# bug fix: select site=n  broken
# bug fix: quaternion/ramachandran/model can show up together if user issues FRAME ALL
# bug fix: frame 1.2 when file 1 only has one model displaying all files
# bug fix: quaternion x reports wrong frame number
# bug fix: selectionHalo status and color not in state
# bug fix: color selectionHalos none
# bug fix: polyhedra .... translucent 0.3 green
# bug fix: moveto alternative format missing necessary 0 rotationRadius requirement
#   moveTo ...... {atomExpression} 0 [zoomOrZoomFactor]
#   where [zoomOrZoomFactor] is n, +n, -n, *n, /n, or 0 (to indicate fill screen)
# bug fix: subsets not properly handling restrict
# bug fix: models with turns crash jmol if not first model loaded
# bug fix: quaternion command by itself not switching to most recent quaternion
# bug fix: background color off when not white and ends in "FF"
# bug fix: print {atomSet}.color  -- .color returning bounding box!
# bug fix: multiframe draw with labels different for each frame not properly saved in state
# bug fix: within upgrade for boundbox: within(boundbox), within(boundbox,atomExpression)

# -----------------------------------------------------------------------------

#version=11.3.62

# bug fix: calculate hbonds for trajectories
# code: distinction between file-derived or connected hbonds and calculated hydrogen bonds
# bug fix: calculate hbonds broken in 11.3.58 (missing model field in BioPolymer)
# bug fix: Jmol not putting structures in for all models in a PDB file
# bug fix: calculate polymers (never documented) not necessary -- calculate structure suffices
# bug fix: calculate structure updated for ignoring jmolDataFrames and using currently selected atoms
# webexport help instructions fix to be consistent for local testing.

# -----------------------------------------------------------------------------

#version=11.3.61

# bug fix: multifile cartoons improperly rendering in all frames
# bug fix: dipoleScale not saved in state
# bug fix: quaternions broken in 11.3.58
# code: Closest class deleted
# code: Quaternion class moved to modelsetbio
# code: dipoles moved to shapespecial
# bug fix: select 1.5 in trajectory context should switch to that set of coordinates
# bug fix: draw not colored
# bug fix: mousewheel too low power
# bug fix: select */4 when "4" is inappropriate returns all instead of none
# bug fix: memory leak in applet due to mouse/hoverwatcher listeners
# bug fix: applets not self-destroying when window containing them close
# bug fix: rotate commands not sent to other applets when set syncScript if OFF

# -----------------------------------------------------------------------------

#version=11.3.60

# bug fix: more work on trajectories in a multimodel context

# bug fix: quick fix for disabling popup menu under Java 7 where permissions are not granted

# bug fix: load trajectory extended to multifile context
#  in which case "select 1.3", if file 1 is a trajectory, not only
#  selects that file, but also sets the trajectory to 1.3. 
#  So a "select" of a trajectory also affects the display.
#  This makes "select" in a trajectory context similar to "display"
#  but doesn't require listing of all the models.

# -----------------------------------------------------------------------------

#version=11.3.59

# bug fix: load append not saved in state properly
# code: trajectory command (never documented) removed
# bug fix: draw ... nofill mesh  properties not processed
# bug fix: draw DIAMETER N not properly functioning for curves or arrows
# new feature: draw DIAMETER X.Y allows setting diameter of points, lines, curves, and arrows to Angstroms

# bug fix: 11.3.58 can't set bond diameters
# bug fix: with set syncMouse, target applet sets syncMouse off inappropriately

# -----------------------------------------------------------------------------

#version=11.3.58

# bug fix: set mouseSync with sync * ON disabling sync but not reenabling it
# bug fix: spin on missing in final state function.
# bug fix: select within (3.3, {-1 1 1}) does not work with negative integer coordinate
# bug fix: trajectories were not fully implemented
# code: refactoring of ModelSet and related classes for trajectories
# code: trajectories implemented as independent models
# code: debug comments in AppletRegistry

# new feature: trajectory command no longer necessary -- deprecated (was in 11.2)

# -----------------------------------------------------------------------------

#version=11.3.57

# bug fix: revised sync commands
# new feature: set syncScript; set syncMouse
# sync ON; set syncMouse false; set syncScript false    Tracks orientation only
# sync ON; set syncMouse true;  set syncScript false    Sends mouse events only
# sync ON; set syncMouse false; set syncScript true     Sends script commands only
# sync ON; set syncMouse true;  set syncScript true     Sends both mouse events and script commands
# 
# bug fix: "load trajectory" broken

# -----------------------------------------------------------------------------

#version=11.3.56

# bug fix: isosurface map of properties lost in 11.3.54
# new feature: set c?  -- displays all Jmol parameters starting with "c" or "_c"
#              set _?  -- displays all read-only variables (starting with "_")
# new feature: formatted gOpenMol formatted plt volume data reader.
# new Jmol.js for 11.4

# -----------------------------------------------------------------------------

#version=11.3.55

# bug fix: axes/unitcell improperly slabbing on internal slab
# bug fix: XOR returning OR when not a bitset
# bug fix: unary minus for planes and points 
# FEATURE CHANGE: slab REFERENCE removed -- no longer necessary
# new feature: set wireframeRotation
# code: simplified Logger.debugging flag
# bug fix: slab/depth planes not properly constructed
# new feature: _slabPlane, _depthPlane variables
# code: MUCH simpler slab plane code

# bug fix: applet.loadInline(String[] models) messes up
#  this involves the fact that Safari will deliver null pointer when it
#  mistakenly matches a String[] signature to a String, or vice-versa.
#  The solution is to use 
#
#    applet.loadInlineString(String model, String script, boolean isAppend)
#
#  and
#
#    applet.loadInlineArray(String[] model_or_models, String script, boolean isAppend)
#
#  explicitly
# code: refactoring loadInline and interfaces WrappedApplet and JmolAppletInterface
# bug fix: scroll wheel with synchronization does not track properly

# -----------------------------------------------------------------------------

#version=11.3.54

# bug fix: JVXL writing/reading of simple plane writes precision color flag

# new feature: (isosurface) reading of XPLOR ascii electron density map data

# bug fix: reinstating "insideout" isosurface option
# bug fix: JVXL writing of lobe, sphere, ellipsoid, hydrogenOrbital
# bug fix: loadInline not properly autobonding -- causes null pointer error
# bug fix: data ... end model instead of end "model" causes null pointer exception

# -----------------------------------------------------------------------------

#version=11.3.53

# bug fix: symop=0NNN not returning all atoms with translation NNN
# code: optimization of algorithm used for load RANGE
# modification for load RANGE -x.x (within x.x Angstroms of symop=1555) to be within x.x of the 
#  box containing symop=1555, not the atoms themselves. 
# code: cleanup of readers.

# bug fix: no special atom checks for PDB symmetry files

# bug fix: HallInfo --- Hall term miscalculation OUCH! -- mistken commenting out of code in 11.1.28 March, 29, 2007. revision 7243
# bug fix: set measures 0.1 --- solid line does not move.

# bug fix: completion of set parameter clean up

# -----------------------------------------------------------------------------

#version=11.3.52

# bug fix: set of many more (but not all) parameters can accept mathematical expressions
# bug fix; set strandCount not properly handled
# new feature: set strandCountForStrands
# new feature: set strandCountForMeshRibbon
# note --- set strandCount sets BOTH, but now each is independent

# bug fix: quaternion not including chain designation
# bug fix: default connections include proper PDB CONECT records

# new feature: connect PDB       # just does PDB CONECT connections
# new feature: connect PDB AUTO  # PDB CONECT and autobonding

# -----------------------------------------------------------------------------

#version=11.3.51

# bug fix: write FILE not handling binary file formats properly

# bug fix: PDB CONECT records not creating bonds for ALL models
# bug fix: load =xxxx broken in 11.3.50
# bug fix: amino not a subset of protein
# bug fix: proteins with just C CA N not recognized as such

# code: minor refactoring in org/jmol/util
# code: minor refactoring in org/jmol/jvxl
# code: minor refactoring in org/jmol/adapter

# -----------------------------------------------------------------------------

#version=11.3.50

# new feature: MOL isotope column read; interpreted for D, T, 11C, 13C, 15N (for now) 
# bug fix: WebExport not properly accessing files in more complicated situations (pmesh, isosurface, multiple files, etc.)
# bug fix: WebExport not allowing variety of local location options

# bug fix: return command not allowed in simple context
# bug fix: setting perspective model resets unit cell on
# bug fix: debug comment in TransformManager
# bug fix: hideNotSelected not in state.

# -----------------------------------------------------------------------------

#version=11.3.49

# bug fix: set perspectiveDepth off broken in 11.3.48
# bug fix: set scaleAngstromsPerInch not turning off perspectiveDepth
# bug fix: scaleAngstromsPerInch not in state
# bug fix: _firstFrame/_lastFrame variables mess up state
# bug fix: calculate surfaceDistance broken for 11.3.48

# new feature: direct reading of MAC Spartan06 directories.
 
# -----------------------------------------------------------------------------

#version=11.3.48

#
# new feature: script "myfile.zip|xxx.spt"
#
# bug fix: scale3D not working
#
# new feature: load "myfile.zip|CH3CL.MOL"
#   loads a given named model from within a zip file.
#
# new feature: load "myfile.zip|myfile2.zip|CH3CL.MOL"
#   loads a given named model from within a zip file within a zip file.
#
# these selections override any manifest that might be in a ZIP file.

# new feature: print getProperty("fileContents","zipFileName", "subfile", "subFile",...)
#  getProperty now allows drilling down through a ZIP file. If no subfile is shown, 
#  then the directory listing is given:
#
# print getProperty("fileContents", "data/test.zip")
#
# CH3CL.MOL
# CH3CL~1.MOL
# CH3F~1.MOL
# CH3OH~1.MOL
# CH4~1.MOL
# BENZEN~1.ZIP
# ENALSP~1.ZIP
# WATERV~1.ZIP
# JmolManifest
#
# print getProperty("fileContents", "data/test.zip", "BENZEN~1.ZIP")
#
# benzenevib.spardir/
# benzenevib.spardir/_locked
# benzenevib.spardir/_spartandir
# benzenevib.spardir/Document
# benzenevib.spardir/M0001/
# benzenevib.spardir/M0001/_spartan
# benzenevib.spardir/M0001/archive
# ...
# benzenevib.spardir/SpreadSheet/
# benzenevib.spardir/SpreadSheet/SheetData

# print getProperty("fileContents", "data/test.zip", "BENZEN~1.ZIP","benzenevib.spardir/M0001/")
#
# benzenevib.spardir/M0001/
# benzenevib.spardir/M0001/_spartan
# benzenevib.spardir/M0001/archive
# benzenevib.spardir/M0001/Calculations
# benzenevib.spardir/M0001/Commands
# benzenevib.spardir/M0001/Geometry
# benzenevib.spardir/M0001/input
# benzenevib.spardir/M0001/log
# benzenevib.spardir/M0001/Molecule
# benzenevib.spardir/M0001/output
# benzenevib.spardir/M0001/parchive
# benzenevib.spardir/M0001/proparc
# benzenevib.spardir/M0001/ret_code
# benzenevib.spardir/M0001/voutput
# 
# print getProperty("fileContents", "data/test.zip", "BENZEN~1.ZIP","benzenevib.spardir/M0001/Commands")
# 
# # Verbose Mode: 1
# # version: MacSPARTAN '06 129  129 x86/Darwin
# # rootKeys: 'OPT' 'HF' '3-21G(*)' '' ''
# # new Keys: 'OPT HF 3-21G(*) FREQ '
# # ...etc....

#
# new feature: load "myfile.zip" MANIFEST "...." 
# new feature: JmolManifest in a zip file directs which files to load and in what order
#  JmolManifest is simply a list of files, one per line. 
#
#  Rules include:
#
#  1) blank lines and lines beginning with # are ignored.
#  2) file names are case-sensitive and must be complete, with full path within the ZIP file
#  3) files must be on separate lines or separated by vertical bar | marks; no whitespace around names
#  4) files may be ZIP files themselves. 
#  5) some comments are special:
#      IGNORE_ERRORS   --- process the file and do not stop if some files are not valid model files
#      IGNORE_MANIFEST --- (on the load command line) indicates that the internal ZIP file manifest should be ignored
#      EXCEPT_FILES    --- process all files EXCEPT those given
#

# new feature: show spacegroup "X,Y,Z;-X,Y,Z;..." finds space group associated with specific operations 

# bug fix: multimodel files could have connected atoms between different models.

# bug fix: application animation frame button reset always goes to frame 1

# new feature: load xxx.zip n   # where n is the desired file, starting with 1
# new feature: Spartan06 file format reader
# new feature: ZIP file reading for multiple models

# bug fix: antialiasDisplay changes during spinning (or any rendering) causes null pointer error

# -----------------------------------------------------------------------------

#version=11.3.47

# coding efficiencies in atom iterators

# vast speed up of smoothed isosurface map properties 

# deprecated: calculate surface (equates to surfaceDistance WITHIN)
# deprecated: calculate surface {...} (equates to surfaceDistance FROM)

# new feature: calculate surfaceDistance FROM {atomExpression} 
# new feature: calculate surfaceDistance WITHIN {atomExpression} 

# -----------------------------------------------------------------------------

#version=11.3.46

# new feature: calculate surface {atomExpression}

# new feature: set isosurfacePropertySmoothing # default TRUE
#  smooths the coloring for isosurface ... map property ...

# bug fix: "isosurface select() map property xxxx" array out of bounds error
# bug fix: color bonds CPK not working
# new feature: calculate polymers
# allows recalculation of polymers after connections are made/broken

# bug fix: tRNA, rRNA with abnormal distances do not connect biopolymers
# bug fix: Jmol math getProperty() doesn't pass parameter in some cases
# code: refactoring,optimizing Escape.toJSON() and Escape.toReadable()
# bug fix: isosurface CAP not turned off prior to map sasurface
# bug fix: adjustable boundbox in multimodel context not specific to model of selected atoms
# bug fix: Jmol math (x[2])[3]  indistinguishable from x[2][3]

# -----------------------------------------------------------------------------

#version=11.3.45

# bug fix: new boundbox command with small numbers of atoms
# bug fix: state not saved for coloring elements
# bug fix: state not properly representing deleted bonds
# bug fix: setColix not clearing shading in certain cases

# new feature: Jmol math {atomset}.boundbox returns list of center, vector, corner0, corner1 for this set of atoms 
# code: ModelSet.BoxInfo abstraction/refactoring

# -----------------------------------------------------------------------------

#version=11.3.44

# new feature: Jmol math getProperty() function
#  allows FULL math access to ALL getProperty types
#
#  syntax: getProperty(propertyType, qualifier, item, item, item,...)
#
# examples:
#
# print getProperty("modelInfo") 
# print getProperty("boundboxInfo") 
# print getProperty("boundboxInfo", "center") 
# print getProperty("boundboxInfo", "vector") 
# print getProperty("atomInfo",{atomno=3})
# print getproperty("bondInfo",{*},2,"atom1")
# print getProperty() # displays list of possibilities
# print getproperty("polymerinfo",{*},"models",2,"polymers",1,"monomers",39,"atomIndex2")
#
# For many property types, the qualifier is an atom set
# If the atom set is not given, those properties default to {visible}
# For "stateInfo", the qualifier is string: "fileState", "modelState", etc.
# Items may be integers or string-based keys
# Integer items follow the rules of Jmol math selectors:
#  1 first item, 0 last item, -1 next to last item, etc.
 
# code: set instead of = in measures and labels state
 
# bug fix: POVRAY and other buttons aren't enabled when there are no atoms but instead draw objects and isosurfaces
# bug fix: new label fonts not loaded when labels resized

# bug fix: nuisance "render mesh error" console report

# new feature: boundbox {atomExpression} [on|off]
# sets the bound box around the specified atom expression
# default ON/OFF is to NOT change current setting 

# new feature: boundbox {point or expression} {vector to corner} [on|off]
# sets the bound box to be centered with a given size based on a vector to a corner

# new feature: boundbox corners {point or expression} {point or expression} [on|off]
# sets the bound box to encompass the two corner points

# strangely enough this allows setting the boundbox to a 2D or 1D box

# new feature: show boundbox gives valid boundbox commands and volume

# bug fix for bioshapes visible outside of current visible frame set

# bug fix for selecting atoms of atomsets using [-n] or [0]

# isosurface POINTSPERANGSTROM synonym for RESOLUTION
#  also reported in show isosurface

# bug fix: more natural mouse SHIFT-RIGHT behavior.

# new feature: isosurface CAP [plane definition]

# caps the isosurface at the designated plane. 
# Specifically for molecular/solvent-type isosurface. 
# [plane definition] can be {x y z w} or any combination of
# three {x y z} points, draw point references, or atom expressions

# -----------------------------------------------------------------------------

#version=11.3.43
 
# bug fix: select statement comparisons of negative decimal properties to "-1" (not "-1.0") causes none found


# new feature: Back to "SET" for state definitions of Jmol parameters.

# bug fix: Strings too long in state can cause Eclipse "infinite loop" bug
#
# solution is a new feature:

# new feature: "\" at the end of a line marks a continuation of that line 

# bug fix: assigning a negative value to a dataAtomNumberField value caused BitSet.set() exception

# bug fix: Jmol parameter setting syntax too loose

# The following statement was allowed:

#   pickCallback = myfunction

# OK, so that might look good, but it evaluates to 
#
#  pickCallback = ""
#
# since the VARIABLE myfunction has not been defined.
# 
# Solution: Don't allow the syntax
#
#  [jmolParameter] = [Token.identifier]
#
# the following is OK:
#
#  [jmolParameter] = "some string"
#
# the following is preferred:
#
#   SET [jmolParameter] [value]
# 

# bug fix: antialias with translucent but antialiasTranslucent = false; labels, text, echos, hover, picking, out of alignment
# bug fix: negative formal charges

# new feature: set drawPicking TRUE
# then reports picking of draw objects as a JavaScript array:
# [  "draw","[drawID]",[modelIndex],[vertexIndex],[x],[y],[z]  ]
# this goes to the pickCallback function as the second parameter,
# with the first parameter (normally the atomIndex) being -2.

# bug fix: write coord mol   not working

# new feature: connect (...) (...) aromatic auto
# similar to calculate aromatic, except it's isolated to this set of connections; implicit modifyOnly
# can be used in place of 
#  select *; calculate aromatic
#
# code: refactoring of BondCollection.makeConnections
#
# bug fix: connect (..) (..)  # with implicit "single" causes state to use "partial 0"

# new feature: shadows can be activated again via noShadows parameter in .pov file

# -----------------------------------------------------------------------------

#version=11.3.42

# bug fix: new frame title and state

# new feature: set echo [echoID] MODEL [model number]

# bug fix: select by itself not working; oy. Since at least 11.0

# bug fix: ramachandran/quaternion fix for assignment of structure
# bug fix: isosurfaces not taking their default name properly

# new feature: frame title "this a title for THIS frame only"

# bug fix: small fix for povray cap at back side
# bug fix: overly long titles now again substringed in the popup menu.  

# bug fix: memory leak in merge -- models[i].modelSet causes modelSet to not finalize.
# bug fix: quaternion 


# bug fix: set xxxCallback not allowed

# new feature: **** Jmol Embedded Script **** recognized in /* ... */ comments and /** ... **/ super-comment blocks
# if found, ONLY this text is processed and all other text in the file is ignored.

# -----------------------------------------------------------------------------

#version=11.3.41

# bug fix: math operations with bond bitsets; % and + operating on arrays
# bug fix: _set variable definition removed

# new feature: .type math function

# new feature: Jmol math allows direct string replacement in select atom expressions:
#  x = "atomno=3"
#  select @x  #  or select @{x}
#  select @{x + 3} # selects atomno=33
#  x = array("atomno<10","atomno>20")
# select @x   # OR of the list elements
# select @{x[2]} # just element 2 of x (atomno>20)
# select @x[2]   # same as {@x}[2]


# new feature: set atom properties using an array instead of a DATA statement:
# (was introduced in 11.3.29, but not fully articulated)
# {*}.x = array(2,3,4,5,6);
# {atomno<=3}.color = array("red","green","blue")
# {*}.property_mydata = array(1.0,5.5,4.4,3.3);
# {atomno < 4}.xyz = array({3 4 5},{4 5 6},{5 6 7})
# if the array is shorter than the number of atoms selected, then 
# only that number of atoms are affected

# new feature: set atom properties from space-separated string:

# {atomno < 5}.property_mydata = "1.0 5.5 4.4 3.3";

# -----------------------------------------------------------------------------

#version=11.3.40

# new feature: Ramachandran/Model commands switch between plot and model
#  -- one Ramachandran plot per model
#  -- axes labels and special hover label for Ramachandran plots
#  -- Ramachandran saved in state

# bug fix: Overlapping CPK at a slab now correct for up to 10.000 clipped atoms.

# bug fix: @{} for within(1.0,point,@{....})

# new feature: set xxxx where xxxx is not a Jmol variable causes ERROR

# code: privatized Token to avoid null value problem in Eval.statementAsString()

# POV-Ray clipping coding minor tweak
# POV-Ray fix for number formatting width > 999

# new feature: model-based parallel array calculations:
#   x = {atomno=3}.split()  # a list, one element for each model
#   draw @{x.xyz.sub({1 0 0})} # a set of points, one per model

# new feature: point3f in array():
#  xlist = array({1,2,3}, {1,1,0});print xlist[1]+{1 0 0};
# bug fix: draw @{x - {1 0 0}}
# bug fix: antialias with set picking draw
# bug fix: draw object text not selective for frame 
# new feature: draw object title line number corresponds to model number for multi-model draw objects

# new feature: matte finish for isosurfaces
# remark: matte finish replaced by adaptable translucent finish (see below)

# bug fix: noninteger MO occupancies
# bug fix: antialias labels not fully bitmapped
# bug fix: RPN processor too limited in nesting level
# bug fix: MO processing for Gaussian and PSI3 errors

# new feature: MoldenReader (Matthew Zwier <mczwier@gmail.com>)
# new feature: MO calculations for spherical orbital basis (Matthew Zwier <mczwier@gmail.com>) 

# bug fix: slabbed atoms are now capped in povray output. 
#   Note: In CPK mode atoms overlap, but are capped at the same height.
#     there is a priority in Jmol, but not yet clear to me which. The current priority 
#     in povray is based on the signed distance from the slab to the atom center. 
# bug fix: povray output of translucent objects now have reduced glare, for 
#   clarity of the representation and better compatibility with the Jmol viewer.

# -----------------------------------------------------------------------------

#version=11.3.39

# bug fix: antialias causing image to be partial size. 
# bug fix: hover state not properly showing specific-atom hover labels.

# new feature: write FILE (text-files only)

#new feature webexport: automatic usage of a different path to the applet for local files to allow testing
#  only works for Pop-In template at present.  Required updates to JmolPopin.js and templates.
#webexport instruction updated to reflect new feature.


# bug fix: antialias adjustments for hover text and background box
# bug fix: antialias fix for text color same as background and in front of translucent surface appearing transparent
# bug fix: antialias fix for applet

# webexport instruction updates.
# bug fix: webexport scriptbutton template had erroneous script names.

# -----------------------------------------------------------------------------

#version=11.3.38

# bug fix: antialiasing with translucent/POV-ray
# new feature: set antialiasTranslucent TRUE/FALSE
#  along with antialiasDisplay and antialiasImages
#  determines the extent of antialiasing. Requires
#  antialiasDisplay or antialiasimages TRUE.

# -----------------------------------------------------------------------------

#version=11.3.37

# new feature: @{mathExpression} for echos, select, etc. where @x can be used. 
#   select atomno=@{x*2};
#   xlist = array("red", "green", "blue");
#   n = 2;
#   color atoms @{xlist[n]};

# new feature: {atomExpression}.color = "red" (or "[xff0000]" or {255,0,0}

# new feature: helixes as barrels in cartoons or rockets using
#    rocketBarrels = true

 
# bug fix: -- adds antialiasing for translucent objects
# bug fix: error in state for connect DELETE
# bug fix: 0-diameter atoms displayed as single pixels when perspectiveDepth = false

# -----------------------------------------------------------------------------

#version=11.3.36

# antialias better dots

# bug fix: inline loading not working

# POV-Ray dialog update

# set antialiasDisplay T/F (false by default)
# set antialiasImages T/F   (true by default)

# -----------------------------------------------------------------------------

#version=11.3.35

# POV-Ray  slab/depth
# POV-Ray  text -- ALL text (echos, labels, axes, etc.)

# POV-Ray cleaner for Molecular Orbitals
# bug fix: getproperty atominfo returning string to Integer()
# PDB remediated atom name upgrade -- NEEDS CAREFUL CHECKING

# -----------------------------------------------------------------------------

#version=11.3.34

# write povray [width] [height] filename

# POV-Ray for mapped isosurfaces
# POV-Ray embeds Jmol script
# POV-Ray .pov files created by Jmol can be loaded as scripts


# code: cleaning of JmolConstants specialAtomNames
# code: cleaning of TextFormat.simpleReplace
# bug fix: select [SET] or [2MO] or [DB']
# bug fix: app -c flag errors not going to Logger.Error
# bug fix: no partial charges!
# bug fix: 11.3.14+ does not write colormapped JVXL files
# bug fix: Using isosurface within 1.0 @pt1 where pt1 is a draw point save state cannot be restored  

# -----------------------------------------------------------------------------

#version=11.3.33

# code: PovRay tweaks -- multiple bonds
# code: PovRay output uses BufferedWriter

# adds support for "xx'" atom designations in PDB and variable names

# bug fix: insertion codes stored incorrectly in 11.3.32

# new feature: inline scripting allows math
#
#   script INLINE "select " + site_list[2]


# new feature: site_ support for PDB and CIF
#
# loading of PDB and CIF files containing site information 
# automatically defines variables site_xxx and defines selections site_xxx and site_n
# where xxx is the site identifier and n is the site number.
# These settings are reset each time a file is loaded. 
# They do not carry over from one file to the next.

# adds    "OP1" and "OP2" as backbone designators (new PDB designation)


# _PovrayExporter adds draw, halos, stars, dipoles, vectors, polyhedra, 
#    backbone, cartoons, meshRibbon, ribbon, rockets, strands, trace,
#    dots, geosurface, molecular orbitals, LCAO cartoons, pmesh, 
#    single-color isosurfaces

# Web Export Dialog changes: new intro tab, new minilog at bottom, instructions converted to
#   buttons which open the info in the standard Jmol Help Dialog.


# bug fix: rockets color incorrect for head groups

# -----------------------------------------------------------------------------

#version=11.3.32

# bug fix: vibration disabled in 11.3.31
# bug fix: zoomto cancels slabbing
# bug fix: zoomto (atomExpression) 0  # zooms to 2x

# new feature: getproperty stateinfo TYPE
# where TYPE is one of:
#
#   colorState
#   dataState
#   fileState
#   frameState
#   modelState
#   perspectiveState
#   selectionState
#   variableState
#   windowState
#   
# bug fix: backbone not in state

# code(I): Mmset merged into ModelSet; 
#       Viewer accesses ModelSet methods directly
#       ModelManager streamlined substantially
#
#   This basically removes two full layers of abstraction.
#   All the atoms, bonds, and models are now in ModelSet.
#
# code(II): ModelSet extends ModelCollection extends BondCollection extends AtomCollection
#
# bug fix: dipoles moved back into shape from shapespecial
# bug fix: semi missing in show orientation message, second part (zyz text)
# bug fix: select 0 selects all instead of PDB group 0
# bug fix: write t.xxx

# -----------------------------------------------------------------------------

#version=11.3.31

# bug fix: calculate aromatic for N and O refined

# new feature: valence -- sum of bond orders
#  print {atomno=3}.valence
#  {atomno=1}.valence = 3  
#  select (carbon and valence != 4)

# new feature: settable atom properties (preliminary):
#  .x, .y. .z, .xyz, 
#  .fx, .fy, .fz, .fxyz,
#  .vx, .vy, .vz, .vxyz,
#  .formalcharge, .occupancy, .partialcharge
#  .temperature, .valence 
# for example:
#   a = {atomno=30}
#   a.xyz = {1.0, 2.0, 2.3}
#   a.temperature = 3.0
#   a.formalcharge = 2

# new feature: set atom properties using {xxxx}.x = 
#
# {atomno=3}.x = 3
# {(*)[2]}.xyz = {1 2 3}
# for(var i = 1; i < 3; i = i + 1); {(*)[i]}.x = 5;end for;
# {atomno=3}.property_whatever = 2.0

# new feature: set atom properties using an array instead of a DATA statement:

# {*}.property_mydata = array(1.0,5.5,4.4,3.3);
# {*}.property_mydata = "3 4 5 6 7 8";
# {atomno < 4}.xyz = array({3 4 5},{4 5 6},{5 6 7})

# code optimization for within() and setAtomBits()

# more export generator classes

# bug fix: unitcell missing some lines when axes turned off

# -----------------------------------------------------------------------------

#version=11.3.30

# new feature: adds H/Br/Cl/I/C logic to aromatic bond assignments
# new feature: adds Oxygen/Sulfur logic to aromatic bond assignments
# new feature: adds Nitrogen logic to aromatic bond assignments
# bug fix: menu for UNITCELL 

# new feature: PovrayExporter (pim schravendijk <pimlists@googlemail.com>)

# -----------------------------------------------------------------------------

#version=11.3.29

# new feature: aromaticSingle and aromaticDouble bond order options
# new feature: "smartaromatic" bonds # turned off with "smartAromatic = false"
# new feature: calculate aromatic    # calculates reasonable aromatic double/single alternation.   
# new feature: reset aromatic        # sets all aromaticDouble and aromaticSingle back to aromatic
# new feature: select ISAROMATIC     # selects aromatic atoms
# new feature: MOL reader recognizes bond types 4,5,6,7

# new feature: isosurface/mo "squared"

# new feature: fully generalized bond order "partial n.m"
#   n = number of lines, up to 5
#   m = binary mask for dottedness, up to 31 (0x1F)
#         00001  first line of bond dotted
#         00010  second line of bond dotted
#         00011  first and second line of bond dotted, etc.    

# new feature: connect may use numeric bond orders, including "partial n.m"

# new feature: preliminary work on functionalized state
# new feature: global/local functions (to applet, for instance
#   in general, functions are global -- common to all applets.
#   first-character "_" indicates this function is a LOCAL function, private to this applet.

# -----------------------------------------------------------------------------

#version=11.3.28

# critical bug fix for color command not coloring objects properly
# new feature: bondOrders 2.5 and -2.5  PartialTriple and partialTriple2

# -----------------------------------------------------------------------------

#version=11.3.27

# critical bug fix for functions not returning values
# bug fix for atomarray[i] not selecting properly
# bug fix for write not working with VAR
# bug fix for application not accepting pastes into the
#   console consisting of multiple lines
# bug fix for bondOrder command not properly treating 4.0 or 0.5
# bug fix for decimals not represented properly in error messages 

# -----------------------------------------------------------------------------

#version=11.3.26

# new feature: _1 parameter for "first atom" in second expression of connect:
#   connect 3.0 (_H and connected(_N) (_O and not within(chain,_1)) hbond 
# new feature: better reporting of PMESH file format errors 

# code cleanup: pmesh moved to shapespecial; privatized

# bug fix within(chain,xxx) not working
# bug fix for() as first command in script or line
# bug fix we were not exporting error free xhtml 1.1.
# bug fix for WebPageMaker not writing files
# bug fix for PAUSE causes app to hang -- this is a reversion of use of SwingUtilities.invokeLater(),
#  which actually will not work in ScriptWindow. We need the direct execution in
#  order to avoid the event queue from stopping itself.

# -----------------------------------------------------------------------------

#version=11.3.25

# bug fix compiler not recognizing "axes =" or "measures = "
# bug fix for WebPageMaker creating uncompressed PNG
# bug fix for WebPageMaker not stripping \ in load file names

# -----------------------------------------------------------------------------

#version=11.3.24

# critical bug fix for 11.3.23 compiler not recognizing line endings
# bug fix for show state for draw in multi-model environment
# bug fix? for background model not available for multiple frame range (e.g. frame 2.0) or after invalid frame number
#
# new feature: within(distance,isWithinAllModels,atomExpression)
#
# allows finding atoms within a specified distance of other atoms in OTHER models:
#
#   select within(5.0,true,model=2.1)  # TRUE indicates we should check all models
#   select within(5.0,false,model=2.1) # FALSE -- only model 2.1
#   select within(5.0,model=2.1)      # default is FALSE

# -----------------------------------------------------------------------------

#version=11.3.23

# VERSION full script flow control support:

# if / else if / else / end if
# for / end for
# while / end while
# 
# var i = 4
# if (i = 3)
#   print "i=3"
# else if (i = 4)
#   print "i=4"
# else if (i = 5)
#   print "i=5"
# end if
#
# var i = 5
# while ( i > 0)
# 	print "atom " + i + " " + {atomno=i}.ident + " is at " + {atomno=i}.xyz
# 	i = i - 1
# end while
#
# n = {*}.size
# for (i = 1;    i <= n; i = i + 1)
# for (j = i + 1;j <= n; j = j + 1)
# 
# 	var dist = {atomno=i}.distance({atomno=j})
# 
# 	if (dist < 1.77)
# 		 print "i-j: " + i + "," + j + " " + dist%2
# 		 measure {atomno=i} {atomno=j}
# 	endif
# 
# end for
# end for
#
# var i = 4
# while ( i > 0)
# 	print "in while: i="+i
#	if (i = 2);print "i is 2";endif
#	i = i - 1
# end while
#
#

# -----------------------------------------------------------------------------

#version=11.3.22

# Changes to webexport package only
#	New Features: textboxes for entry of author name and title for browser window
#		persistence across launches of authorname and applet size
#		automatic gzip of large structure/quantum files.
#	Bug? fix: update the page templates to XHTML 1.1
#	Minor fixes to instruction .html files.

# tweak: using "var" keyword prevents display of global variable value 

# -----------------------------------------------------------------------------

#version=11.3.21

#
# bug fix: isosurface of MOs not properly displaying color in saved state
# bug fix: state saving of @ definitions has extra = sign.
#
# new feature: fully functional user-defined functions:
#
# MACROS (no parameters)
#
# function mymacro
# 	background red
# 	color atoms blue
# end function
# 
# function mymacro2
# 	background black
# 	color atoms cpk
# end function
# 
# background white
# delay 2
# 
# mymacro
# 
# delay 2
# 
# mymacro2
# 
#
# SUBROUTINES (parameters, but no return)
#
# function drawline(id,a,b)
#   var x = script("draw line"+ id + " {atomno=" + a + "} {atomno=" + b + "}")
# end function
#
# drawline(1,3,5)
# drawline(2,10,12)
#
#
# FUNCTIONS (parameters and returns)
#
# function d(a,b)
#	return a.distance(b)
# end function
# 
# x = d({atomno=3},{atomno=4})
# print x
#
# SHOW AND WRITE:
#
# show functions
# 
# write functions macros.spt
#

# -----------------------------------------------------------------------------

#version=11.3.20

# bug fix for arrows way too fat (introduced in 11.3.19) :(

# -----------------------------------------------------------------------------

#version=11.3.19

# bug fix: critical arrow fix of 11.3.17 for 2-point arrows
# bug fix: write PNG default was 0 compression. -q flag was OK for setting 0-9
# bug fix: ragged arrow tip 

# -----------------------------------------------------------------------------

#version=11.3.18

# critical bug fix for 11.3.17 in regard to serialization of arrays
# also introduces
#
#  reset ALL  # resets all user-created variables
#
# also "exitJmol" typed into the script window for the application does that.
#

# -----------------------------------------------------------------------------

#version=11.3.17

# bug fix: problem with unescaping comma-separated point strings "{1,2,3}" as a point.
# bug fix: drawn arrows scale improperly when zooming; arrow heads off-kilter

# new feature: set defaultDrawArrowScale # 0.5 initially
# Drawn arrows now have a head size that can be set and a dimension that
# scales with the model, so arrow head:atom size ratio remains constant
  
#
# new feature: setting Jmol,Rasmol,Shapely,Amino,Roygb,Rwb
# color schemes makes those colors the default colors for these schemes. 

# rename byResidue_jmol --> byResidue_shapely
# rename byResidue_rasmol --> byResidue_amino

# new feature: array variables saved as arrays
# prior to 11.3.17, you could not do:
# 
# x = "this is a test".split(" ")
# y = x[3]
#
# because x was only saved as a string, not an array
# now x is saved as an array, so this is no problem.
#
# new feature Jmol math point(x,y,z) function
#
# point(a,b,c) or point("{x,y,z}")
#
# x = point(y[3], y[6], y[2])
# x = point("{2,3,5}")
#
# needed because, with simple numbers, just
#
# x = {3.0,4.0,5.0} 
#
# works, but 
#
#  x = {r,g,b}
#
# does(did) not.
#
# new feature: Jmol math array element assignment:
#
# a = "2,3,4,5".split(",")
#
# a[3] = "now the 4 becomes this phrase"
# a[a[2]] = "not any more; now it's this"
# a[0] = "setting the final element"
# a[6] = "expanding the array"
# print a
#
# 2
# 3
# not any more; now it's this
# setting the final element
# 
# expanding the array
#
# works with strings as well:
#
# a = "this is a test"
# a[8] = " not"  
# print a
# >> a = "this is not a test"
#
# new feature: Jmol math x = array(a,b,,,,)
#
# x = array(3,4,5,6)
# print x[3]
# >> 5
#

# new feature: Jmol math plane(x,y,z,w) function
#
# plane(a,b,c,d) or plane("{x,y,z,w}")
# or through three points:
# plane({atomExprOrPoint},{atomExprOrPoint},{atomExprOrPoint})
# or through three points with a reference point
# plane({atomExprOrPoint},{atomExprOrPoint},{atomExprOrPoint},{atomExprOrPoint})
#
# x = plane(y[3], y[6], y[2], 3.0)
# x = plane("{2,3,5,4}")
# x = plane({_H}[1],{_H}[2],{_H}[3],{_C}[1])
# new feature: print command prints a variable expression
#
# print x
# print x * 3
# print x[4] + x[3]
# print x.split(" ")[2][0]

# new feature: aPlane.distance({some atoms})

# new feature: someArray.add("string") adds string to right of each item
# new feature: someArray.sub("string") adds string to left of each item

# colorManager clean-up

# -----------------------------------------------------------------------------

#version=11.3.16

# bug fix: Eval RPN processor for list[n] addition operator not doing selection
 
# new feature: MOPAC mgf file UHF orbital reading -- preliminary only

# new feature: byElement and byResidue color schemes allow 
# customized element and residue coloring schemes. 
# built-in include: byElement_Jmol, byElement_Rasmol,
# byResidue_Jmol (shapely) and byResidue_Rasmol (amino) 
# with abbreviations byElement == byElementJmol; byResidue == byResidue_Jmol
# color atoms "byresidue_Jmol"
# 
# Users can set up their own byElement and byResidue color schemes
# simply by preficing a name with "byElement" or "byResidue":
#
# color "byElement_Mine=[x......] [x......] [x......] ..."
#                       0(unknown)    1(H)    2(He) ...
#
# then:
#
# color atoms "byElement_Mine"
#
# RANGE min and max are ignored for byElement and byResidue schemes,
# and there is no scaling done ever, so effectively these prefixes
# make the correlated value a simple index into the array.
# This is what one would want for something that should be a given 
# for a specific element or residue
# 
# Residue indexes in order correspond to the groupID of an atom:
#
#    0  noGroup, 
#    1  ALA, ARG, ASN, ASP, CYS,
#    6  GLN, GLU, GLY, HIS, ILE,
#   11  LEU, LYS, MET, PHE, PRO,
#   16  SER, THR, TRP, TYR, VAL,
#   21  ASX, GLX, UNK,
#   24  A, +A, G, +G, I, +I,
#   30  C, +C, T, +T, U, +U
#
# so this opens the door to user-created residue coloring schemes.
#
# color "byResidue_Mine=[x......] [x......]..."
#                       nogroup   ALA    ...
#
# then 
#
# color cartoons "byResidue_Mine"

# -----------------------------------------------------------------------------

#version=11.3.15

# new feature: fully customizable popup menu -- see file jmol.mnu
#
#   load menu jmol.mnu
#
# applet parameter  param=menuFile value="jmol.mnu"
#
# application parameter -m filename
#
# mostly untested
#
# new feature: show menu
# new feature: getProperty menu
#
# These deliver the current menu (as translated) in jmol.mnu format

# -----------------------------------------------------------------------------

#version=11.3.14

# new feature: fully customizable popup menu -- see file jmol.mnu
#
#   load menu jmol.mnu
#
# applet parameter  param=menuFile value="jmol.mnu"
#
# largely untested


# bug fix: HDO not recognized as "water" 
# bug fix: rotateSelected MOLECULAR not around {0 0 0}
# bug fix: -g ignored on -n option, even if -w is present
# bug fix: unknown color palette could cause error

# new feature: %l atomic element number

# new feature: APPLICATION -q (quality) option 
# new feature: lcaoCartoon, mo, isosurface, pmesh: color [translucent [n]|opaque] [colors...]

# adjustment: setting JPG default quality to 75, not 100

# new feature: {r,g,b} can be used in place of [r,g,b] for indicating color, 
# allowing programmatic color definition:
#
#   r = 255; g = 255; b = 0;
#   background {@r,@g,@b}

# new feature: expanded color command for properties
#
#   color atoms property partialcharge "rwb" range -1.0 1.0
#
# and reverse with range inverted:
#
#   color atoms property partialcharge "rwb" range 1.0 -1.0

# new feature: unlimited user-defined color schemes:
#
#   select none;
#   color "myname=[xff00ff] [xffff00] [xff00ff]"
#
# colors must be [xRRGGBB] format for this one

# new feature: fully remappable isosurface using COLOR command:
#  
#   isosurface s1 molecular map mep
#   color $s1 "bwr"
#   color $s1 "rwb" range -0.2 0.2


# APPLICATION adjustment to console window scaling/size

# -----------------------------------------------------------------------------

#version=11.3.13

# this version introduces fully customizable color schemes
#
# new feature: .color for numbers and points delivers the
# color associated with a given value in the current 
# coloring or propertyColorScheme.
# (some number).color gives a color triple as a point {x y z}
# {x y z}.color gives a hexadecimal string [xRRGGBB]
#
#
#  select atomno=3;color yellow
#  x = {atomno=3}.color # gives {255.0, 255.0, 0.0}
#  x = {atomno=3}.color.color # gives "[xFFFF00]"
#
#  set propertyColorScheme "bwr"
#  x = {atomno=3}.partialcharge.color
#
 
# new feature: color ["schemeName"] RANGE [min] [max]
# allows setting of color range and scheme so that color
# values can be determined. This would be used for making
# a color key using positionable ECHO text boxes:
#
#  color "bwr" absolute -0.1 0.1 
#  x = (0.01).color # gives the point-color associated with that number
#  set echo myecho 100 100 # position
#  echo "    " # just some space
#  color echo @x; background echo @x  # color this bar the color of 0.01
#
# new feature: show colorscheme "schemeName"
# delivers "colorscheme = " followed by a string of color values.
# without the scheme name, returns the current colorscheme listing
# For example: show colorscheme "low" delivers:
#
# colorscheme = [xff0000] [xff2000] [xff4000] [xff6000] [xff8000] [xffa000] [xffc000] [xffe000] [xfff000] [xffff00] [xf0f000]
#
# setting an array variable to the color values:
#
#  list = script("show colorscheme \"low\"")[15][0].split(" ") 
#
# new feature: set userColorScheme [list of color names]
# creates a colorscheme referred to as "user" and its reverse, "resu"
# based on a list of color values:
#
#  set userColorScheme red green [x00FFFF] blue
#  color atoms property partialcharge "user" range -1.0 1.0

# -----------------------------------------------------------------------------

#version=11.3.12

# bug fix: zoomTo 100%
# bug fix: set language fr  needs quotes but should not
# bug fix: load multiple files inline causes null pointer exception
#
# new feature: APPLICATION:  File|Export...|Export to Web Page

# -----------------------------------------------------------------------------

#version=11.3.11

# bug fix: lcaoCartoon for sp center requires "sp2" not "sp"
# bug fix: mo not showing titles
#
# new feature: lcaoCartoon rotate [x|y|z] degrees create "px"
# new feature: adds Jaguar PLT plot file reader for isosurface
#   isosurface sign red blue "myfile.plt"

# -----------------------------------------------------------------------------

#version=11.3.10

# bug fix: script window using swing thread start not from event queue
# bug fix: state of multi-polymer protein cannot be restored
# bug fix: dots nn% not operational
# bug fix: molecular dipole and multiple frames
#
# new feature: molecular dipole for Gaussian files
#
# new feature: simple calculation of approximate dipole moment from charge distributions.
#    dipole molecular # from file value if provided
#    dipole calculate molecular # from "center of gravity" of charges calculation
#
# new feature: show frame # based on models in the current frame set, displays information about frames
#
# new feature: application option for web page export
#
# new feature: write JPG n "filename" # where n is the quality (<=100)

# -----------------------------------------------------------------------------

#version=11.3.9

# bug fix for isosurface mapping of planes by MEP (see 11.3.2)

# new feature: symmetryRange: load "someFile" {mmm nnn 1|0} range x.x   where x.x is a maximum distance away from closest atom in the base cell
# new feature: synchronization of applets using JavaScript 
# new feature: synchronization of applets using Jmol scripts:
#
# synchronize .|>|*|appletId[syncId] ON|OFF|SLAVE|command
#
# The synchronize (sync) command allows two or more applets to be synchronized in
# terms of orientation. Move one with the mouse, and the other moves as well.
# In addition, the sync command allows ANY command to be sent to one or more
# other applets directly, without the intervention of JavaScript.
#
# Applets are identified by appletId (jmolApplet0, for instance)
# along with an optional bracketed sync group identifier -- generally a random 
# number that identifies the page containing the controlling applet. If the 
# syncId is not given, then the ID for the page containing the controlling applet
# is used. This feature is important for cross-frame synchronization only. 
#
#
# .          this applet only
# >          all applets except this one
# *          all applets
# appletId   id of a specific applet
# [syncId]   (optional) a unique string of digits -- brackets included
#
# ON         sync as driver (default)
# OFF        turn sync off
# SLAVE      turn sync on, but not as driver
# command    command to send
#
# for example:
#
# sync *   # synchronize all applets as drivers
# sync jmolApplet1  #syncs this applet with jmolApplet1 both as drivers
# sync > "set echo top left;echo OK"  # sends OK to top left of all OTHER applets
# sync jmolApplet2[254678942] OFF  # turns sync off for an applet ON A DIFFERENT PAGE
#                                  # or in a different FRAME
# sync . OFF # turns sync off for this applet
#
# new Jmol.js feature: jmolGetSyncId(); jmolSetSyncId(id);
# allows control over the sync ID via javascript. jmolSetSyncId(id)
# should be called prior to jmolApplet() and should incorporate some sort of
# random digits and no space characters. (A number is good.)
# This should only be necessary for multi-frame pages. 

# -----------------------------------------------------------------------------

#version=11.3.8

# bug fix: isosurface color -- not operating for some isosurface types
# bug fix: isosurface "xxxx.cube" -- not assigning proper default colors
# bug fix: gamess reader MO fix
# bug fix: state save of STRUCTURE misplaced

# feature: adds adjustable scale for unitcell axes

# -----------------------------------------------------------------------------

#version=11.3.7

# bug fix: reading of JVXL files for orbitals loses phase information 
# bug fix: ACD/Labs nonstandard cml "builtin" property reader 
# bug fix: isosurface interior cavity was not setting meshdata surfaceSet null
# bug fix: select dna can select rna if chain is mixed hybrid dna+rna

# -----------------------------------------------------------------------------

#version=11.3.6

# bug fix: inappropriate draw pick spinning for single point
# bug fix: dots not available in multimodel mode
# bug fix: multiple isosurface cavities incorrect in a multimodel environment
# bug fix: isosurface cavity not filled completely
# bug fix: nested ifs can cause last endif to throw error
# bug fix: compiler bug working with very small real numbers 
# bug fix: Support for mol2 files with blank line after comments.

# -----------------------------------------------------------------------------

#version=11.3.5

# bug fix: ACD/Labs nonstandard cml "builtin" property reader 
#   note that xmlReader (SAX reader) is now set to ignore all DOCTYPE declarations
# bug fix: odydata fix for files with \r\n for line ending
# bug fix for PDB remediated T/DT difference of C5M/C7
# bug fix: set spin X was case-selective
# bug fix: echo text not re-orienting on resize of applet or application
# bug fix: multiple isosurface cavities in a multimodel environment
# bug fix: missing set picking ident in popup window
# bug fix: popup menu set picking label not working

# -----------------------------------------------------------------------------

#version=11.3.4

# rough export of VRML using
# 
#    write VRML "myfile.wrl"
#
# includes colored balls and sticks; uncolored isosurfaces

# -----------------------------------------------------------------------------

#version=11.3.3

# bug fix pmesh not working
# bug fix for state after calculate surface, calculate hbonds, configuration, dynamic variable definition in multimodel environment (ModelSet::addStateScript) 

# NEW FEATURES from the 2007 Gordon Research Conference on Visualization in Science and Education: 
#
# internal dataFrame concept
#
# new command: ramachandran
#
# new command: quaternion [w x y z] [derivative]
#
# TODO: frame menu
# TODO: write VMRL

# preliminary Maya export -- sets the stage for any number of export frameworks.
 
# -----------------------------------------------------------------------------

#version=11.3.2

# bug fix: set picking label
# bug fix: minus-sign "fix" in 11.3.1 broke all {x -y z} notation
# bug fix: state for phased atomic orbitals does not preserve red/blue color
# bug fix: mo opaque causing "invalid argument" when no MOs
# bug fix: isosurface cavity molecular caused exception
# feature: adds isosurface capability to map MO and MEP data onto planes

# -----------------------------------------------------------------------------

#version=11.3.1

# bug fix: debugscript on;center 3-5; "-" missing
# bug fix: zoomTo (5-7) read as "5 to -7"
# bug fix: move with time < 0.03 seconds causes molecule to disappear
# bug fix: hover interruption 
# bug fix: image offsets in creating JPG image if model has been moved by CTRL-ALT-LEFT drag
 
# -----------------------------------------------------------------------------

#version=11.3.0

# perspectiveModel 11 default
# bug fix for 3D text echo staying in window
# bug fix for draw text+translucency
# bug fix for draw text not hovering for points
# bug fix for multiple draw objects in show state
# bug fix for spin save reversed direction
# bug fix for CdkAdapter not having auxiliaryInfo data
#
# adds the ability to find the coordinate of a specific 
#   draw object vertex  using $objName[vertexId] as in 
#   draw p perp plane (atomno=1) (atomno=2)
#   x = $p[3]
#   draw pt1 $p[1]


# -----------------------------------------------------------------------------

#version=11.1.49

# bug fix for Gaussian file reader fix for very large negative MO coefficients
# bug fix for move not releasing isInMotion
# bug fix for x = "testing"[0], x = "testing"[-1], "testing".split("t")[0], and "testing".split("t")[-1]
# bug fix for select {*}[0], {*}[-1], etc., which now counts from the end back
# adds proper indents on debugscript for if/else/endif
# allows "jmolscript:" for embedded scripts and callbacks

# -----------------------------------------------------------------------------

#version=11.1.48

# bug fix for gamess reader MO fix
# bug fix for mopac GRAPHF file fix (resolver thought MOL)
# bug fix for lcaocartoon "lp" fix for AX3E and AX2E

# -----------------------------------------------------------------------------

#version=11.1.47

# bug fix for compound document reader not reading enough short segment pointers
# bug fix for Spartan reader not recognizing 5D orbital problem
# bug fix for animation skipping frames

# -----------------------------------------------------------------------------

#version=11.1.46

# bug fix for Jvxl.jar standalone application not having complete set of class files (jvxl) 
# adds inline help support for Jmol application running under Java 6 (Java 1.6.xx)
# bug fix for inappropriate pre-JVM12 menu items not disabled

# -----------------------------------------------------------------------------

#version=11.1.45

# bug fix for animFrameCallback not indicating animation direction
# bug fix for help not working and help URL not displaying (app)
# bug fix for app not writing state from File...Export menu (app)
# bug fix for retaining the last-saved file type selected for Image export (app)
# bug fix for "wait" not recognizing if it is just a syntax check (app)

# -----------------------------------------------------------------------------

#version=11.1.44

# bug fix for inability to specify fractional coordinates: adds fx, fy, fz as
#   select fx < 0.5 and fy < 0.5 and fz < 0.5
#   aveFracX = {molecule=1}.fx
# bug fix for inability to use x,y,z,fx,fy,fz with cartesian points
# bug fix for select BONDS ({...}) not preserved in state
# bug fix for geosurface not always restored from saved state
# bug fix for strandcount saved explicitly forces bioshape load

# -----------------------------------------------------------------------------

#version=11.1.43

# bug fix for labels mysteriously disappearing. Also probably taking up HUGE amounts of hashtable space.
# bug fix for hydrogen bond calculation with incomplete nucleic acid definitions.
# bug fix for "set picking draw" crashing Jmol
# bug fix for strandCount not carrying over to meshRibbon
# bug fix for geosurface/dots save/restore state exception
# bug fix for save state using "measurements off" instead of "set measurements off"

# -----------------------------------------------------------------------------

#version=11.1.42

# bug fix for lack of updating of certain variable predefined expressions
# bug fix for smiles nonfunctional

# bug fix for load append and structure commands
# bug fix for load files losing structure and cartoons
# bug fix for multiple frames displayed does not show Select...Elements menu
# bug fix for select @x not functioning where x = {atom expression} or x = "atom expression"
# bug fix for {atom expression}.ident nonfunctional

# code refactoring Frame --> ModelSet and ModelLoader
# code refactoring modelframe --> modelset package
# code refactoring shapebio --> shapebio + molsetbio packages
# code refactoring dissociates Mps.MpsShape from Mps as BioShape 
# code refactoring removes Mps.Mpsmodel
# code refactoring Mps --> BioShapeCollection
# code refactoring greatly simplifies BioShapeCollection subclasses

# -----------------------------------------------------------------------------

#version=11.1.41

# bug fix for load with explicit spacegroup not respecting normalization choice
# bug fix for symop=nijk selecting base atoms when not appropriate
# bug fix for select specialposition non-functional
# bug fix for adding atoms but mads[] going stale
# slight redefinition of "special position" 
# bug fix for structure loss on load append. (structure is supposed to be recalculated).
# adds language switching for Open / Save dialog boxes and full menuing system in Jmol application
# adds "structure" command -- structure [helix|sheet|turn|none] (atom expression)
# adds "save/restore structure" command

# -----------------------------------------------------------------------------

#version=11.1.40

# bug fix for backgroundModel and save state 
# bug fix for load append with spacegroups causing atoms to be repositioned
# bug fix for anim playrev in loop mode causing animation to stall

# -----------------------------------------------------------------------------

#version=11.1.39

# several bug fixes:
#
#  bug fix for mo data misreading in smol files
#  bug fix for lcaoCartoon "s" giving incomplete spheres
#  bug fix for select symop=3555 not giving proper atoms when load "" {444 666 0}
#  bug fix for PDB files not supplying information about residues for the popup menu.
#  bug fix in frame range 1.0 when file 1 has only one model.

# -----------------------------------------------------------------------------

#version=11.1.38

# bug fix for opaque triangles missing one pixel on right side when translucent objects are present.
# bug fix for label alignments sometimes not being saved properly in the state
# bug fix for animFrameCallback giving multiple callbacks -- still there, but identified now
#    in terms of whether animation is on or not in the 7th parameter being 1 or 0:
#
# function animFrameCallback(app,frame,fileno,modelno,firstno,lastno,isRunning){...}

# -----------------------------------------------------------------------------

#version=11.1.37

# fixes bugs in draw and unicode label state definitions
# adds simplistic <sub></sub> <sup></sup> to text, including echo, label, hover, etc.
# fixes popup menu to better deal with multiple file context
# update of Turkish translation

# -----------------------------------------------------------------------------

#version=11.1.36

# build: renames applet files JmolApplet0*.jar and JmolAppletSigned0*.jar
#
# bug fixes for isosurface in multi-file environment
#
# bug fix and additional work in relation to translations
# 
# zoomTo (atom expression) 0
# 
# with options 
# 
# zoomTo (atom expression) 0+n
# zoomTo (atom expression) 0-n
# zoomTo (atom expression) 0*n
# zoomTo (atom expression) 0/n
# 
# also 
# 
# moveTo timeSec {x y z w} (atom expression) 0 [zoom factor]
# and
# moveTo timeSec {x y z w} 0 transX transY (atom expression) 0 [zoom factor]
# 
# where [zoom factor] is x, where x > 0
# or
# [0] [[+ | - | * | /] x]
#
#
# app fix for Edit...preferences not properly refreshing for axes and boundbox

# -----------------------------------------------------------------------------

#version=11.1.35

# fix for x = {...}.resno and {...}.groupID
# fix for select resno=-1
# first version of pt_BR translation

# -----------------------------------------------------------------------------

#version=11.1.34

# language submenu

# -----------------------------------------------------------------------------

#version=11.1.33

# bug fixes -- draw state, menu not updating, language submenu

# -----------------------------------------------------------------------------

#version=11.1.32

# adds capability to define a property for selected atoms:
#
#  select xxx
#  property_x = n.m

# -----------------------------------------------------------------------------

#version=11.1.31

# adds capability to read data from selected fields (white-space delimited columns) in a file
# 
# propertyDataField = 0  # no fields -- just read tokens
# propertyDataField = 2  # data are in field 2 (second from the left)
# propertyAtomNumberField = 1 # data must match atomNo in field 1 and will be in 
#                           the field specified by propertyDataField

# -----------------------------------------------------------------------------

#version=11.1.30

# full support for switching languages, including a new "language" menu item
#
# Jmol.js:  
#
# jmolSetCallback("language", "de")
#
# Jmol scripting:
#
# language = "de"
#
# Menu:
#
# new language submenu with checkboxes.
#
# allows for efficient specific file reader options for the applet (particularly)
#
# adds _spinning variable
#
# adds LOAD xxx::myfile   xxx indicating file type xyz, mol, etc.
#
# not important generally.
#
# adds PQR reader option, at least for PDB2PQR generated output
#
# better spin control during zoomTo and moveTo
# spinning now detects that a zoomTo or moveTo operation is occurring
# or the user is manipulating the model with the mouse, and pauses 1 second
# for that operation to complete before resuming spinning
# 
# hover now is turned off during spinning or user manipulation of the model
# 
# zoomTo and moveTo the same location changed to no time delay

# -----------------------------------------------------------------------------

#version=11.1.29

# code: totally reorganized isosurface code; new org/jmol/jvxl packages
#
# adds  (1) isosurface functionxy "file:data.dat" ...
# adds  (2) isosurface functionxy "functionName" {x0 y0 z0} {-ni ...} ...
# adds  (3) isosurface functionxy "functionName" {x0 y0 z0} {-ni ...}{-nj ...} ...
#
# (1) "file:" allows reading of xy data from files for graphing f(x,y)
# (2) ni<0 indicates JavaScript functionName will return a single string that
#     should be parsed for numeric data.
# (3) ni<0, nj<0 indicates that JavaScript will fill the fourth parameter
#     of the function with an array of f[nX][nY] data values:
#
# Jmol:
#
#   isosurface s1 functionXY "xyData" {-2 -2 -2} {21 0.1 0 0} {21 0 0.1 0} {21 0 0 0.1} 
#
# JavaScript: (slow)
#
# function xyData(app, x, y) {
#   return func(x, y)
# }
#
# Jmol:
#
#   isosurface s2 functionXY "xyDataAsString" {-2 -2 -2} {-21 0.1 0 0} {21 0 0.1 0} {21 0 0 0.1} 
#
# JavaScript: (much faster)
#
# function xyDataAsString(app, nX, nY) {
#   var s
#   for (var i = 0; i < nX; i++)
#     for (var j = 0; j < nY; j++)
#       s += "x_"+i+"\ty_"+j+"\t"+func(i,j)+"\n"
#
#  //non-numeric formatting allowed but not necessary
#
#   return s
# }
#
# Jmol:
#
#   isosurface s3 functionXY "xyDataAsArray" {-2 -2 -2} {-21 0.1 0 0} {-21 0 0.1 0} {21 0 0 0.1} 
#
# JavaScript: (very fast)
#
# function xyDataAsArray(app, nX, nY, fxy) {
#   for (var i = 0; i < nX; i++)
#     for (var j = 0; j < nY; j++)
#       fxy[i][j] = func(i,j)
# }
#
# (2) and (3) are very fast; (1) is the original method, but it is slow.
#
# MAYSCRIPT expanded
#
# for the Wiki or any application where absolutely no JavaScript
# is to be allowed, simply remove the MAYSCRIPT parameter, which
# now covers all aspects of JavaScript interaction from within Jmol
#
#
# adds   applySymmetryToBonds  (default: FALSE)
#
# applySymmetryToBonds 
#
# When set TRUE, this flag instructs Jmol when applying symmetry
# to atoms, as in "load xxx.cif {1 1 1}", to also apply symmetry
# to the bonds indicated in the file. The flag is useful when 
# normal Jmol autobonding would not properly connect atoms, but 
# the model is "molecular" -- the base atom coordinates are correct
# for whole molecules. The flag should NOT be used in cases where
# the application of symmetry operations creates new bonds that 
# were not present in the original set, as for quartz.cif, where
# there is only one bond initially, and after applying symmetry
# new bonds are created that are between atoms that were created
# using two different symmetry operations. 
#
# adds isosurface HOMO/LUMO [+/- n]
#
# better isosurface plane rendering, especially in regard to meshes
# bug fix in isosurface contour -n going WAY back to before 10.9.60
# refactoring of all isosurface-related classes
# support for Spartan MO HOMO
#
# adds isosurface POCKET [cavity] sasurface
# adds isosurface INTERIOR [cavity] sasurface
#
# adds load TRAJECTORY -- for a single file with multiple models all with
# the same number of atoms. Atom locations can also be updated on the
# fly using the data statement. 
#
# adds TRAJECTORY n command -- like FRAME or MODEL, but never more
# than one model at a time displayed, because there is only one set
# of atoms. 
#
# adds script: option for callbacks set from within Jmol. That is, callbacks
# can either be to host page JavaScript functions or to Jmol scripts. This 
# will allow interactive sessions without external JavaScript.
#   
# set pickcallback "script: script doCallback.spt"
#
# adds resizeCallback because certain positioning of echos and sizing of the 
# structure may require method intervention after the resizing   
#
# adds translucency for echo and hover, both text and backgrounds
#
# adds echo script to defined state
#
# adds hourglass cursor during MO/Isosurface operations
#
# fixes inoperative "set pickingstyle measures on"

# -----------------------------------------------------------------------------

#version=11.1.28 

# adds
#
# a = script("some script command")
# a = javascript("some javascript")
#
# putting output into a from commands such as "show" or "getProperty", for instance.
#
# reinstates tempManager properly.
#
# adds support for CAChe CSF files with MOPAC (AM1, PM3, etc.),
# Density Functional, and Extended Huckel Gaussian/Slater-based molecular orbitals.
#
# CHANGES DEFAULT RENDERING FOR MOLECULAR ORBITALS TO: MESH NOFILL FRONTONLY
#
# adds MOPAC 2007 graphf output reader (gpt2 files, MOPAC molecular orbitals)
# based on the VERY latest version (not released yet), which includes
# "MOPAC-Graphical data" on the first line, character index 6.
#
# adds 
#
#  mo HOMO [+/- n]
#  mo LUMO [+/- n]
#
# fixes bugs found by FindBugs:
#
# labels:  default z setting for labels (set labelFront, set labelGroup, set labelAtom) 
#          was not being recorded properly
# move:    with slab or zoom was doing integer math
# GhemicalMMReader -- was incorrectly assigning aromatic to bond type 4 via fall-through of switch
#
# adds xodydata reading of "boundary" as unitcell
# enhances default axis rendering for axes unitcell
#
# adds expanded isosurface-related commands:
#
#  draw list
#  isosurface list
#  lcaocartoon list
#  (mo list) -- not particularly useful
#  pmesh list
#
# Listing gives id, number of vertices, number of polygons, visibility,
# and title (usually the command that was given that created this isosurface)
#
# CHANGED BEHAVIOR FOR ISOSURFACE COMMAND WITHOUT ID INDICATED:
#
# Now if no ID is indicated, the previous ID is used for all commands 
# EXCEPT "isosurface delete", which deletes all isosurfaces. 
#
# This is a change from Jmol 10.2 and 11.0, where if you leave
# off the ID, a new isosurface is created.
#
# This was a needed change to prevent unwanted multiple isosurfaces.
#
# CHANGED BEHAVIOR FOR ISOSURFACE DEFAULT COLOR
#
# The default isosurface color no longer changes shade among 5 possible shades.
# That was necessary only because it was easy to mistakenly make multiple
# isosurfaces that otherwise would look the same. 

# -----------------------------------------------------------------------------

#version=11.1.27

# fixes two state bugs: 
# 1) dots/geosurface not being saved properly in state
# 2) animation parameters not being saved properly in state

# -----------------------------------------------------------------------------

#version=11.1.26

# fixes two nasty bugs relating to isosurfaces and JVXL files. 
#  -- JVXL files created from molecular orbitals will show up with no color
#     in 11.1.0 - 11.1.25 because of a missing number in the definition line :(
#  -- JVXL files created from molecular orbitals will show unwanted cross-over
#     surfaces from + to -. 

# -----------------------------------------------------------------------------

#version=11.1.25

# --fully dissociates geosurface from dots; 
# --allows coloring and transparency of geosurface
#   similarly to the way stars are colored

# -----------------------------------------------------------------------------

#version=11.1.24

# refactored Geodesic3D, Dots, DotsRenderer
# independent dots/geosurface
#
# isosurface CAVITY 

# -----------------------------------------------------------------------------

#version=11.1.23

# fixes a number of bugs, some critical
#
# adds isosurface CAVITY x.xx -- a new way to depict the cavities of 
# a molecule in terms of color. 

# -----------------------------------------------------------------------------

#version=11.1.21/22

# adds 
#
# load file "=xxxx" and set loadFormat "http://....../%FILE.....
# load files .....  # just a cleaner version of loading multiple files.
# load append ..... # APPENDS the file(s) or model(s) as new frames onto the current set.
# data append ..... # same thing, but inline
#
# isosurface MODEL n
# pmesh MODEL n
# isosurface within x.x (what)
#
# Introduces "real" color translucency 
#
# color xxxx translucent N   
#
# where N is -1 to 9.
#
#                 OR     OR   
# translucent -1               same as Jmol 10.2
# translucent 0.0                opaque
#   through
# translucent 1.0                transparent (invisible)
#
# translucent 2   0.125  32    1/8 translucency (slightly translucent)
# translucent 3   0.25   64    2/8 translucency
# translucent 4   0.375  96    3/8 translucency 
# translucent 5   0.5   128    4/8 translucency (default)
# translucent 6   0.625 160    5/8 translucency 
# translucent 7   0.75  192    6/8 translucency 
# translucent 8   0.825 224    7/8 translucency (very sheer)
# translucent 9   1.00  255    8/8 transparent (invisible)

# -----------------------------------------------------------------------------

#version=11.1.20

# cleans up axes/boundbox/unitcell business
#
# allows for individually colored axes:
#
# color axis1 ... 
# color axis2 ... 
# color axis3 ... 
# color axes ... (of course)
#
# and these objects are considered more like background -- 
# colors and sizes persist past file load
#
# to turn on and off without messing with size, just use
#
# showAxes = true
# showBoundBox = true
#
# etc.

# -----------------------------------------------------------------------------

#version=11.1.19  

# allows comparison of user-defined atom properties in SELECT:
#
# select property_myprop < 1e-5; 
#
# and 
#
# x = {carbon}[5].property_test
# x = {carbon}.property_test.min
# x = {carbon}.property_test.max
#
# etc.
#
# This is it! :)

# -----------------------------------------------------------------------------

#version=11.1.18

# introduces user-definable atom properties that can be used
# to color isosurfaces:
#
# x = load("file.dat");
# isosurface variable x   # simple 100% vdw radius mapping
#
# select 1.3
# data "property_myprop @x"
# isosurface property_myprop
#
# allows isosurface mapping of general atom properties:
#
# isosurface sasurface colorscheme bwr map property temperature
#
# adds "bwr" colorscheme as opposed to "rwb", which I think is backward.
#
# isosurface -- now supports APBS (  )
#               molecular electrostatic potential output files
#
# write -- modified to allow unquoted filename in 
#   write isosurface file.name
#
# jvxl 1.0 -- adds ANGSTROMS flag on line with # of atoms (line 3)

# -----------------------------------------------------------------------------

#version=11.1.17

# deprecation of SET
# ------------------
#
# The "SET" command is no longer necessary. Anything that could have
# been set using "SET x .... " can now be set using
#
#  x = ....
#
# This allows for a much cleaner interface because we simply make 
# settings in a normal sort of way:
#
# axes on
# axes = molecular
#
# measures = angstroms
#
# It will take a bit more to make it all consistent, but the idea
# is that there are then some special reserved variables that 
# mean something special when set, like "bondmode"
#
# This build allows for the applet to be "bare-bones" -- only the
# essential classes included in the Jar file; others never included
# or possibly in accompanying jar files, such as, perhaps, JmolPopupMenu.jar,
# JmolNavigation.jar, JmolBio.jar, Jm  olSurface.jar, JmolXtal.jar, etc. 
#
# Then a developer can slim down the download. The minimum is 697K, 
# about 58% of the full package. All that gets you is atoms, bonds, 
# and measures. 

# -----------------------------------------------------------------------------

#version=11.1.16:

# First incompatibility found:
#
# set echo myecho (atomno=3) or (atomno=5)
# 1) adds two new modifiers:
#  .min
#  .max
#
# as in:
#
#  x = {*}.bonds.length.max  #the longest bond length
#  x = {*}.atoms.max         #the last atom
#
# 2) extends find() to sets of lines. For example:
#
#  longLine={*}.bonds.label("%=, %LENGTH").lines.find({*}.bonds.length.max)
#  message @longLine
#  longest = longLine%(longLine.find(",")-1)
#  b = {*}.bonds[longest]
#  select b_set;color bonds yellow
#
# NOTE: _set removed in 11.3.41:
#  select @b;color bonds yellow
#  
# -----------------------------------------------------------------------------

#version=11.1.15:

# APPLICATION: adds undo/redo to a fixed depth of 50 commands
#
# TYPE CONVERSION
#
# We have eight different variable types now:
#    boolean    True/False 
#    integer    0, 1, 2, ....
#    decimal    3.5, 3.25E-3
#    string     "test" "3.5"
#    point      {2.3 3.4 5.6} {0 1/2 1}
#    plane      {0 1 1 0}
#    atomset    {oxygen}
#    bondset    {oxygen}.bonds

# plane and bondset are new; arithmetic operations are not fully developed.

# These can be mixed and matched to good effect. Certain relatively
# intuitive rules apply. Usually the operand on the left sets
# the overall type, allowing for easy type conversion depending upon 
# operand order:
#   int + float:
#     0 + 3.6 ==> 3    (int on left rounds float on right)
#     3.6 + 0 ==> 3.6  (float on left sets result)
#
#   int/float + string:
#     0.0 + "3.5" ==> 3.5 (string converted to float)
#     0 + "3.5"   ==> 3 (string converted to float, then int)
#     "3.5" + 0   ==> "3.50" (integer converted to string)
#     "3.5" + 0.0 ==> "3.50.0" (float converted to string)
#
#     1.0 + {carbon}.xyz     ==> 1 + distance from {0 0 0} to {carbon} center
#     {carbon}.xyz + 1       ==> {carbon} center point offset by {1 1 1}
#
#     x = {carbon}.xyz * {1 0 0} ==> (dot product)
#
#     Now x is the average x coordinate of carbon
#
#  Boolean expressions are a bit different in that the operators 
#  AND, OR, XOR, and NOT all require conversion to boolean UNLESS both
#  operands are atom expressions, in which case these operate directly on the
#  atom sets and return a new atom set, just like in SELECT.
#
#     3 and 0.5  ==> TRUE (both are nonzero)
#     false OR 2.0 ==> true (2.0 is not 0, so it is TRUE)
#     {oxygen} and {molecule=1} ==> all oxygen atoms in the first molecule
#
#     x = ({oxygen} and {molecule=1}).xyz 
#
#     x is now the center point of all oxygen atoms in the first molecule
#
#  In standard math, boolean TRUE evaluates to 1.0; FALSE evaluates to 0.0
#
#     true + 2.0 ==> 3.0 ("TRUE" evaluates to 1.0 in math operations)     
#     2 + true ==> 3 ("TRUE" evaluates to 1.0 and is then turned into an integer)     
#
#
# ATOM EXPRESSION AUTOMATIC DEFINE
#
# When you set a variable to a value, and that value is a point, plane, or atom expression,
# then Jmol automatically registers the result as follows:
#
#  points:
#    x = "{x y z}"
#
#  planes:
#    x = "{x y z w}"
#
#  atom expressions:
#    x = n
#    x_set = "({i j k ...})"
#
# NOTE: "set x" removed in 11.3.40:
# NOTE: _set removed in 11.3.41:
#
#    x = {oxygen}.xyz
#    y = {carbon}.xyz
#    draw @x
#    draw @y
#    draw line1 @x @y
#
#   and
#
#    x = {carbon}[3][5]
#    select @x
#    color green

#    x = {carbon}[3][5]
#    select @x
#    color green

#
#    x = {carbon or oxygen}.bonds
#    select BONDS @x
#    color bonds green

#
# DATA() function and variable option for DATA command
#
# x = data({atomno < 10},"xyz")
# x = data({atomno < 10},"mol")
# x = data({atomno < 10},"pdb")
#
# data "model @x"
#
# write data t.xyz
# write data t.mol
# write data t.pdb
#
#
# Better BITSET implementation 
#
# CHANGE: default string value for a bitset is now the ({n:m})
# string format, which can be used in numerous commands.
#
# To get the count within a string context, just use .size:
#
# x = "number selected is " + {selected}.size
#
# or force integer math:
#
# x = "number selected is " + (0 + {selected})
#
# merges math functions within(), connected(), substructure() into molecular math
#
# adds connected() both for finding atoms and for identifying bonds:
#  xAtoms = connected(3, {carbon})
#  xBonds = connected(1.3,2.5,"single", {carbon} {oxygen})
#
# adds
#  x.atoms
#  to go along with x.bonds   
#
# adds distance({carbon},{oxygen})
# adds angle({carbon}[4],{oxygen}[3], {nitrogen}[2])
#
# angle function accepts from three or four 
# atom expressions or XYZ coordinates and returns a decimal number for
# the distance, angle, or dihedral relating these points. 
# When more than one atom is involved, average positions are used. 
#
# Note that when more than one atom is involved in a set, 
# the following are different:
#
#  x1 = {molecule=1}.distance{molecule=2}
#  x2 = {molecule=1}.xyz - {molecule=2}.xyz
#
#  x1 is a NUMBER that is the "average distance measured 
#     from each molecule 1 atom to the average molecule 2 position"
#  x2 is a point representing the VECTOR from the "average position of molecule 2" 
#     to the "average position of molecule 1"
#
# The following are all equivalent:
#
#  x3 = {molecule=1}.xyz.distance{molecule=2}
#  x4 = 0.0 + ({molecule=1}.xyz - {molecule=2}.xyz)   
#  x5 = ({molecule=1}.xyz - {molecule=2}.xyz).distance{0 0 0}
#  x6 = distance({molecule=1} {molecule=2})
#
#  They are all the distance from the center of molecule 1
#  to the center of molecule 2
#
#
# x = load("filename")
#
# The string data in the file are loaded into the string.
# If the file does not exist, then the string contains the error message.
#
#
# Implements ({i j:k m n}) bitset option across all commands
#
# RESET varName
#
# reset varName  # clears that variable definition
#
#
# "UNSPECIFIED" and "QUADRUPLE" BOND TYPES
#
# An additional bond type is now avaiable: "UNSPECIFIED". 
# This shows up in the MOL2 reader and may be selected for and modified using, for example:
#
#  select connected(unspecified)
#  color bonds red
#
# or
#
#  select connected(unspecified)
#  connect (selected) single modify
#
# In addition, we now can depict quadruple bonds.

# -----------------------------------------------------------------------------

#version=11.1.14:

# DYNAMIC MEASUREMENTS
#
# Now that we can move atoms so easily, we don't want those measurements getting stale.
#
# set dynamicMeasurements
#
# allows measurements to be recalculated on the fly.
#
#
# MEASUREMENT FORMAT STRINGS
#
# Measurement format strings can be set using
#
# measure "format string..."
#
# where the format string may have the following keys:
#
#  %=      1-based index
#  %VALUE  the value of the measurement
#  %UNITS  the units for the measurement
#  %x1     atom property "x" for atom 1 
#  %x2     atom property "x" for atom 2
#  %x3     atom property "x" for atom 3
#  %x4     atom property "x" for atom 4
#
# for example:
#
#  measure "%a1 -- %VALUE %UNITS --- %a2"
#
#
# MATH OPERATOR PRECEDENCE AND PARENTHESES
#
# Jmol 11.1.14 supports full standard operator precedence and parentheses
# in IF, SET, and %{} expressions
#
# degUnsat = ({carbon} * 2 + {nitrogen} + 2 - {hydrogen}) / 2
#
#
# BRACES INDICATE ATOM EXPRESSIONS  
#
# Use {} in IF, SET and %{} for designating atom expressions.
# We are still using () for "embedded expressions" in all other commands.
#
#   nOxygen = {oxygen}
#   xOxygen = {oxygen}.x
#   ptOxygen = {oxygen.xyz}
#
#   a = {oxygen}.temperature
#   message %{{carbon}.x}
#   if {O22}.bondCount > 2;goto ...
#
# but
#
#   draw line1 (atomno=2) (atomno=3)
#
#
# ATOM EXPRESSION ITEM SELECTOR [n]
#
# In SET, IF, and %{ } in MESSAGE and ECHO you can now specify a subset of the 
# atom expression. 
#
#  x = {carbon}[3]  # the third carbon atom
#  x = {carbon}[3][5]  # the third through fifth carbon atoms
#  x = {carbon}[3][0]  # the third through last carbon atoms
#
# This also works in standard select expressions, but using () instead:
#
#  select (carbon)[3]  # the third carbon atom
#
# and anywhere an embedded expression might be found:
#
#  measure ((_C)[1]) ((_C)[2])
#
#
# POINTS IN IF, SET, and %{}
#
# Points in IF, SET, and %{} can be designated using the standard {x y z}
# notation WITHOUT commas. This is because we have to distinguish between
# atom expressions {1,2,3} and coordinates {x y z}, and this seems to me the
# simplest way to do it. (Comma means "or" in atom expressions.) In all other
# instances, the commas are fine, including "SET UNITCELL" and "SET DEFAULTLATTICE".  
#
#  x = {1 1 0} + {oxygen}.xyz
#
# {  }.distance ATOM PROPERTY FOR SET, IF, and %{}
#
# d = {oxygen and * /1}.distance{oxygen and * /2}
# set echo top left
# echo the O-O distance is %{{oxygen and * /1}.distance{oxygen and * /2}}
#
# message %{{atomno=3}.distance{atomno=4}}
# message %{{atomno=3}.distance{1/2 1/2 1/2}}
#
#
# {  }.label "xxxx" ATOM PROPERTY FOR IF, SET, and %{}
#
# The .label format provides a convenient means of delivering a wide range of 
# atom-based data back to the user with whatever formatting is desired. 
#
# x2 = {atomno=3).label("atom %a\t" + (atomno=3).xyz)
# xyzFile = "" + {selected}.size + "\n\n" + {selected}.label("%a %x %y %z")
#
#
# "....".lines
#
# The .lines operator splits a string into an array based on line termination. 
#
# WRITE VAR "filename" (application only)
#
# pdbAtomData = {selected and not hetero}.label("ATOM  %5i %-4a%1A%3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e%2C")
# pdbHeteroData =   {selected and hetero}.label("HETATM%5i %-4a%1A%3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e%2C")
# pdbFile = pdbAtomData + pdbHeteroData
# write VAR pdbFile "test.pdb"
#
# molFileData = "line1\nline2\nline3\n"+(""+{selected}.size)%-3+(""+{selected}.bonds.size)%-3+"  0  0  0\n"+{selected}.labels("%-10.4x%-10.4y%-10.4z %2e  0  0  0  0  0")+{selected}.bonds.labels("%3D1%3D2%3ORDER  0  0  0")
#
#
# GETPROPERTY "evaluate"
#
# You can now use getProperty to get expression information directly:
#
#  getproperty "evaluate" "{*}.xyz"
#
# or on a web page the following returns a valid XYZ file for molecule 1:
#
#  var info = jmolGetPropertyAsJavaObject("evaluate", '"" + {molecule=1} + "\n\n" + {molecule=1}.label("%a %x %y %z")')
#
#
# SELECTED ATOMS FROM ATOM EXPRESSIONS
#
# You can select atoms from an atom expression using [n]. 
# "[0]" means "and everything after".
#
#  x = {atom expression}[3].ident
#  x = {atom expression}[3][0].xyz   # 3 and after (average position)
#  x = {atom expression}[3][5].x     # 3-5 (average x)
#
#
# SELECTED BONDS FROM EXPRESSIONS
#
# You can select bonds from an atom expression
#
#  x = {atom expression}.bonds.ident
#  x = {atom expression}.bonds[3].ident
#
#
# BOND INFORMATION
#
# You can specify how to label a set of bonds using format strings.
# Numbers are currently in Angstroms. Keys are 
#
#  %#      sequential number
#  %=      file 1-based index
#  %ORDER  the bond order
#  %TYPE   the bond type
#  %LENGTH the bond length
#  %x1     atom property "x" for atom 1 
#  %x2     atom property "x" for atom 2
#
# The special atom properties %D1 and %D2 give sequential numbers for the
# atoms FOR THIS SET OF BONDS. This is so that a proper subfile of type MOL
# could be generated.
#
# x = {atom expression}.bonds[3].label("%# %3ORDER %TYPE %a1 %a2 %6.3LENGTH") 
#
#
# EXPANDED MODULUS % OPERATOR IN IF, SET, AND %{}
#
# Usually modulus is reserved for integer math, so we
# extend that here to add some useful "modulus-like" capability:
#
#  string modulus for trimming and padding
#    "test" %3  ==> left trim:  "tes"
#    "test" %6  ==> right pad:  "test  "
#    "test" %-3 ==> right trim: "est"
#    "test" %-6 ==> left pad:   "  test"   
#
#  float modulus for rounding and scientific notation
#    3.5456 %3 ==> "3.546"  (STRING!)
#    3545.6 %-3 ==> "3.55E+3" (STRING!)
#
#    0.0 + 3.5456 %3  ==> 3.546 (float)
#    0.0 + 3545.6 %-3 ==> 3550.0
#
#  point modulus for getting base unit cell equivalent position
#    {3/2 1/2 1/1} % 0 ==> {1/2 1/2 0}

# -----------------------------------------------------------------------------

#version=11.1.13:

# DATA "coord set"
# invertSelected POINT ....
# invertSelected PLANE ....
# invertSelected HKL ......
# rotateSelected ....
# rotateSelected spin ....
# full state support for "tainting" atom positions using translateSelected or invertSelected
#
# set allowRotateSelected # then use ALT-LEFT for rotating just the selected molecule
#
# this all definitely needs some work and discussion in terms of user interface via mouse
#
#
# write coords xxxx.spt
# load xxxx.spt # minimal -- just coord.
# script xxxx.spt # this is the full state load
#
# x = (some atom expression).atomProperty  -- takes an average if more than one atom
# for example:
#
#  x = (* /1).temperature
#  x = (C5).bondcount
#
# note that you can even say:
#  set echo top left
#  echo average position= {%{(selected).x},%{(selected).y},%{(selected).z}}
#
# and it will AUTOMATICALLY update with new values as you select different atoms.

# -----------------------------------------------------------------------------

#version=11.1.12:

# app fix for console entry messing up cursor position; 
# allows for scripting during pause or interrupt of running script using ! as first character of script
# new: within(x.x,plane,$plane1)
# fix for "draw off" not recorded in save state
# fix for within(integer,...) bug using RasMol units
# fix for _modelnumber showing up as 2001
# reconfigures _modelNumber as x.y for single models; x.x - y.y for range 
# adds _currentFileNumber
# adds _currentModelNumberInFile
# disallows user setting of variables with _ as first character
# adds @variableName in any command 
# adds frame x.x - y.y
# adds frame 0.0
# adds frame range x.x - y.y
# adds file command
# adds select file=
# tunes select model=
