**************************************

 EPR Simulation Program for Windows

 part of the PEST distribution

**************************************

General Information
-------------------
This program replaces both the SIMEPR.EXE and FTEPR.EXE programs for 
DOS based EPR simulation.  First generally distributed: 5/27/94.  They
are continuosly updated as needed.  The general functionality is:

	* Isotropic simulations with M(I) (nitroxide) linewidths
	* up to 16 nuclei sets / species
	* up to 10 species / simulation
	* LMB1 and Simplex optimizations
	* FFT filtering
	* FFT simulation and fitting
	* Project management (data,simulation,parameter,text files)
	* ASCII and Binary file formats
	* MS Windows GUI interface

Versions
--------
The code for the 0.95 versions (compiled with Borland C++ 4.0 ) has been frozen.
The new code generated with the Watcom C++ 10.5 compiler will only be compiled
for Win32 since Win95 is so common now.  The frozen programs will not be further
developed, for instance, they do not have the simplex code.  [ DRD 11-22-95 ]
The new naming convention is:

0.96	winsim.exe	current. For Win 3.11+Win32s, Win NT, Win 95 systems.

0.95	winsim16.exe	frozen.  For Windows 3.1 systems.
0.95	winsim32.exe	frozen.  For Win 3.11+Win32s, Win NT Win 95 systems

Documentation
-------------
The original documentation for the DOS programs is applicable to many aspects
of these programs.  Additional documentation is scarce !  New documents tend 
to be on the WWW at http://alfred.niehs.nih.gov/LMB.

-----------------
  H I S T O R Y
-----------------

4-4-96
------
* Changed database browser default location to reflect the
  new devo spin trap database.   This is my last change to
  the programs while working for the NIEHS.  I hope that my
  next job will allow me some freedeom to maintain these 
  programs.

3-5-96
------
* large reoganization of Windows code into more logical units
  see makefile.

3-4-96
------
* Fixed error.  Constraints are based on percentages and if
  the original value is zero then the contraint is zero and
  no optimization possible.  Fixed by stting minimum contraint
  size.
* Fixed error.  Simplex would not optimized g-shift that started
  at zero for same reason as above, perturbations were based on
  a percentage that was not optimizable.  Fixed by adding one
  in copying data to amoeba set and subracting one on copying
  data back.
* Fixed error with sim parameters not 'clearing' correctly.

2-26-96
-------
* Loads bruker files directly
* Preferences now stored for:
	http browser	
	help files URL
	M.R.database URL
	default data
	temp directory
* Launches http browser for
	help files, local or network
	MR.Database, network only
* correctly reports filenames on printouts
* fixes some memory bugs
* 32 bit version only.  16 bit version is archived. 
New names as found on elvis and PEST distribution
	winsim.exe		new 32bit version
	old\winsim16.exe	old 16bit version
	old\winsim32.exe	old 32bit version

2-10-96
-------
created PEST distribution including Winsim.exe
pest= Public Epr Software Tools
URL= http://alfred.niehs.nih.gov/LMB/pest

11-27-95
--------
* New winsim.exe launches new tune.exe (with both LMB1 and Simplex). 

* Added Simplex optimization code.  This is an alternative to Duling's LMB1
  algorithm useful to double-check results from LMB1 or when LMB1 does not 
  achieve a satisfactory answer.

* Added parameter limits to LMB1 optimization.  You can now limit how far
  the parameters diverge from the original values.   This may be very useful.  
  This option is off by default and can be changed in the dialog box that is 
  used to start an optimization.

* Converted to Watcom C++ 10.5 compiler.  Pentium optimized code runs up to 
  twice as fast as Borland 4.0 code.

* Working source code now kept on Hippo in \src\winsim.  See the makefile
  for additional information.

* Revised code in work.c/work.h to better manage optimization options.

5/2/95
------
* Fixed bug with reporting of relative areas of multiple species within
  a simulation.  If the species contained different numbers of spin I>1/2 
  then the relative areas may not be correct.

