mailr23009 - /trunk/lib/dispersion/b14.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on May 06, 2014 - 17:24:
Author: tlinnet
Date: Tue May  6 17:24:13 2014
New Revision: 23009

URL: http://svn.gna.org/viewcvs/relax?rev=23009&view=rev
Log:
Speed-up. Repetitive calculations of 2.0 * tcp.

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=23009&r1=23008&r2=23009&view=diff
==============================================================================
--- trunk/lib/dispersion/b14.py (original)
+++ trunk/lib/dispersion/b14.py Tue May  6 17:24:13 2014
@@ -148,6 +148,7 @@
     dw2 = dw**2
     zeta2 = zeta**2
     Psi2 = Psi**2
+    two_tcp = 2.0 * tcp
 
     # Get the real and imaginary components of the exchange induced shift.
     g3 = 1/sqrt(2) * sqrt(Psi + sqrt(zeta2 + Psi2))
@@ -185,10 +186,10 @@
 
     # Derived from relaxation.
     # E0 = -2.0 * tcp * (f00R - f11R).
-    E0 =  2.0 * tcp * g3
+    E0 =  two_tcp * g3
 
     # Derived from chemical shifts  #E2 = complex(0,-2.0 * tcp * (f00I - 
f11I)).
-    E2 =  2.0 * tcp * g4
+    E2 =  two_tcp * g4
 
     # Mixed term (complex) (E0 - iE2)/2.
     E1 = complex(g3, -g4) * tcp




Related Messages


Powered by MHonArc, Updated Tue May 06 17:40:02 2014