Author: bugman Date: Wed Sep 11 13:03:40 2013 New Revision: 20974 URL: http://svn.gna.org/viewcvs/relax?rev=20974&view=rev Log: Fixed bug, where kex to k_AB where not possible if the model does not contain parameter 'pA'. The conversion is now skipped. 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/parameters.py 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=20974&r1=20973&r2=20974&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:40 2013 @@ -717,7 +717,7 @@ 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. - if param_name == 'kex': + 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) k_AB = value * (1.0 - pA)