12/28/84
--------
* Compiled without debug code, executable size reduced.

11/28/94
--------
* Extracted code for LIM section to directory: \lab\lim.  Should be universal
  for all LMB programs.  The epr program sources are in \lab\ccode and \lab\winsim.
* Reduced number of data points (to 2048 in Winsim and 8192 in Winsim32) to
  lower system requirements.  If user needs more than 2048 on Win 3.1 he should
  install the Win32s libraries and use Winsim32.
  NOTE:  Debug code is still present so the size of the executables is somewhat
  inflated.

11/15/94
--------
* Bug fix: Nitroxide optimization flags botched, now fixed.
* Bug fix: filename handling was botched, now corrected.

11/7/94
-------
* Added open/save of ASCII text spectrum files.  String parameters are
  saved but not yet opened.

10/21/94
--------
* Added Residual calculation
* Added Correlation calculation

10/14/92
--------
* Reworked FFT-Combine section at request of Dr. Reszka.
* Reduced redundant options in manipulation controls.

10/7/94
-------
* Added automated filtering of exp. data.  Filter item now on menu.
* Added menu item 'Display' for convienence, much nicer now.
* Bug fix: Loading too large spectrum files caused GPF.
* Bug fix: Loading bad *.par files caused quick death.


10/5/94
-------
* After optimization, the species intensities are normalized to 100.

10/3/94
-------
* Printing now works for any size spectra.  Parameters are printed
  by starting a notepad session.
* Bug fix: simulations of non-default data points without an experiment
  spectrum loaded had problems.  Also will now alert user if number of
  data points is not a power of two.
* Bug fix: Menu choices for Forward and Inverse FFT failed sometimes.
* Bug fix: Display of null data created a GPF sometimes.

9/27/94
-------
* NOTE:  The default extensions for Winsim and Tune files have been 
  established as follows:
  (1)	.lmb	LMB binary format experimental spectrum
  (2)	.sim	LMB binary format simulated spectrum
  (3)	.exp	ASCII(text) experimental spectrum
  (4)	.dat	ASCII simulated spectrum
  (5)	.tun	ASCII TUNE input parameters
  (6)	.par	ASCII optimization result parameters
  (7)	.epr	ASCII simulation parameters printout
  (8)	.sdx	Binary Winsim simulation parameter storage

* Successfully reads the ASCII parameter result files generated by
  the Tune and Tunex programs.  This is accessed from the Tune
  dialog box.  You can also read the (binary) experimental, simulation,
  and ASCII result files using the Open_project function. 

* Reoganized the File Open/Close to include clipboard files,
  lmb binary files, and the project files.  The project files
  include both the sim. and exp. spectra, the full simulation
  parameters, and the ASCII parameter and print out files used
  with the command line tune programs.  The full simulation
  parameter files are now portable between 16bit and 32bit
  Windows.  Eliminated some bugs.

7/28/94
-------
* Fixed major bug with program's message loop which caused GPF
  errors when opening/closing some dialog boxes in the Win3.1
  version.  More robust now, I think.

7/15/94
-------
* Enabled turning on or off the optimization for EVERY parameter.
  Parameters can now be held constant.
* Reorganized data structures.  Should be more reliable and 
  the code should be simpler now.
* The new data structures imply that reading and writing simulation
  parameter files from disk is now incompatible with the previous
  files.  However, the new files should include the optimization 
  settings as well.

6/28/94
-------
* Resolved conflicts between simulation and display parameters. 
  The optimize results now transfer correctly no matter what the
  order of parameters.  Neat translation layer made.
* At end of optimize can now keep or dismiss the results.
* Reorganized spectral simulation parameters dialog box.
* Reorganized the title bars of the various dialogs for consistency.

6/20/94
-------
* fixed import/export problem with simulation spectra.  This was a major
  pain in the rear for users.
