Author: tlinnet
Date: Tue May 6 17:22:40 2014
New Revision: 23005
URL: http://svn.gna.org/viewcvs/relax?rev=23005&view=rev
Log:
Pretty-up code. Re-ordered logic of r20 parameters, and exchange parameters
in function call.
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
trunk/target_functions/relax_disp.py
Modified: trunk/lib/dispersion/b14.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/b14.py?rev=23005&r1=23004&r2=23005&view=diff
==============================================================================
--- trunk/lib/dispersion/b14.py (original)
+++ trunk/lib/dispersion/b14.py Tue May 6 17:22:40 2014
@@ -102,7 +102,7 @@
from numpy import arccosh, cos, cosh, log, sin, sinh, sqrt, power
-def r2eff_B14(r20a=None, r20b=None, pA=None, pB=None, dw=None, kex=None,
k_AB=None, k_BA=None, deltaR2=None, alpha_m=None, ncyc=None,
inv_tcpmg=None, tcp=None, back_calc=None, num_points=None):
+def r2eff_B14(r20a=None, r20b=None, deltaR2=None, alpha_m=None, pA=None,
pB=None, dw=None, kex=None, k_AB=None, k_BA=None, ncyc=None,
inv_tcpmg=None, tcp=None, back_calc=None, num_points=None):
"""Calculate the R2eff values for the CR72 model.
See the module docstring for details.
@@ -112,6 +112,10 @@
@type r20a: float
@keyword r20b: The R20 parameter value of state B (R2 with no
exchange).
@type r20b: float
+ @keyword deltaR2: The difference r20a - r20b.
+ @type deltaR2: float
+ @keyword alpha_m: The Carver and Richards (1972) alpha_minus
short notation. alpha_m = deltaR2 + k_AB - k_BA = r20a - r20b + k_AB - k_BA.
+ @type alpha_m: float
@keyword pA: The population of state A.
@type pA: float
@keyword pB: The population of state B.
@@ -124,10 +128,6 @@
@type k_AB: float
@keyword k_BA: The rate of exchange from site B to A (rad/s).
@type k_BA: float
- @keyword deltaR2: The difference r20a - r20b.
- @type deltaR2: float
- @keyword alpha_m: The Carver and Richards (1972) alpha_minus
short notation. alpha_m = deltaR2 + k_AB - k_BA = r20a - r20b + k_AB - k_BA.
- @type alpha_m: float
@keyword ncyc: The matrix exponential power array. The number
of CPMG blocks.
@type ncyc: numpy int16, rank-1 array
@keyword inv_tcpmg: The inverse of the total duration of the CPMG
element (in inverse seconds).
Modified: trunk/target_functions/relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/target_functions/relax_disp.py?rev=23005&r1=23004&r2=23005&view=diff
==============================================================================
--- trunk/target_functions/relax_disp.py (original)
+++ trunk/target_functions/relax_disp.py Tue May 6 17:22:40 2014
@@ -819,7 +819,7 @@
aliased_dw = dw_frq
# Back calculate the R2eff values.
- r2eff_B14(r20a=r20a, r20b=r20b, pA=pA, pB=pB,
dw=dw_frq, kex=kex, k_AB=k_AB, k_BA=k_BA, deltaR2=deltaR2, alpha_m=alpha_m,
ncyc=self.power[ei][mi], inv_tcpmg=self.inv_relax_times[ei][mi],
tcp=self.tau_cpmg[ei][mi], back_calc=self.back_calc[ei][si][mi][0],
num_points=self.num_disp_points[ei][si][mi][0])
+ r2eff_B14(r20a=r20a, r20b=r20b, deltaR2=deltaR2,
alpha_m=alpha_m, pA=pA, pB=pB, dw=dw_frq, kex=kex, k_AB=k_AB, k_BA=k_BA,
ncyc=self.power[ei][mi], inv_tcpmg=self.inv_relax_times[ei][mi],
tcp=self.tau_cpmg[ei][mi], back_calc=self.back_calc[ei][si][mi][0],
num_points=self.num_disp_points[ei][si][mi][0])
# For all missing data points, set the back-calculated
value to the measured values so that it has no effect on the chi-squared
value.
for di in range(self.num_disp_points[ei][si][mi][0]):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits