That fixed it, I have the patches as attachments. They are converted to text in the mail archive, but that doesn't matter as I can apply the patches cleanly. I've now applied and committed these to your branch. Note that in the commit messages I had to modify the first line to fit within the limit of a single line of 100 characters. All lines are wrapped to 100 for better reading in the SVN repository. I also added the bug tracker link.
Regards, Edward On 10/26/07, Sébastien Morin <[EMAIL PROTECTED]> wrote: > Hi Ed > > Here are the patches again, hopefully with lines not wrapped... > > It's again my problem with Thunderbird, and again the solution of using the > web > based mail GUI for sending the patches... > > Cheers ! > > > Séb :) > > > > > > Selon Edward d'Auvergne <[EMAIL PROTECTED]>, 26.10.2007: > > > Thanks. The commit messages are prefect. One small point is that > > where you have the text '(bug #9562)', it is useful to include the > > link to the bug '(bug #9562, https://gna.org/bugs/?9562)'. That > > allows someone to more easily follow the ideas by being easier to get > > to the bug report. Oh, there is one other more important thing. > > Would you be able to have the three patches attached as text files? > > In the email I received, and in the mailing list archive > > (https://mail.gna.org/public/relax-devel/2007-10/msg00015.html), the > > lines in the patches have been wrapped so that the patches don't apply > > cleanly. > > > > Cheers, > > > > Edward > > > > > > On 10/26/07, Sebastien Morin <[EMAIL PROTECTED]> wrote: > > > > > > Hi Ed, > > > > > > Hera are patches for the consistency tests code. Even if the changes are > > > relatively small and won;t normally affect the execution of the code, > > > these > > > are intended to be commited before the merging of the consistency tests > > > branch into the main 1.2 branch. The patches I submitted recently > > > (https://mail.gna.org/public/relax-devel/2007-10/msg00006.html) > > > are now replaced by modified patches made on revision 3375 of line 1.2. > > > > > > Here are the commit messages for the attached patches. > > > > > > =================================================== > > > Application of a patch by Sebastien Morin (sebastien dot morin dot 1 at > > > ulaval dot ca) that changes the default CSA value so it's consistent with > > > the rest of relax. > > > > > > The patch 'patch_1.2-r3375_consistency_branch__CSA' > > > changes the default CSA value from -170 to -172 ppm in the file > > > 'specific_fns/consistency_tests.py'. > > > > > > This change follows the one at : > > > > > > http://svn.gna.org/viewcvs/relax/1.2/specific_fns/jw_mapping.py?rev=3354&r1=3353&r2=3354&view=diff > > > for jw_mapping from which the code for consistency tests originated. > > > =================================================== > > > > > > > > > =================================================== > > > Application of a patch by Sebastien Morin (sebastien dot morin dot 1 at > > > ulaval dot ca) that complements information given to users on consistency > > > testing. > > > > > > The patch 'patch_1.2-r3375_consistency_branch__docstring' > > > adds some text in docstrings or comments of files > > > 'maths_fns/consistency_tests.py' and > > > 'specific_fns/consistency_tests.py' to help users > > > understand why and how use the consistency tests. > > > =================================================== > > > > > > > > > =================================================== > > > Application of a patch by Sebastien Morin (sebastien dot morin dot 1 at > > > ulaval dot ca) that corrects a typo. > > > > > > The patch 'patch_1.2-r3375_consistency_branch__typo' > > > corrects a typo in function 'set()' of file > > > 'specific_fns/consistency_tests.py' where 'csa' was written > > > twice instead of first 'csa' and then 'r'. > > > > > > This change follows the one at : > > > > > > http://svn.gna.org/viewcvs/relax/1.2/specific_fns/jw_mapping.py?rev=3348&r1=3343&r2=3348 > > > for jw_mapping from which the code for consistency tests originated. > > > > > > This was first reported for the jw_mapping code (bug #9562). > > > =================================================== > > > > > > > > > Let me know if something misses... > > > > > > Regards > > > > > > > > > Séb :) > > > > > > > > > > > > > > > > > > > > > Edward d'Auvergne wrote: > > > Hi, > > > > > > Prior to me committing these patches, would you be able to write the > > > full commit message for these so I can just cut and paste them? For > > > example links to posts or previous commits for the CSA value change > > > would be useful for people in the future to back track the origin. > > > And maybe the third patch pointing to the bug report where this was > > > fixed in the code the consistency test code originated from. The > > > fuller the description, the easier it is for me to generate summaries > > > of changes in the main lines, i.e. in the CHANGES file. Ideally the > > > first line should be the description that goes into this CHANGES file, > > > assuming the individual change is worthy to be noted there. > > > > > > Thanks, > > > > > > Edward > > > > > > > > > On 10/22/07, Sebastien Morin <[EMAIL PROTECTED]> wrote: > > > > > > > > > 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 <[EMAIL PROTECTED]> 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. > > > > > > > > > > > > > > > > > > > > > -- > > > 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 3375) > > > +++ 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 3375) > > > +++ 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 histograms, 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 3375) > > > +++ 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 3375) > > > +++ 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. > > > > > > > > > > > _______________________________________________ relax (http://nmr-relax.com) This is the relax-users 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-users

