Author: tlinnet Date: Tue May 6 17:23:51 2014 New Revision: 23008 URL: http://svn.gna.org/viewcvs/relax?rev=23008&view=rev Log: Speed-up. Made "1" and "2" integers to float, to prevent python conversion. sr #3154: (https://gna.org/support/?3154) Implementation of Baldwin (2014) B14 model - 2-site exact solution model for all time scales. This follows the tutorial for adding relaxation dispersion models at: http://wiki.nmr-relax.com/Tutorial_for_adding_relaxation_dispersion_models_to_relax#Debugging Modified: trunk/lib/dispersion/b14.py Modified: trunk/lib/dispersion/b14.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/b14.py?rev=23008&r1=23007&r2=23008&view=diff ============================================================================== --- trunk/lib/dispersion/b14.py (original) +++ trunk/lib/dispersion/b14.py Tue May 6 17:23:51 2014 @@ -175,7 +175,7 @@ t2 = (dw + g4) * complex(dw, -g3) / NNc # t1 + t2. - t1pt2 = complex(2 * dw2, zeta) / NNc + t1pt2 = complex(2. * dw2, zeta) / NNc # -2 * oG * t2. oGt2 = complex(-alpha_m - g3, dw - g4) * t2 @@ -203,14 +203,14 @@ ex1c = sinh(E1) # Exact result for v2v3. - v3 = sqrt(ex0b**2 - 1) + v3 = sqrt(ex0b**2 - 1.) y = power( (ex0b - v3) / (ex0b + v3), ncyc) # Off diagonal common factor. sinh fuctions. - v2pPdN = complex(-deltaR2 + kex, dw) * ex0c + (-oGt2 - k_AB * t1pt2) * 2 * ex1c - - Tog = (1 + y) / 2 + (1 - y) / (2 * v3) * v2pPdN / N + v2pPdN = complex(-deltaR2 + kex, dw) * ex0c + (-oGt2 - k_AB * t1pt2) * 2. * ex1c + + Tog = (1. + y) / 2. + (1. - y) / (2. * v3) * v2pPdN / N # Estimate R2eff. relax_time = Trel = 1/inv_tcpmg. Minty = Rpre - ncyc * inv_tcpmg * arccosh(ex0b.real) - inv_tcpmg * log(Tog.real)