On 16 February 2011 19:18, Pavel Kaderavek <pavel.kaderavek@xxxxxxxxx> wrote:
Hi, sorry for the late response. I am continuing in the discussion - see Section 1) of the message: https://mail.gna.org/public/relax-devel/2010-10/msg00016.html
Hi, Don't worry about it, I fully understand how these things are. I hope you can add this work to a future publication (and then you can say that relax version 1.3.x will fully support RNA work, and that all future versions will have this functionality). If we have a system test checking the operation of this code for a small RNA data test set with CSA tensors, then this part of relax will be guaranteed to always work.
We would like to add the implementation of relaxation rate calculation from the contributions of the individual interactions in the next patch. It covers changes of functions func_mf, func_local_tm , func_diff, func_all, and their equivalents for a first and second derivatives (class Mf, file maths_fns/mf.py). We suggest to initialize new variables which would store values which are related to the spin and not to the individual interactions. It concerns calculated relaxation rates (ri_prime), chi squared (chi2), and corresponding derived variables (dri_prime, dri2_prime, dchi2, and d2chi2).
This is a good idea.
The suggested approach is demonstrated on func_mf function. The other function will be treated similarly (func_local_tm, func_diff, func_all, and their equivalents for a first and second derivatives). def func_mf(self, params): ... data = self.data[0] data.ri_prime = 0 # Initialization of the variable which will store the contribution to the relaxation rate from the individual interactions
I would make this a floating point number for speed, otherwise python will have perform a conversion from this integer '0' to the float '0.0'.
... # Loop over the relaxation interactions. for j in xrange(self.num_interactions[0]): .... # Calculate the R1, R2, and sigma_noe contribution of j-th interaction. data[j].ri_prime = data[j].create_ri_prime(data[j])
Is there a need to store this if the next step is to sum all values? Are the individual components needed for the conversion of sigma_NOE to the steady-state NOE value? Are the individual values used in the gradient or Hessian methods?
# The individual contribution will be cumulated here. data.ri_prime = data.ri_prime + data[j].ri_prime
This seems ok.
... # Outside the loop the chi2 will be calculated (as it is already in the original code): # Calculate the chi-squared value. data.chi2 = chi2(data.relax_data, data.ri, data.errors) The original version of the function data[j].create_ri_prime(data[j]) calculates the relaxation rates from all interactions (CSA, dipole-dipole, Rex). It will be necessary to modify the function to calculate the relaxation rate contribution per individual interaction separately. Therefore, the equation has to be selected according to both type of relaxation rate (R1,R2,sigmaNOE) and type of relaxation interaction (dipole-dipole, CSA, Rex, ...). However, this change be covered in a separate patch.
It would be better to have it separate. You may have noticed new code in your cst branch (after an 'svn up'). I have added system tests in the main line covering the optimisation of all model-free models (m0 to m9 and tm0 to tm9). I have merged the code into the branch as well. Once these all pass, then it will indicated that your code is working perfectly. We also need a system test, i.e. a mini analysis with script, truncated data and CSA tensors, for showing that the new CS tensor and multi-dipole code is fully functional. Cheers, Edward