This readme.txt file contains 4 sections: I) Information about the included .ORG files with density and viscosity data and fits for >90 compounds. II) How to install the Origin template files for use in doing your own fits to the functions used in SEDNTERP. III) Instructions for fitting using those templates. IV) Notes and hints about fitting. If you have questions about using these files or problems with their installation please contact John Philo (jphilo@amgen.com). ----------------- I. Included in this distribution are over 90 Microcal Origin .ORG files containing density and viscosity data tables and graphs for various salts and buffers. The data come from the CRC Handbook of Chemistry and Physics for all but guanidine HCl (from Kawahara and Tanford, 1966) and trifluoroethanol (from Geoff Howlett's lab). Each .ORG file contains graphs of the experimental data, and tables and graphs of the residuals from fits to the interpolation functions used in SEDNTERP. These files are being distributed in order to assist the AU community to re-fit these data over different concentration ranges for improved interpolation accuracy in SEDNTERP, and/or to have access to the experimental data for alternative interpolation procedures. Please note that the coefficients supplied with SEDNTERP do not necessarily represent fits to the full range of concentration for which data are available. In some cases attempts to fit the entire range resulted in poor quality fits, so the upper end of the concentration range was truncated until good accuracy could be obtained ("good" generally means residuals of less than 0.001 gm/ml for density and less than 0.005 cp (0.5%) for the viscosity. In addition, the included templates will allow SEDNTERP users to fit their own density or viscosity data and add them to the database in SEDNTERP (and hopefully to share those results with others). The data tables were entered, and the initial fitting was done by Ian MacGregor, an undergraduate student in Tom Laue's lab, who deserves all many thanks for a major, tedious task. About half of these fits were later re-done by John Philo using revised, more automated fitting templates (which are those included with this distribution). ----------------- II. How to install the Microcal Origin template files for use in fitting density or viscosity data to be used with SEDNTERP: 1) Copy the template files density.otw, density.otp, denresid.otp denresid.otw, viscosty.otp, and visresid.otw to the main Origin directory (usually c:\origin). 2) If you are using Origin 3.x (for Origin 4.0 or above jump to #4 below) then copy the fitting function files sdntrpdn.f and sdntrpvi.f to the "Fitfunc" subdirectory under the Origin directory. This will make the functions accessible to Origin, however they will not appear in the list of available functions that can be manually selected. 3) Optionally, if you want to be able to select these functions like other Origin functions, you will need to edit the Origin.ini file (in the Origin directory) using Notepad, as follows: find the section headed [FitFunc]. Below it will be an entry like "list1=" followed by a long list of function names. If this is a computer containing the Beckman software, this list will start with "-MULTI- self", otherwise it will probably start with "ExpDecay ExpGrow". At the end of this line add " sdntrpdn sdntrpvi", save the file, and you are done. 4) If you are using Origin 4.0 or above then copy the fitting function files user1.fdf and user2.fdf to the "Fitfunc" subdirectory under the Origin directory. To make these functions accessible you will then need to use NotePad to edit the file NLSF.INI found in the Origin program directory. Find the entry [Category] and at the bottom of the list of function groups (usually just before the [Origin Basic Functions] heading) add the line "User Functions=FitFunc". Next enter a new line with the section heading "[User Functions]". Below that add a line "sdntrpdn=user1", and then a line "sdntrpvi=user2". Then save the nlsf.ini file. The result of all this will be to add a new category of fitting functions called "User Functions" to Origin's list of functions, with entries for the density and viscosity function. (If you happen to already have files called user1 and user2 on your system, just rename the ones supplied here with different numbers and modify the "sdntrpdn=user1" line mentioned above to correspond.) ------------------ III. How to fit density and viscosity data the template files: 1) Open the worksheet template "density.otw" using the "File..Template..Open Worksheet Template" menu sequence. Then use the "Begin" button on the worksheet to enter a name for the solute (up to 8 characters). This name is used in labeling and creating the graphs and worksheets that will be created later. The "Begin" button also fills in the first row of the worksheet with a data point at zero solute concentration (density and relative viscosity of pure water). Note that the "Begin" button may be used again if you want to change the name, but if you have already completed any of the steps below you will have to delete those graphs and worksheets and fit again. 2) Add your data to the worksheet by either manually typing in the values or copying and pasting from another program. Please note that the formulas in SEDNTERP use absolute density in gm/ml, not specific gravity or density in gm/cm^3. In contrast, the viscosity formula uses relative viscosity (i.e. the dimensionless ratio of the solution viscosity to that of pure water). The SEDNTERP formulas are for fitting data at 20 degrees. If your experimental data are at some other temperature, T, you should first multiply your experimental values by the ratio (density of water at 20)/(density of water at T) or (viscosity of water at 20)/(viscosity of water at T). 3) Once the data are entered, use the "Fit Density" or "Fit Viscosity" buttons to begin the appropriate fit. This will graph the data, select the appropriate fitting function, and begin a non-linear least squares fitting session. Proceed to complete the fit. (The use and operation of the Origin fitting procedures should be familiar to users of the Beckman XL-A/I analysis software.) When the fit is complete, you will probably want to place the values of the coefficients into the graph legend, which will occur automatically for Origin 4.0 or above, but must be done manually using the "Paste to Graph" button before ending the fitting session in Origin versions prior to 4.0. 4) Once the fit is completed you may use the "Residual Plot and Table" button on the data graph. This will generate a residual plot, and a worksheet listing the experimental data, the corresponding fitted value, the residual, the absolute value of the largest residual, and a listing of the fitted coefficients. Note that Origin does not retain the values of the fitting parameters associated with each function. Thus if you use the "Residual Plot and Table" button on the density graph, but the last data fitted were viscosity data, then Origin will use the wrong function and parameters, and the residual plot and tables will be nonsense. 5) If you see that the fit is poor (large and systematic residuals), you may want to reduce the concentration range included in the fit. In Origin 3.x you may do this by simply using the "Data Selector" tool on the ToolBox to move the endpoints of the data range on the graph while you are in the fitting session. In Origin 4.0 and above, after using the Data Selector you must use the Action..Dataset menu entry on the NonLinear Curve Fitting dialog box, select the y variable, and use the "Assign" button to update the range, then select the x variable, and again use the Assign button, and then use Action..Fit to return to fitting. 6) If you are re-fitting data for compounds already included in SEDNTERP, for those .ORG files done by Ian MacGregor (the ones without any buttons on the worksheets or graphs) you will need to copy the data from Ian's worksheet into the new density.otw worksheet template. To do this, after step 1 above go to the old data worksheet and highlight all the entries in the first 3 columns (the experimental data), and use Edit..Copy. Then go to the new data worksheet, go to the SECOND row (below the zero concentration entry) and use Edit..Paste to paste in the data. (Note that Ian had forgotten to include the zero concentration data point in the fits that he did, which is way you need to paste into the second row.) ------------------- IV. Hints on fitting: 1) In many cases the fitting functions may contain more terms than are appropriate for a given set of data, especially if the concentration range if fairly limited. While fitting, you should pay attention to the size of the estimated errors in the parameters. If you see that the error is larger than the actual best fit value for that parameter, you should set the parameter to zero, hold it fixed at zero during the fitting, and re-fit. This will usually result in a lower value of chi-squared. When the highest concentration is below 1M it is quite likely that the last one or two terms in the functions may not be needed. It is also fairly common that the "b" term can be set to zero. 2) You are also likely to see situations where the error in one of the terms is large, but somewhat smaller than the actual best value for the parameter. In this situation it may also be appropriate to set that parameter to zero, even if that results in a slightly higher chi-squared value, although this becomes a judgement call. When the parameter in question is the "b" parameter, you should pay attention to the shape of the fitted curve near zero concentration. Sometimes the "best" fit in the least-squares sense produces large changes in curvature near c=0 in trying to exactly fit the low concentration data points. Since we expect the density and viscosity to be fairly smooth functions of concentration, when you see such effects this is generally a sign that the function is "over-fitting" the data and introducing unusual changes in curvature in order to force the function to go exactly through the data points (i.e. it is introducing the extra curvature in order to fit the noise in the data). Thus in these situations it is also probably appropriate to reduce the number of terms being fitted, even though this may increase the chi-squared slightly. You should be particularly wary of "over-fitting" when the number of experimental data points is only 2-3 times larger than the number of parameters being fitted. 3) Ultimately, however, all one is trying to do is get a reasonable smooth curve that represents the experimental data, and the coefficients of the fitting functions have no particular physical meaning, so there are no clear-cut "right" or "wrong" fits and you must simply rely on your good scientific judgement.