mailr20975 - in /branches/relax_disp/specific_analyses/relax_disp: api.py parameters.py


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

Header


Content

Posted by edward on September 11, 2013 - 13:03:
Author: bugman
Date: Wed Sep 11 13:03:41 2013
New Revision: 20975

URL: http://svn.gna.org/viewcvs/relax?rev=20975&view=rev
Log:
Added the conversion to k_BA from kex and pA.

Progress sr #3071: https://gna.org/support/index.php?3071 - Implementation of 
Tollinger/Kay dispersion model (2001)
Following the guide at: 
http://wiki.nmr-relax.com/Tutorial_for_adding_relaxation_dispersion_models_to_relax

Troels E. Linnet provided this patch. Commit by: tlinnet _aaattt_ 
gmail_dot_com

Signed-off-by: Edward d'Auvergne <edward@xxxxxxxxxxxxx>

Modified:
    branches/relax_disp/specific_analyses/relax_disp/api.py
    branches/relax_disp/specific_analyses/relax_disp/parameters.py

Modified: branches/relax_disp/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/api.py?rev=20975&r1=20974&r2=20975&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/api.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/api.py Wed Sep 11 
13:03:41 2013
@@ -97,6 +97,7 @@
         self.PARAMS.add('kC', scope='spin', default=10000.0, 
desc='Approximate chemical exchange rate constant between sites A and C 
(rad.s^-1)', set='params', py_type=float, grace_string='\\qk\\sC\\N\\Q 
(rad.s\\S-1\\N)', err=True, sim=True)
         self.PARAMS.add('tex', scope='spin', default=1.0/20000.0, desc='The 
time of exchange (tex = 1/(2kex))', set='params', py_type=float, 
grace_string='\\q\\xt\\B\\sex\\N\\Q (s.rad\\S-1\\N)', err=True, sim=True)
         self.PARAMS.add('k_AB', scope='spin', default=10000.0, desc='The 
exchange rate from state A to state B', set='params', py_type=float, 
grace_string='\\qk\\sAB\\N\\Q (rad.s\\S-1\\N)', err=True, sim=True)
+        self.PARAMS.add('k_BA', scope='spin', default=10000.0, desc='The 
exchange rate from state B to state A', set='params', py_type=float, 
grace_string='\\qk\\sBA\\N\\Q (rad.s\\S-1\\N)', err=True, sim=True)
         self.PARAMS.add('params', scope='spin', desc='The model parameters', 
py_type=list)
 
         # Add the minimisation data.
@@ -1383,6 +1384,7 @@
     _table.add_row(["Chemical shift difference between states A and B 
(ppm)", "'dw'"])
     _table.add_row(["Exchange rate (rad/s)", "'kex'"])
     _table.add_row(["Exchange rate from state A to state B (rad/s)", 
"'k_AB'"])
+    _table.add_row(["Exchange rate from state B to state A (rad/s)", 
"'k_BA'"])
     _table.add_row(["Time of exchange (s/rad)", "'tex'"])
     _table.add_row(["Peak intensities (series)", "'intensities'"])
     _table.add_row(["CPMG pulse train frequency (series, Hz)", 
"'cpmg_frqs'"])
@@ -1517,8 +1519,9 @@
         pairs['pA'] = 'pB'
         pairs['pB'] = 'pA'
 
-        # Add the names of kex-k_AB pair.
+        # Add the names of kex-k_AB pair and kex-k_BA pair.
         pairs['k_AB'] = 'kex'
+        pairs['k_BA'] = 'kex'
 
         # Get the minimisation statistic object names.
         min_names = self.data_names(set='min')

Modified: branches/relax_disp/specific_analyses/relax_disp/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/parameters.py?rev=20975&r1=20974&r2=20975&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp/parameters.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp/parameters.py Wed Sep 11 
13:03:41 2013
@@ -716,12 +716,16 @@
             tex = 1.0 / (2.0 * value)
             set_value(value=tex, key=key, spins=spins, sim_index=sim_index, 
param_name='tex', spin_index=spin_index, frq_index=frq_index)
 
-        # The kex to k_AB conversion.
+        # The kex to k_AB and k_BA conversion.
         if param_name == 'kex' and 'pA' in spins[0].params:
             # Get pA value.
             pA = get_value(key=key, spins=spins, sim_index=sim_index, 
param_name='pA', spin_index=spin_index, frq_index=frq_index)
+            # Calculate k_AB value and set it.
             k_AB = value * (1.0 - pA)
             set_value(value=k_AB, key=key, spins=spins, sim_index=sim_index, 
param_name='k_AB', spin_index=spin_index, frq_index=frq_index)
+            # Calculate k_BA value and set it.
+            k_BA = value * pA
+            set_value(value=k_BA, key=key, spins=spins, sim_index=sim_index, 
param_name='k_BA', spin_index=spin_index, frq_index=frq_index)
 
         # The tex to kex conversion.
         if param_name == 'tex':




Related Messages


Powered by MHonArc, Updated Wed Sep 11 13:20:01 2013