% Returns the fraction of dsDNA in a solution containing equal concentrations % of two complementary DNA oligos as a functino of total DNA concentration, % temperature, entropy change, and enthalpy change. % Gas constant is an optional parameter. % % USAGE: f = DnaFraction(Ct, T, DeltaS, DeltaH, ) % RETURN VALUE: fraction of dsDNA % % Default units are molar, Kelvin, cal/mole, and cal/(mole-Kelvin). For % other unit systems, supply the appropriate value of R in the optional % fifth parameter. The default value is 1.987 cal/(degree K * mole). function f = DnaFraction(Ct, T, DeltaS, DeltaH, GasConstant) % Gas constant if(nargin < 5) % determine if caller supplied R value or not R = 1.987; % set to default: cal/(degree K * mole) else R = GasConstant; % otherwise use caller's value end % Compute Ct * Keq CtKeq = Ct * exp(DeltaS / R - DeltaH ./ (R * T)); %now compute f f = (1 + CtKeq - sqrt(1 + 2 * CtKeq)) ./ CtKeq; % Written 4/9/2008 by SCW