Author: bugman Date: Wed Mar 27 14:41:32 2013 New Revision: 19220 URL: http://svn.gna.org/viewcvs/relax?rev=19220&view=rev Log: Ported r8428 from the old relax_disp branch into the new branch. The command used was: svn merge -r8427:8428 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp/specific_fns/@r18123 specific_analyses ..... r8428 | semor | 2009-01-13 04:13:54 +0100 (Tue, 13 Jan 2009) | 3 lines Changed paths: M /branches/relax_disp/specific_fns/relax_disp.py Converted the function linear_constraints() for relaxation dispersion needs. ..... Modified: branches/relax_disp/specific_analyses/relax_disp.py Modified: branches/relax_disp/specific_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19220&r1=19219&r2=19220&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp.py (original) +++ branches/relax_disp/specific_analyses/relax_disp.py Wed Mar 27 14:41:32 2013 @@ -725,27 +725,34 @@ Standard notation ================= - The relaxation rate constraints are:: - - Rx >= 0 - - The intensity constraints are:: - - I0 >= 0 - Iinf >= 0 + The different constraints are:: + + R2 >= 0 + Rex >= 0 + kex >= 0 + + R2A >= 0 + kA >= 0 + dw >= 0 Matrix notation =============== - In the notation A.x >= b, where A is an matrix of coefficients, x is an array of parameter + In the notation A.x >= b, where A is a matrix of coefficients, x is an array of parameter values, and b is a vector of scalars, these inequality constraints are:: - | 1 0 0 | | Rx | | 0 | + | 1 0 0 | | R2 | | 0 | | | | | | | - | 1 0 0 | . | I0 | >= | 0 | + | 1 0 0 | . | Rex | | 0 | | | | | | | - | 1 0 0 | | Iinf | | 0 | + | 1 0 0 | | kex | | 0 | + | | | | >= | | + | 1 0 0 | | R2A | | 0 | + | | | | | | + | 1 0 0 | | kA | | 0 | + | | | | | | + | 1 0 0 | | dw | | 0 | @keyword spin: The spin data container. @@ -764,17 +771,25 @@ # Loop over the parameters. for k in xrange(len(spin.params)): - # Relaxation rate. - if spin.params[k] == 'Rx': - # Rx >= 0. + # Relaxation rates and Rex. + if search('^R', spin.params[k]): + # R2, Rex, R2A >= 0. A.append(zero_array * 0.0) A[j][i] = 1.0 b.append(0.0) j = j + 1 - # Intensity parameter. - elif search('^I', spin.params[k]): - # I0, Iinf >= 0. + # Exchange rates. + elif search('^k', spin.params[k]): + # kex, kA >= 0. + A.append(zero_array * 0.0) + A[j][i] = 1.0 + b.append(0.0) + j = j + 1 + + # Chemical exchange difference. + elif spin.params[k] == 'dw': + # dw >= 0. A.append(zero_array * 0.0) A[j][i] = 1.0 b.append(0.0)