mailr24085 - /branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py


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

Header


Content

Posted by edward on June 18, 2014 - 14:09:
Author: bugman
Date: Wed Jun 18 14:09:48 2014
New Revision: 24085

URL: http://svn.gna.org/viewcvs/relax?rev=24085&view=rev
Log:
Added a profiling script for the 'NS CPMG 2-site expanded' dispersion model.

This is the model at http://wiki.nmr-relax.com/NS_CPMG_2-site_expanded.  The 
script was copied from
that of the CR72 model, and it only needed to be changed in a few places.  
This is the first numeric
model profiling script.


Added:
    
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py
      - copied, changed from r24084, 
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72.py

Copied: 
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py
 (from r24084, 
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py?p2=branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py&p1=branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72.py&r1=24084&r2=24085&rev=24085&view=diff
==============================================================================
--- 
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72.py
      (original)
+++ 
branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_cpmg_2site_expanded.py
    Wed Jun 18 14:09:48 2014
@@ -55,7 +55,7 @@
 from lib.physical_constants import g1H, g15N
 from target_functions.chi2 import chi2
 from target_functions.relax_disp import Dispersion
-from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG_SQ, 
MODEL_B14_FULL, MODEL_CR72, MODEL_CR72_FULL, MODEL_NS_CPMG_2SITE_3D_FULL, 
MODEL_NS_CPMG_2SITE_STAR_FULL
+from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG_SQ, 
MODEL_B14_FULL, MODEL_NS_CPMG_2SITE_EXPANDED, MODEL_NS_CPMG_2SITE_3D_FULL, 
MODEL_NS_CPMG_2SITE_STAR_FULL
 
 
 # Alter setup.
@@ -189,7 +189,7 @@
         end_index = []
         # The spin and frequency dependent R2 parameters.
         end_index.append(len(self.exp_type) * self.num_spins * 
len(self.fields))
-        if self.model in [MODEL_B14_FULL, MODEL_CR72_FULL, 
MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_STAR_FULL]:
+        if self.model in [MODEL_B14_FULL, MODEL_NS_CPMG_2SITE_EXPANDED, 
MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_STAR_FULL]:
             end_index.append(2 * len(self.exp_type) * self.num_spins * 
len(self.fields))
         # The spin and dependent parameters (phi_ex, dw, padw2).
         end_index.append(end_index[-1] + self.num_spins)
@@ -424,11 +424,11 @@
         """
 
         # Return chi2 value.
-        chi2 = self.model.func_CR72_full(params)
+        chi2 = self.model.func_ns_cpmg_2site_expanded(params)
         return chi2
 
 
-def single(num_spins=1, model=MODEL_CR72_FULL, iter=None):
+def single(num_spins=1, model=MODEL_NS_CPMG_2SITE_EXPANDED, iter=None):
     """Calculate for a single spin.
 
     @keyword num_spins:     Number of spins in the cluster.
@@ -450,7 +450,7 @@
     print("chi2 single:", chi2)
 
 
-def cluster(num_spins=100, model=MODEL_CR72_FULL, iter=None):
+def cluster(num_spins=100, model=MODEL_NS_CPMG_2SITE_EXPANDED, iter=None):
     """Calculate for a number of clustered spins.
 
     @keyword num_spins:     Number of spins in the cluster.
@@ -477,7 +477,7 @@
     main()
 
 def test_reshape():
-    C1 = Profile(num_spins=1, model=MODEL_CR72_FULL, r2a=5.0, r2b=10.0, 
dw=3.0, pA=0.9, kex=1000.0, spins_params=['r2a', 'r2b', 'dw', 'pA', 'kex'])
+    C1 = Profile(num_spins=1, model=MODEL_NS_CPMG_2SITE_EXPANDED, r2a=5.0, 
r2b=10.0, dw=3.0, pA=0.9, kex=1000.0, spins_params=['r2a', 'r2b', 'dw', 'pA', 
'kex'])
     end_index = C1.model.end_index
     #print("end_index:", end_index)
     num_spins = C1.model.num_spins




Related Messages


Powered by MHonArc, Updated Wed Jun 18 15:00:03 2014