Hi again ! I added lines for plotting using grace in the sample script. Since this sample script was inspired by the jw_mapping sample script, I also submit a patch for this file (adding lines for plotting, changing the number of Monte Carlo simulations from 5000 to 500 and changing the sequence file from noe.500.out to noe.600.out for more consistency)... Ciao ! Sébastien :) Selon Sébastien Morin <sebastien.morin.1@xxxxxxxxx>, 09.07.2007:
Hi Ed Tell me if this works better. I'm now using the mail server directly from the internet GUI... (not with Thuderbird). If this does not work neither, maybe we could try with the task... Ciao ! Sébastien Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:I've tried cutting an pasting the patch but I get the following: edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2> patch -p0 < patch patching file prompt/consistency_tests.py Hunk #2 FAILED at 26. Hunk #3 FAILED at 40. Hunk #4 FAILED at 49. Hunk #5 FAILED at 74. 4 out of 5 hunks FAILED -- saving rejects to file prompt/consistency_tests.py.rej edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2> I don't know why, but thunderbird is destroying the attachment. The failed 'hunks' are the wrapped lines. Maybe there is a way to prevent thunderbird from doing this. Otherwise using another email client (or webmail) may work. I could also create a task for this consistency test work and these could be attached to the task. It's best that, for the record, the files are located within the permanent relax infrastructure. Cheers, Edward On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi again ! Here is again the first patch for the file 'prompt/consistency_tests.py'. I modified the header for the copyrights. Also, the former patches were not copied-pasted, but attached using Thunderbird after their creation using a command like 'svn diff > patch' under Linux. When I send those kinds of files as attachment, I usually see them as text in the e-mail, but also as an attachment that can be save. Tell me if it is okay and if it is still a problem, I'll put them on my lab's website... Cheers Séb :) Edward d'Auvergne wrote:Hi, Just add some text such as 'Copyright (C) 2007 Sebastien Morin <sebastien.morin.1 at ulaval.ca>' underneath the already existent copyright text. The can be changed later, for example I can give you a ???@nmr-relax.com email address which is an alias for any other email address (once voted in as a relax developer). Could you add this and then resend the patches? Ta. If they are attached rather than cut and paste that would be much easier for applying the patches (as email wraps lines). Also, maybe responding to your original posts will allow the patches to be more easily tracked in the mailing list https://mail.gna.org/public/relax-devel/. Cheers, Edward On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi ! I'm about to create the patches to merge the consistency tests codeintothe 1.2 branch. However, I have one question. How do I treat the copyrights ? Do Ileavethe original author from which I copied the code and then modified itordo I had my name to the code headers..? Thanks ! Sébastien :) Edward d'Auvergne wrote:Oh, I've committed your patch at
http://maple.rsvs.ulaval.ca/mediawiki/index.php/Patch_consistency_tests_2007-06-26
as revision r3324, applying it to the 1.2 branch. I've carefully checked the code and none of the changes are detrimental or could affect the stability of the stable 1.2 relax codebase. Note however that the code in the branch will not run as the consistency_test.py files are still identical copies of the jw_mapping.py files. Cheers, Edward On 7/9/07, Edward d'Auvergne <edward.dauvergne@xxxxxxxxx> wrote:Hi, I've now created two branches within the relax repository for youtoplay with. The first is a copy of the 1.2 line and is located at svn.gna.org/svn/relax/branches/consistency_tests_1.2/. The secondisa copy of the 1.3 line and is located at svn.gna.org/svn/relax/branches/consistency_tests_1.3/. I'veinitiallyused 'svn cp' to create the 5 consistency_tests.py files asdescribedin https://mail.gna.org/public/relax-devel/2007-07/msg00001.html (Message-id: <7f080ed10707090251ve1c4a8fl7f8618843e5c9459@xxxxxxxxxxxxxx>). Would you be able to create patches for these files (in the 1.2linefirst, no need to worry about the 1.3 line yet), and then post the individual patches as text file attachments to the mailing list? Thanks. I will then be able to commit these patches individually, checking them in fine detail. Things to note in creating the patches from the code at http://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_development include the copyright preservation, a number of integers in 'maths_fns/consistency_tests.py' which should be floating point numbers (just add '.0' to the end of the number), the addition of Grace plots as an output in the'sample_scripts/consistency_tests.py'script to be able to create a picture similar to that on your relax development site, maybe only allowing 'Tc' and 'tc' in the return_data_name() function and not 'TC', and 'degrees' instead of 'degree' in the return_units() function. One bug includes: setattr(self.relax.data.res[self.run][index], 'csa', float(value[0])) setattr(self.relax.data.res[self.run][index], 'r', float(value[1])) + setattr(self.relax.data.res[self.run][index], 'orientation', float(value[1])) + setattr(self.relax.data.res[self.run][index], 'tc', float(value[1])) value[1] has been used twice. I have a feeling there is anotherbugsomewhere where an index has been repeated a few times when itshouldbe different indices, but I can't find it at the moment. The individual patches should help. Finally, I have a feeling thatthereis unused code which can be deleted as it is a relic from the copyofthe J(w) mapping code and is not needed. For the 1.3 line code I would recommend that identical functions are shifted into filessuchas 'specific_fns/base_class.py', but for the 1.2 line code I would prefer the duplication as this means that the current stable codebaseremains stable. Cheers, Edward On 6/26/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi, I started working on implementing the consistency tests last weekbeforethe last post was made and, hence, I worked on repository line1.2(revision 3303). I implemented the consistency tests as a new type of run ('ct')similarto the one for Jw mapping. The calculations are made for J(0), F_eta and F_R2 separatelyfor eachmagnetic field (one at a time). The output results file issimilar tothe one for Jw mapping. The user then needs to plot them andlook forconsistency with its own criteria (calculation correlation coefficients, mean ratios and standard deviations, etc). Please look at the followinr URL for a listing of themodifications toold files and also necessary new files. http://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_development The file 'sample_scripts/consistency_tests.py' should be usefultounderstand how the new procedure works. Even if this was done on repository line 1.2, I think it isquite finesince nothing was deleted but only things added (maybe too much,as Ireproduced the Jw mapping approach, maybe too much as I addedlines inthe codes for grace, molmol, etc, maybe too much also since somecode isduplicated from the Jw mapping code). The test-suite still works perfectly and, so, I think it could be fine to add the tests tothe1.2line as well... However, if necessary, I could implement theconsistencytesting procedure on line 1.3, following your comments as I amquite newto Python and maybe made things somehow not perfectly... Please tell me what you think about this. Cheers, Sébastien :) Edward d'Auvergne wrote:Hi, I have previously talked about data set consistency. Forexampleseethe post athttps://mail.gna.org/public/relax-users/2007-06/msg00001.htmlin which a few reasons for inconsistencies have beenexplained. Ihave, from experience, noticed that small changes in protein concentration can change the collected relaxation ratessignificantly- most likely because of packing interactions. All samplesshouldessentially be identical in all respects for the relaxationrates tobe compared. And the temperate should always be fine tunedbetweenexperiments and spectrometers using methanol (and alwayscheckedlateron if there is a large time between collecting the sameexperiment).Therefore these tests would be quite useful. Data consistencyisessential for the model-free results to be correct (as well asreducedspectral density mapping, SRLS, etc.) as this affects both the optimisation and model selection and can result in artificialmotionsappearing. However I don't know how these test wouldcurrently fitwithin relax. Maybe a new type of analysis should be createdforthis(see the pipe.create() user function in the 1.3 line or the run.create() user function in the 1.2 line). These ideasshould allgo into the 1.3 line (via a branch) as the 1.2 line is stableand nonew major features will be added to this code. What are theideas youhave been playing with? Cheers, Edward On 6/15/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx>wrote:Hi everyone During the last months, I was astonished to realize that somespinrelaxation data I had acquired at different fields were notconsistentbetween each other. The way I realized that was by seeingdiscrepancybetween J(0) values calculated with those different datasets. I looked a little bit in the litterature and found someinterestingconsistency tests in a paper by Fushman (Fushman et al., JACS,1998,120:10947-10952). This paper present 2 consistency tests to compare datasetsfromdifferent magnetic fields / samples / time / etc. I think it would be interesting to implement those simpletestsin relaxso the user can, before trying to fit their data, know thequality ofthose... Regrettably, very few people look at the consistencyoftheirdatasets before analysis... The underlying principle is the same as when looking atconsistency forJ(0). Thus, I think that those two tests and a J(0) testshould beimplemented altogether... I'll try to work a bit on this. Mimicking the code forspectraldensityshould be a good starting point. Am I right ? Do you see any value in those tests ? Cheers Sébastien :) _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx 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-- ______________________________________ _______________________________________________ | | || 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 ||| || || |_______________________________________________| ______________________________________-- ______________________________________ _______________________________________________ | | || 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 ||| || || |_______________________________________________| ______________________________________-- ______________________________________ _______________________________________________ | | || 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: prompt/consistency_tests.py =================================================================== --- prompt/consistency_tests.py (revision 3324) +++ prompt/consistency_tests.py (working copy) @@ -1,6 +1,7 @@
###############################################################################
### Copyright (C) 2004-2005 Edward d'Auvergne#+# Copyright (C) 2007 Sebastien Morin <sebastien.morin.1 at ulaval.ca> ### This file is part of the program relax.###@@ -25,11 +26,11 @@ import help -class Jw_mapping: +class Consistency_tests: def __init__(self, relax): # Help. self.__relax_help__ = \ - """Class containing functions specific to reduced spectraldensitymapping."""+ """Class containing functions specific to consistency tests fordatasets from different fields."""# Add the generic help string. self.__relax_help__ = self.__relax_help__ + "\n" +help.relax_class_help@@ -39,7 +40,7 @@ def set_frq(self, run=None, frq=None): - """Function for selecting which relaxation data to use in theJ(w)mapping.+ """Function for selecting which relaxation data to use in theconsistency tests.Keyword Arguments ~~~~~~~~~~~~~~~~~ @@ -48,24 +49,23 @@ frq: The spectrometer frequency in Hz. - Description ~~~~~~~~~~~ - This function will select the relaxation data to use in thereduced spectral density mapping- corresponding to the given frequency. + This function will select the relaxation data to use in theconsistency tests+ corresponding to the given frequencies. Examples ~~~~~~~~ - relax> jw_mapping.set_frq('jw', 600.0 * 1e6) - relax> jw_mapping.set_frq(run='jw', frq=600.0 * 1e6) + relax> consistency_tests.set_frq('test', 600.0 * 1e6) + relax> consistency_tests.set_frq(run='test', frq=600.0 * 1e6) """ # Function intro text. if self.__relax__.interpreter.intro: - text = sys.ps3 + "jw_mapping.set_frq(" + text = sys.ps3 + "consistency_tests.set_frq(" text = text + "run=" + `run` text = text + ", frq=" + `frq` + ")" print text @@ -74,9 +74,9 @@ if type(run) != str: raise RelaxStrError, ('run', run) - # The frq argument. + # The frq arguments. if type(frq) != float: raise RelaxStrError, ('frq', frq) # Execute the functional code. - self.__relax__.specific.jw_mapping.set_frq(run=run, frq=frq) + self.__relax__.specific.consistency_tests.set_frq(run=run,frq=frq)
Attachment:
patch_sample_scripts_consistency_tests
Description: Binary data
Index: sample_scripts/jw_mapping.py =================================================================== --- sample_scripts/jw_mapping.py (revision 3324) +++ sample_scripts/jw_mapping.py (working copy) @@ -8,7 +8,7 @@ nuclei('N') # Load the sequence. -sequence.read(name, 'noe.500.out') +sequence.read(name, 'noe.600.out') # Load the relaxation data. relax_data.read(name, 'R1', '600', 600.0 * 1e6, 'r1.600.out') @@ -26,11 +26,21 @@ calc(name) # Monte Carlo simulations. -monte_carlo.setup(name, number=5000) +monte_carlo.setup(name, number=500) monte_carlo.create_data(name) calc(name) monte_carlo.error_analysis(name) +# Create grace files. +grace.write(name, y_data_type='j0', file='j0.agr', force=1) +grace.write(name, y_data_type='jwx', file='jwx.agr', force=1) +grace.write(name, y_data_type='jwh', file='jwh.agr', force=1) + +# View the grace files. +grace.view(file='j0.agr') +grace.view(file='jwx.agr') +grace.view(file='jwh.agr') + # Finish. results.write(run=name, file='results', force=1) state.save('save', force=1)