* Fixed parameter file problems.  The parameter storage file now includes 
  all the extra winsim data info and is NOT backward compatible with the 
  DOS SIMEPR parameter files.  This fixed alot of inconsistencies.  
  The new simulation parameter data filenames are:
	  program		  file
	---------------------------------------------------
	  winsim32		c:\lab\eprdata\winsim32.sdf
	  winsim		c:\lab\eprdata\winsim.sdf

6/7/94
------
* Added Simplex to tune spawn and enabled simplex setup dialog box; 
  now can control those options.
* Added cancel option to clear all parameters.
* Distributed to several more users.
* Winsim (not winsim32) does not report job time correctly.

6/6/94
------
* slow memory leak fixed: modeless dialog box not using DestroyWindow().
* import/export works even when drive letter changed.
  <<< it must use:  C:\LAB\EPRDATA >>>
* implemented LMB1 setup dialog box: can now control optimize options!!!

6/3/94
------
* fixed system resource problem with editing of "eprgraph.c"
* changed some menu item names for Dr. Hanna !
* distributed program to (some) users

new things to fix
-----------------
* still has a slow resource allocation problem, but the resources are 
  restored when the program ends.

5/31/94
-------
* reorganized dialogs for consistency
* grayed out inappropriate menu items
* added quit_optimization menu for aborting processes
  ( fixed known bug regarding terminated processes )
* added pop-up output window when optimze done (using notepad)

new things to fix
-----------------
* eats system resources...
* Disk letter for clipboard changes, should be static.  can use c: for now, 
  change to ini file setting later
* needs optimize setup and soon.

5/27/94
-------
Ready for first early beta-level distribution.  Performs these functions:
* Opens & saves files from the LMB EPR data file clipboard.
* Opens & saves files directly from the the filesystem, by filename.
* Opens & saves EPR simulation parameter file.  Only one file just now.
* Interactive display controls, pan and zoom, overlays.
* Fourier Transform manipulations, high and low frequency filtering.
* Multiple species simulation.  Up to 10 species each with up to 16 
  independent nuclei sets.  Each set can contain multiple equivilant
  nuclei, for instance 3 hydrogens at 3.3G each.  
* M(I) dependent linewidth calculations for a single nitrogen.
* LMB algorithm optimizations with default parameters.  Full graphical
  monitoring while still able to use your computer for other tasks.
* Automatic spawning of TUNE jobs for more efficient background 
  optimizations.  Both LMB1 and Simplex algorithms.


----------------------------------------------------------------------------


Really cool unfinished items
----------------------------
* multithreaded optimizations.
* rpc connections to remote computational servers.
* true calculation of nitroxide M(I) linewidths.
* Marquadt-Levenberg optimization.
* Simulated Annealing optimization.

Large unfinished items
----------------------
* create interface for powfit program and link in that FORTRAN calculation
  code to create one executable binary.
* separate out calculation/optimization code to DLL.
* multiple document interface to load lots of files.

finished additions to original program
--------------------------------------
* Printing.  Not difficult, framework in place ( done ! )
* Disable ( gray out ) inappropriate menu items ( partially done ... )
* Can't stop an in-progress optimization correctly ( fixed ! )
* Reading of TUNE parameter files.  Needs additional code to TUNE program. (done !)
* Saving of data and parameters concurrently for total recall. ( done ! )
* Graphical simplex optimization ( done ! see 11-22-95 )

  ( next one fixed by eliminating 16 bit version )
* Winsim and Winsim32 cannot share a simulation parameter file.

initial known bugs
------------------
* Tune file output will not create filenames containing a tilde (~).
* Pressing "Clear" and then "Simulate" in the spectral parameters dialog
  box will not yield a flat line but rather some ugly time domain trash.
  Simply turning ON any of the species, even with null parameters will
  create the expected flat line. 
* Stopping a running Tune may leave an invisible process running. ( seems to be fixed )
