Hi Ed I've checked in the consistency tests code and it seems almost ready to be merged to the main code for line 1.2. I say "almost" since I have 3 patches for solving some details... 1. patch_1.2-r3370_consistency_branch__maths_fns_-_consistency__CSA Changes the default CSA value from -170 to -172 ppm. 2. patch_1.2-r3370_consistency_branch__maths_fns_-_consistency__docstring Adds some text in docstrings or comments. 3. patch_1.2-r3370_consistency_branch__maths_fns_-_consistency__typo Corrects a typo where 'csa' was written instead of 'r'. Thanks for merging this code. I think the next steps will be : a) to add the code to the 1.3 line ; b) to modify the code so datasets from different magnetic fields (at least two) can be input at once and correlation plots made automatically as long as correlation, skewness and kurtosis coefficients calculated also automatically... Cheers Sébastien :) Edward d'Auvergne wrote: On 10/16/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi Daniel Calculations for the reduced spectral density mapping need only the R1, R2 and NOE at one field. R1, R2 and NOE are 3 variables you measure and you extract 3 parameters from them. This is only a simple calculation using in relax the equations that follow : j0 = -1.5 / (3.0*d + c) * (0.5*r1 - r2 + 0.6*sigma_noe) jwx = 1.0 / (3.0*d + c) * (r1 - 1.4*sigma_noe) jwh = sigma_noe / (5.0*d) where j0, jwx and jwh are, respectively, the spectral density at the zero frequency, at the nitrogen frequency (in the special case where you work with 15N relaxation) and at the apparent proton frequency (sometimes called J(wH) or J(0.87wH) ). The other constants and variables are : c = CSA constant d = dipolar constant sigma_noe = cross-relaxation rate (calculated using NOE and R1) That said, you can extract spectral densities using data from different magnetic fields at the same time. This only changes the obtained value for J(0), as J(wN) and J(wH) are field dependent... For example, if you have data at three fields, you would get 1 value for J(0), 3 values for J(wN) and 3 values for J(wH). This approach is not yet implemented in relax, but it could be something useful. In fact, it's something I personally would like to contribute when I have time, maybe this fall...This description is exact. There are actually a number of methodologies available for determining J(0) using multiple field strength data but I have never had the chance to implement these in relax. The addition of any new type of analysis to relax would be almost guaranteed to be accepted though. Daniel, the link that Seb gave in his post (https://mail.gna.org/public/relax-users/2006-11/msg00019.html) goes into much more detail into all of this.However, calculating J(0) using different fields in separated calculations is something useful you may want to do prior to any calculation using multiple field data. The reason is that J(0) should be field independent, in cases where us-ms motions (Rex in the model-free language) are not present. Thus, calculating J(0) helps you assess the quality of your data. This is quite important as different factors may influence the consistency of your data acquired at different magnetic fields... A part of relax is specially designed to do 3 different consistency tests : J(0), Fn and FR2. Those consistency tests are implemented in a special branch of relax which contains, apart from that, all the same functions. A sample script is also available as for other functions within relax. You can get that version of the program with svn by typing : svn co http://svn.gna.org/svn/relax/branches/consistency_tests_1.2/ .This branch is likely to be incorporated into the 1.2 line soonish. These consistency tests will be quite useful especially prior to reduced spectral density mapping using data at multiple field strengths to determine a single J(0) value. Seb, what is the status of this code? Is it now complete? Or do you thing that more testing required? I will probably try to release a new version of relax soon, as this is long overdue, and then hopefully we can get your code in shape for merging for the next version. Regards, Edward -- ______________________________________ _______________________________________________ | | || Sebastien Morin || ||| Etudiant au PhD en biochimie ||| |||| Laboratoire de resonance magnetique nucleaire |||| ||||| Dr Stephane Gagne ||||| |||| CREFSIP (Universite Laval, Quebec, CANADA) |||| ||| 1-418-656-2131 #4530 ||| || || |_______________________________________________| ______________________________________ |
Index: specific_fns/consistency_tests.py =================================================================== --- specific_fns/consistency_tests.py (revision 3370) +++ specific_fns/consistency_tests.py (working copy) @@ -225,7 +225,7 @@ | | | | | Bond length | 'r' | 1.02 * 1e-10 | | | | | - | CSA | 'csa' | -170 * 1e-6 | + | CSA | 'csa' | -172 * 1e-6 | | | | | | Angle Theta | 'orientation' | 15.7 | | | | | @@ -240,7 +240,7 @@ # CSA. if param == 'CSA': - return -170 * 1e-6 + return -172 * 1e-6 # Angle Theta if param == 'orientation':
Index: maths_fns/consistency_tests.py =================================================================== --- maths_fns/consistency_tests.py (revision 3370) +++ maths_fns/consistency_tests.py (working copy) @@ -37,9 +37,14 @@ This code calculates three functions for each residue. When comparing datasets from different magnetic field, the value should be the same for each function as these are field - field independent. The J(0) function is the spectral density at the zero frequency and is - obtained using a reduced spectral density approach. The F_eta and F_R2 functions are the + independent. The J(0) function is the spectral density at the zero frequency and is obtained + using a reduced spectral density approach. The F_eta and F_R2 functions are the consistency functions proposed by Fushman D. et al. (1998) JACS, 120: 10947-10952. + + To assess the consistency of its datasets, one should first calculate those values (J(0), + F_eta and F_R2) for each field. Then, the user should compare values obtained for different + magnetic fields. Comparisons could proceed using correlation plots and the user could also + calculate correlation, skewness and kurtosis coefficients. """ # Initialise the data container. @@ -109,6 +114,9 @@ # Calculate P_2. # p_2 is a second rank Legendre polynomial as p_2(x) = 0.5 * (3 * (x ** 2) -1) # where x is the cosine of the angle Theta when expressed in radians. + # + # Note that the angle Theta (called 'orientation' in relax) is the angle between the 15N-1H + # vector and the principal axis of the 15N chemical shift tensor. p_2 = 0.5 * ((3.0 * (cos(orientation * pi / 180)) ** 2) -1) # Calculate eta. Index: specific_fns/consistency_tests.py =================================================================== --- specific_fns/consistency_tests.py (revision 3370) +++ specific_fns/consistency_tests.py (working copy) @@ -417,8 +417,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In consistency testing, only four values can be set, the bond length, CSA, angle - Theta and correlation time values. These must be set prior to the calculation - of consistency functions. + Theta ('orientation') and correlation time values. These must be set prior to the + calculation of consistency functions. """
Index: specific_fns/consistency_tests.py =================================================================== --- specific_fns/consistency_tests.py (revision 3370) +++ specific_fns/consistency_tests.py (working copy) @@ -447,7 +447,7 @@ value.append(self.default_value('tc')) # Initilise data. - if not hasattr(self.relax.data.res[self.run][index], 'csa') or not hasattr(self.relax.data.res[self.run][index], 'csa') or not hasattr(self.relax.data.res[self.run][index], 'orientation') or not hasattr(self.relax.data.res[self.run][index], 'tc'): + if not hasattr(self.relax.data.res[self.run][index], 'csa') or not hasattr(self.relax.data.res[self.run][index], 'r') or not hasattr(self.relax.data.res[self.run][index], 'orientation') or not hasattr(self.relax.data.res[self.run][index], 'tc'): self.data_init(self.relax.data.res[self.run][index]) # CSA, bond length, angle Theta and correlation time.