Fitting Protein Thermal Unfolding Measurements to a Two-State Transition

DESCRIPTION

	This notebook will fit temperature (x)-induced changes in ellipticity, fluorescence, absorption, or other optical parameters (y) to a two-state transition, yielding the differences between the folded and unfolded enthalpy (DHm) and entropy (DSm) at the transition mid-point (Tm), the slopes of the curve before (mN) and after (mU) the transition, and the zero temperature optical values for the fully folded (thetaN) and unfolded (thetaU) forms of the protein.  
	
	y = (thetaN+mN*x)+(Exp-[(DHm+x*DSm)/(R*x)]))*(thetaU+mU*x)
	                             1+ Exp(-[(DHm+x*DSm)/(R*x)])
	                             
	Strictly, the enthalpy and entropy terms are only meaningful if the unfolding transition is reversible and the measurements are made under conditions of equilibrium.
	
	 The notebook will also generate graphs of the data and the fitted curve,  statistical information on the goodness of the fit, and a measure of the cooperativity of the transition (DT). A table of points is produced to permit export of the theoretical curve.															                                        			        		
    			   					                                        			        		INSTRUCTIONS

	Hit the down arrow to move from cell to cell and press "enter" (not "return") to execute each calculation. Follow the example below to see the fitting results for one set of data.
	
	If you wish to read in data from a Jasco file, use the notebook titled "ThermaUnfold-file2.nb". The present notebook will allow the user to enter their own data manually in the form of {Temperature,Optical Measure} pairs.  Alternatively, press enter on the line "shortlist1" and follow the fitting of those data.

Clear[thetaN,thetaU,mN,mU,deltaH,deltaS,DT,modelY5,lp1,NLR,param, x]

Users: Manual entry begins here or use the dataset below:

shortlist1:={{293.15`,-12.7642`},{294.15`,-12.853`},{295.15`,-12.7532`},{296.15`,-12.7743`},{297.15`,-12.7131`},{298.15`,-12.7888`},{299.15`,-12.8807`},{300.15`,-12.9322`},{301.15`,-12.9184`},{302.15`,-12.9873`},{303.15`,-12.9214`},{304.15`,-12.9189`},{305.15`,-12.715`},{306.15`,-12.862`},{307.15`,-12.7228`},{308.15`,-12.7472`},{309.15`,-12.6505`},{310.15`,-12.6763`},{311.15`,-12.5543`},{312.15`,-12.5191`},{313.15`,-12.5483`},{314.15`,-12.3533`},{315.15`,-12.3353`},{316.15`,-12.3766`},{317.15`,-12.3747`},{318.15`,-12.206`},{319.15`,-12.3754`},{320.15`,-12.242`},{321.15`,-12.2124`},{322.15`,-12.2828`},{323.15`,-12.1709`},{324.15`,-12.1209`},{325.15`,-12.0302`},{326.15`,-12.0614`},{327.15`,-12.0349`},{328.15`,-11.9981`},{329.15`,-11.7757`},{330.15`,-11.8427`},{331.15`,-11.7418`},{332.15`,-11.8056`},{333.15`,-11.6951`},{334.15`,-11.3285`},{335.15`,-11.3452`},{336.15`,-11.0479`},{337.15`,-11.1725`},{338.15`,-10.9913`},{339.15`,-10.0368`},{340.15`,-9.89034`},{341.15`,-9.83311`},{342.15`,-9.74026`},{343.15`,-9.4443`},{344.15`,-7.33044`},{345.15`,-7.15325`},{346.15`,-7.14198`},{347.15`,-6.96341`},{348.15`,-6.75813`},{349.15`,-5.86816`},{350.15`,-5.98133`},{351.15`,-5.91295`},{352.15`,-5.89296`},{353.15`,-5.84917`},{354.15`,-5.4923`},{355.15`,-5.40011`},{356.15`,-5.52189`},{357.15`,-5.46896`},{358.15`,-5.34668`},{359.15`,-5.10073`},{360.15`,-5.07273`},{361.15`,-5.12602`},{362.15`,-5.09514`},{363.15`,-5.14585`},{364.15`,-4.83886`},{365.15`,-4.76693`},{366.15`,-4.85237`},{367.15`,-4.73217`},{368.15`,-4.71617`}}

lp1=ListPlot[shortlist1,PlotStyle->{PointSize[0.015`]},FrameStyle->{Thickness[0.01`]},PlotRange->{{290,380},{-14,-3}},Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

<<"NonlinearRegression`"

R=8.315

modelY5:=((thetaN+((mN)*(x)))+((Exp[((-deltaH)/(R*x))+(deltaS/R)])*(thetaU+((mU)*(x)))))/((1)+(Exp[((-deltaH)/(R*x))+(deltaS/R)]))

modelY5

NLR=NonlinearRegress[shortlist1,modelY5, {{deltaH,372430},{deltaS,1089},{thetaN,-23.5},{thetaU,-27.4},{mN,0.035},{mU,0.062}}, {x},MaxIterations->10000,ShowProgress ->False ]

param=BestFitParameters/.NLR

deltaH=deltaH/.param
deltaS=deltaS/.param
mN=mN/.param 
mU=mU/.param 
thetaN=thetaN/.param
thetaU=thetaU/.param

Plot[modelY5,{x,280,380},PlotStyle->{Thickness[0.01`]},FrameStyle->{Thickness[0.01`]},PlotRange->{{290,380},{-14,-3}},Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

Show[%,lp1]

The next line calculates the transition mid-point in degrees Kelvin:

Tm=deltaH/deltaS

Next we calculate the Temperature range for 80% of the transition.  This corresponds to Keq = 0.25 to 4.0, and is a measure of the cooperativity of the transition.

K:=Exp[((-deltaH)/(R*x))+(deltaS/R)]

K

Solve[K==0.25,x]

x/.%

Solve[K==4.0,x]

x/.%

%-%%%

DT=%

The next line calculates points from the theoretical curve in case you want to graph the curve in another application:

theor=Table[{x,modelY5},{x,280,380,0.25}]

The next line exports a file containing the theoretical points just calculated.

Export["DMpH7fit.txt",theor,"Table"]

Just to confirm, here are graphs of the theoretical points and the data.

ListPlot[theor,PlotStyle->{PointSize[0.01`]},FrameStyle->{Thickness[0.01`]},PlotRange->{{290,380},{-14,-3}},Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

Show[%,lp1]

Clear[thetaN,thetaU,mN,mU,deltaH,deltaS,DT,modelY5,lp1,NLR, param,x]

END