Do you have maxima installed?  It will work much better than sympy and
the equations will be better simplified and faster, as well as being
orders of magnitude faster than numerical partial derivatives.

Regards,

Edward


On 2 September 2014 18:46, Troels Emtekær Linnet <[email protected]> wrote:
> Anyway.
>
> I add my notes and leave it,
>
> jacobian([R20 + acosh(cosh(x) + cos(x))], [R20, x]);
>
> -------------
>            1 /        Psi + 2delta_omega^2 \
>     D+/- = - | +/-1 + -------------------- | ,
>            2 \        sqrt(Psi^2 + zeta^2) /
>
>                            1
>     eta+/- = 2^(-3/2) . -------- sqrt(+/-Psi + sqrt(Psi^2 + zeta^2)) ,
>                         nu_cpmg
>
>     Psi = (R2A0 - R2B0 - pA.kex + pB.kex)^2 - delta_omega^2 + 4pA.pB.kex^2 ,
>
>     zeta = 2delta_omega (R2A0 - R2B0 - pA.kex + pB.kex).
> --------------
>
> eta_scale = 2.0**(-3.0/2.0)
> pB = 1.0 - pA
> dw2 = dw**2
> r20_kex = (r20a + r20b + kex) / 2.0
> k_BA = pA * kex
> k_AB = pB * kex
> fact = r20a - r20b - k_BA + k_AB
> Psi = fact**2 - dw2 + 4.0*k_BA*k_AB
> zeta = 2.0*dw * fact
> sqrt_psi2_zeta2 = sqrt(Psi**2 + zeta**2)
> D_part = (0.5*Psi + dw2) / sqrt_psi2_zeta2
> Dpos = 0.5 + D_part
> Dneg = -0.5 + D_part
> eta_fact = eta_scale / cpmg_frqs
> etapos = eta_fact * sqrt(Psi + sqrt_psi2_zeta2)
> etaneg = eta_fact * sqrt(-Psi + sqrt_psi2_zeta2)
> fact = Dpos * cosh(etapos) - Dneg * cos(etaneg)
> back_calc = cpmg_frqs * acosh(fact)
> back_calc = r20_kex - back_calc
>
> 2014-09-02 18:44 GMT+02:00 Troels Emtekær Linnet <[email protected]>:
>> Can you build up an equation, by just copy the lines of code from the lib 
>> file?
>>
>> 2014-09-02 18:42 GMT+02:00 Edward d'Auvergne <[email protected]>:
>>> For Maxima, try things like:
>>>
>>> jacob : jacobian([R20 + acosh(cosh(x) + cos(x))], [R20, x]);
>>>
>>> It's not too hard.  Then you can try the simplification functions randomly:
>>>
>>> http://maxima.sourceforge.net/docs/manual/en/maxima_9.html
>>>
>>> For example:
>>>
>>> trigsimp(jacob)
>>>
>>> Regards,
>>>
>>> Edward
>>>
>>>
>>>
>>> On 2 September 2014 18:33, Edward d'Auvergne <[email protected]> wrote:
>>>> Do you mean a maxima example?  Try:
>>>>
>>>> http://maxima.sourceforge.net/docs/manual/en/maxima_63.html#Item_003a-jacobian
>>>> http://maxima.sourceforge.net/docs/manual/en/maxima_18.html#Item_003a-gradef
>>>> http://maxima.sourceforge.net/docs/manual/en/maxima_18.html#Item_003a-diff
>>>>
>>>> You just have to put all of the CR72 equation into a single expression.
>>>>
>>>> Regards,
>>>>
>>>> Edward
>>>>
>>>>
>>>> On 2 September 2014 18:24, Troels Emtekær Linnet <[email protected]> 
>>>> wrote:
>>>>> Would you care to give the first example how to run with a script code?
>>>>>
>>>>> Best
>>>>> Troels
>>>>>
>>>>> 2014-09-02 17:49 GMT+02:00 Edward d'Auvergne <[email protected]>:
>>>>>> Hi,
>>>>>>
>>>>>> One trick that might help is to replace the hymbolic trigonometric
>>>>>> functions.  cosh(x) can be replaced by cos(ix) or exponential
>>>>>> functions.  But I've never found sympy to work well.  For example the
>>>>>> number of 0.353553390593274 that appears a few times really worries
>>>>>> me.  Anyway, I would highly recommend that you try out the very old
>>>>>> (1982) and free wxMaxima software:
>>>>>>
>>>>>> https://en.wikipedia.org/wiki/Maxima_%28software%29
>>>>>> https://andrejv.github.io/wxmaxima/
>>>>>> http://maxima.sourceforge.net/
>>>>>>
>>>>>> This is very powerful software and it will handle the CR72 equation
>>>>>> partial derivatives much better.  This originates from Macsyma
>>>>>> (https://en.wikipedia.org/wiki/Macsyma), and Mathematica took many of
>>>>>> it's ideas from it.  Mathematica also works very well because of the
>>>>>> powerful FullSimplify[] function that Maxima does not have.  I have
>>>>>> used Maxima for most of the symbolic equation derivations that are in
>>>>>> relax.  Anyway, you can save the maxima text files in the relax source
>>>>>> directories alongside the sympy scripts.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Edward
>>>>>>
>>>>>>
>>>>>> On 2 September 2014 17:30, Troels Emtekær Linnet <[email protected]> 
>>>>>> wrote:
>>>>>>> Python sympy has a hard time with CR72.
>>>>>>>
>>>>>>> This is the crazy result, and when I try to simplify, it simply dies.
>>>>>>>
>>>>>>> So, maybe a numerical gradient is the way.
>>>>>>>
>>>>>>> -------------------
>>>>>>> from sympy import *
>>>>>>>
>>>>>>> # In contrast to other Computer Algebra Systems, in SymPy you have to
>>>>>>> declare symbolic variables explicitly:
>>>>>>> r20a = Symbol('r20a')
>>>>>>> r20b = Symbol('r20b')
>>>>>>> pA = Symbol('pA')
>>>>>>> dw = Symbol('dw')
>>>>>>> kex = Symbol('kex')
>>>>>>> cpmg_frqs = Symbol('cpmg_frqs')
>>>>>>>
>>>>>>> eta_scale = 2.0**(-3.0/2.0)
>>>>>>> pB = 1.0 - pA
>>>>>>> dw2 = dw**2
>>>>>>> r20_kex = (r20a + r20b + kex) / 2.0
>>>>>>> k_BA = pA * kex
>>>>>>> k_AB = pB * kex
>>>>>>> fact = r20a - r20b - k_BA + k_AB
>>>>>>> Psi = fact**2 - dw2 + 4.0*k_BA*k_AB
>>>>>>> zeta = 2.0*dw * fact
>>>>>>> sqrt_psi2_zeta2 = sqrt(Psi**2 + zeta**2)
>>>>>>> D_part = (0.5*Psi + dw2) / sqrt_psi2_zeta2
>>>>>>> Dpos = 0.5 + D_part
>>>>>>> Dneg = -0.5 + D_part
>>>>>>> eta_fact = eta_scale / cpmg_frqs
>>>>>>> etapos = eta_fact * sqrt(Psi + sqrt_psi2_zeta2)
>>>>>>> etaneg = eta_fact * sqrt(-Psi + sqrt_psi2_zeta2)
>>>>>>> fact = Dpos * cosh(etapos) - Dneg * cos(etaneg)
>>>>>>> back_calc = cpmg_frqs * acosh(fact)
>>>>>>> back_calc = r20_kex - back_calc
>>>>>>>
>>>>>>> d_f_d_r20a = diff(back_calc, r20a)
>>>>>>> d_f_d_r20b = diff(back_calc, r20b)
>>>>>>> d_f_d_pA = diff(back_calc, pA)
>>>>>>> d_f_d_dw = diff(back_calc, dw)
>>>>>>> d_f_d_kex = diff(back_calc, kex)
>>>>>>>
>>>>>>> print("""Form the Jacobian matrix by:
>>>>>>> ------------------------------------------------------------------------------
>>>>>>>
>>>>>>> d_f_d_r20a = %s
>>>>>>>
>>>>>>> d_f_d_r20b = %s
>>>>>>>
>>>>>>> d_f_d_pA = %s
>>>>>>>
>>>>>>> d_f_d_dw = %s
>>>>>>>
>>>>>>> d_f_d_kex = %s
>>>>>>>
>>>>>>> jacobian_matrix = transpose(array( [d_f_d_r20a , d_f_d_r20b, d_f_d_pA,
>>>>>>> d_f_d_dw, d_f_d_kex] ) )
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> """% (d_f_d_r20a, d_f_d_r20b, d_f_d_pA, d_f_d_dw, d_f_d_kex) )
>>>>>>> ----------------
>>>>>>>
>>>>>>>
>>>>>>> d_f_d_r20a = -cpmg_frqs*(-((-2.0*dw**2*(-2*kex*pA + 2*kex*(-pA + 1.0)
>>>>>>> + 2*r20a - 2*r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)*(-4*kex*pA + 4*kex*(-pA + 1.0) +
>>>>>>> 4*r20a - 4*r20b)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)**2)**(3/2) +
>>>>>>> (-1.0*kex*pA + 1.0*kex*(-pA + 1.0) + 1.0*r20a -
>>>>>>> 1.0*r20b)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + ((-2.0*dw**2*(-2*kex*pA + 2*kex*(-pA +
>>>>>>> 1.0) + 2*r20a - 2*r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)*(-4*kex*pA + 4*kex*(-pA
>>>>>>> + 1.0) + 4*r20a - 4*r20b)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)**2)**(3/2) +
>>>>>>> (-1.0*kex*pA + 1.0*kex*(-pA + 1.0) + 1.0*r20a -
>>>>>>> 1.0*r20b)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + 0.353553390593274*(-0.5 + (0.5*dw**2 +
>>>>>>> 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(kex*pA - kex*(-pA + 1.0) - r20a + r20b +
>>>>>>> (2.0*dw**2*(-2*kex*pA + 2*kex*(-pA + 1.0) + 2*r20a - 2*r20b) + (-dw**2
>>>>>>> + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(-4*kex*pA + 4*kex*(-pA + 1.0) + 4*r20a -
>>>>>>> 4*r20b)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)**2)))*sin(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(dw**2 - 4.0*kex**2*pA*(-pA
>>>>>>> + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2))
>>>>>>> + 0.353553390593274*(0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b +
>>>>>>> (2.0*dw**2*(-2*kex*pA + 2*kex*(-pA + 1.0) + 2*r20a - 2*r20b) + (-dw**2
>>>>>>> + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(-4*kex*pA + 4*kex*(-pA + 1.0) + 4*r20a -
>>>>>>> 4*r20b)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)**2)))*sinh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)))/sqrt((-(-0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs))**2 - 1) + 0.5
>>>>>>>
>>>>>>> d_f_d_r20b = -cpmg_frqs*(-((1.0*kex*pA - 1.0*kex*(-pA + 1.0) -
>>>>>>> 1.0*r20a + 1.0*r20b)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a
>>>>>>> - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA
>>>>>>> + 1.0) + r20a - r20b)**2)**2) + (-2.0*dw**2*(2*kex*pA - 2*kex*(-pA +
>>>>>>> 1.0) - 2*r20a + 2*r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)*(4*kex*pA - 4*kex*(-pA +
>>>>>>> 1.0) - 4*r20a + 4*r20b)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + ((1.0*kex*pA - 1.0*kex*(-pA + 1.0) -
>>>>>>> 1.0*r20a + 1.0*r20b)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a
>>>>>>> - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA
>>>>>>> + 1.0) + r20a - r20b)**2)**2) + (-2.0*dw**2*(2*kex*pA - 2*kex*(-pA +
>>>>>>> 1.0) - 2*r20a + 2*r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)*(4*kex*pA - 4*kex*(-pA +
>>>>>>> 1.0) - 4*r20a + 4*r20b)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + 0.353553390593274*(-0.5 + (0.5*dw**2 +
>>>>>>> 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b +
>>>>>>> (2.0*dw**2*(2*kex*pA - 2*kex*(-pA + 1.0) - 2*r20a + 2*r20b) + (-dw**2
>>>>>>> + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(4*kex*pA - 4*kex*(-pA + 1.0) - 4*r20a +
>>>>>>> 4*r20b)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)**2)))*sin(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(dw**2 - 4.0*kex**2*pA*(-pA
>>>>>>> + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2))
>>>>>>> + 0.353553390593274*(0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(kex*pA - kex*(-pA + 1.0) - r20a + r20b +
>>>>>>> (2.0*dw**2*(2*kex*pA - 2*kex*(-pA + 1.0) - 2*r20a + 2*r20b) + (-dw**2
>>>>>>> + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(4*kex*pA - 4*kex*(-pA + 1.0) - 4*r20a +
>>>>>>> 4*r20b)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)**2)))*sinh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)))/sqrt((-(-0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs))**2 - 1) + 0.5
>>>>>>>
>>>>>>> d_f_d_pA = -cpmg_frqs*(-((-2.0*kex**2*pA + 2.0*kex**2*(-pA + 1.0) -
>>>>>>> 2.0*kex*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b))/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) + (8.0*dw**2*kex*(-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)*(-8.0*kex**2*pA + 8.0*kex**2*(-pA +
>>>>>>> 1.0) - 8*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b))/2)*(0.5*dw**2
>>>>>>> + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2)**(3/2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + ((-2.0*kex**2*pA + 2.0*kex**2*(-pA +
>>>>>>> 1.0) - 2.0*kex*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b))/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) + (8.0*dw**2*kex*(-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b) - (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)*(-8.0*kex**2*pA + 8.0*kex**2*(-pA +
>>>>>>> 1.0) - 8*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b))/2)*(0.5*dw**2
>>>>>>> + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2)**(3/2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + 0.353553390593274*(-0.5 + (0.5*dw**2 +
>>>>>>> 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(2.0*kex**2*pA - 2.0*kex**2*(-pA + 1.0) +
>>>>>>> 2*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b) +
>>>>>>> (-8.0*dw**2*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b) + (-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(-8.0*kex**2*pA + 8.0*kex**2*(-pA + 1.0) - 8*kex*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b))/2)/(2*sqrt(4.0*dw**2*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)))*sin(0.353553390593274*sqrt(dw**2 - 4.0*kex**2*pA*(-pA
>>>>>>> + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(dw**2 - 4.0*kex**2*pA*(-pA + 1.0)
>>>>>>> + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2))
>>>>>>> + 0.353553390593274*(0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(-2.0*kex**2*pA + 2.0*kex**2*(-pA + 1.0) -
>>>>>>> 2*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b) +
>>>>>>> (-8.0*dw**2*kex*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b) + (-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(-8.0*kex**2*pA + 8.0*kex**2*(-pA + 1.0) - 8*kex*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b))/2)/(2*sqrt(4.0*dw**2*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)))*sinh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)))/sqrt((-(-0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs))**2 - 1)
>>>>>>>
>>>>>>> d_f_d_dw = -cpmg_frqs*(-(1.0*dw/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (2*dw*(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2) - 4.0*dw*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (1.0*dw/sqrt(4.0*dw**2*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2)**2) +
>>>>>>> (2*dw*(-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2) - 4.0*dw*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + 0.353553390593274*(-0.5 + (0.5*dw**2 +
>>>>>>> 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(dw + (-2*dw*(-dw**2 + 4.0*kex**2*pA*(-pA + 1.0)
>>>>>>> + (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2) + 4.0*dw*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)/(2*sqrt(4.0*dw**2*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)))*sin(0.353553390593274*sqrt(dw**2 - 4.0*kex**2*pA*(-pA
>>>>>>> + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(dw**2 - 4.0*kex**2*pA*(-pA + 1.0)
>>>>>>> + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2))
>>>>>>> + 0.353553390593274*(0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(-dw + (-2*dw*(-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2) + 4.0*dw*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)**2)/(2*sqrt(4.0*dw**2*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)))*sinh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)))/sqrt((-(-0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs))**2 - 1)
>>>>>>>
>>>>>>> d_f_d_kex = -cpmg_frqs*(-((4.0*kex*pA*(-pA + 1.0) + 0.5*(-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b))/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) + (-2.0*dw**2*(-4*pA + 2.0)*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b) - (16.0*kex*pA*(-pA + 1.0) + 2*(-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b))*(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + ((4.0*kex*pA*(-pA + 1.0) + 0.5*(-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b))/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) + (-2.0*dw**2*(-4*pA + 2.0)*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b) - (16.0*kex*pA*(-pA + 1.0) + 2*(-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b))*(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/2)*(0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)/(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)**(3/2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + 0.353553390593274*(-0.5 + (0.5*dw**2 +
>>>>>>> 2.0*kex**2*pA*(-pA + 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(-4.0*kex*pA*(-pA + 1.0) - (-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)/2 + (2.0*dw**2*(-4*pA +
>>>>>>> 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b) + (16.0*kex*pA*(-pA +
>>>>>>> 1.0) + 2*(-4*pA + 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b))*(-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)**2)))*sin(0.353553390593274*sqrt(dw**2 - 4.0*kex**2*pA*(-pA
>>>>>>> + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(dw**2 - 4.0*kex**2*pA*(-pA + 1.0)
>>>>>>> + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2 +
>>>>>>> (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2))
>>>>>>> + 0.353553390593274*(0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA + 1.0) +
>>>>>>> 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*(4.0*kex*pA*(-pA + 1.0) + (-4*pA + 2.0)*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b)/2 + (2.0*dw**2*(-4*pA + 2.0)*(-kex*pA
>>>>>>> + kex*(-pA + 1.0) + r20a - r20b) + (16.0*kex*pA*(-pA + 1.0) + 2*(-4*pA
>>>>>>> + 2.0)*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b))*(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/2)/(2*sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA +
>>>>>>> 1.0) + r20a - r20b)**2)**2)))*sinh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs)/(cpmg_frqs*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)))/sqrt((-(-0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cos(0.353553390593274*sqrt(dw**2 -
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) - (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs) + (0.5 + (0.5*dw**2 + 2.0*kex**2*pA*(-pA +
>>>>>>> 1.0) + 0.5*(-kex*pA + kex*(-pA + 1.0) + r20a -
>>>>>>> r20b)**2)/sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0) + r20a - r20b)**2
>>>>>>> + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)**2))*cosh(0.353553390593274*sqrt(-dw**2 +
>>>>>>> 4.0*kex**2*pA*(-pA + 1.0) + sqrt(4.0*dw**2*(-kex*pA + kex*(-pA + 1.0)
>>>>>>> + r20a - r20b)**2 + (-dw**2 + 4.0*kex**2*pA*(-pA + 1.0) + (-kex*pA +
>>>>>>> kex*(-pA + 1.0) + r20a - r20b)**2)**2) + (-kex*pA + kex*(-pA + 1.0) +
>>>>>>> r20a - r20b)**2)/cpmg_frqs))**2 - 1) + 0.5
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> relax (http://www.nmr-relax.com)
>>>>>>>
>>>>>>> This is the relax-devel mailing list
>>>>>>> [email protected]
>>>>>>>
>>>>>>> To unsubscribe from this list, get a password
>>>>>>> reminder, or change your subscription options,
>>>>>>> visit the list information page at
>>>>>>> https://mail.gna.org/listinfo/relax-devel

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to