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 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) [zoom factor]
# and
# moveTo timeSec {x y z w} 0 transX transY (atom expression) [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)
# propertyMatchField = 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=
