Hi, There are a number of possible options here. IO redirection is changed in relax in the file 'io.py' when the command line options are processed. The first option would be to change 'sys.stdout' and 'sys.stderr' at the level of the diffusion tensor or the level of the iterations. Just set these to a writable file, and the data will be placed there instead. So this can go directly into the 'full_analysis.py' script. Note that in 'io.py' the normal 'stdin', 'stdout', and 'stderr' are stored for restoring normal operation (accessible at self.relax.IO.python_stdout, etc). This could be an option in 'full_analysis.py', but any code will require a lot of refinement to make it clean and simple.
The other option is to define new user functions which allow the user to redirect IO. For example a prototype function could be: io.redirect(stdin=None, stdout=None, stderr=None): """Function of allowing IO redirection.""" The arguments must then be strings for which a file will be created, or something else to return to normal operation. This user function should go in the 1.3 line - having it accepted into 1.2 will be a challenge ;). I was always planning on this user function, but it never eventuated. Regards, Edward On 10/24/07, Douglas Kojetin <[EMAIL PROTECTED]> wrote: > > Perhaps it might be useful to build some sort of automatic queueing routine > into relax, or the full_analysis script directly? It could first run the > local_tm run, then queue up and run the other tensor runs. > > Doug > > > On Oct 24, 2007, at 8:25 AM, Sebastien Morin wrote: > Hi Doug > > This extreme looping should be added as an option in the full_analysis.py > script. I'm not sure I would routinely use it as the computing time must be > very long, but it could be useful some times... > > When the threading over multiple CPUs will be implemented, this option > would also certainly be useful... > > I would suggest you submit a patch to [EMAIL PROTECTED] to add this > feature as an option the user can activate or not depending on its needs... > > Cheers ! > > > Séb :) > > > > Douglas Kojetin wrote: > I guess I could also mentione that I've 'hacked' the full_analysis.py script > to automatically loop through local_tm, sphere, prolate, oblate and > ellipsoid runs as well. This, however, produces one extremely large output > file, so the modifications mentioned below would be useful. > > > Doug > > > > On Oct 22, 2007, at 4:22 PM, Sebastien Morin wrote: > > Hi Doug ! > > Great ! > > I didn't know about that feature (and some others that "relax -help" > outputs)... > > > Séb :) > > > > Douglas Kojetin wrote: > Hi Séb, > > > > I've been using the -t flag creating one large log, so I think this: > > > For analysis where some kind of looping is done (like here), the logs could > be separated into different steps. For the full_analysis.py script, logging > could be done independantly for each round and added to the other > directories created... > > aic/ m0/ m1/ m2/ m3/ m4/ m5/ m6/ m7/ m8/ m9/ opt/ log > > > > and this: > > > Maybe, also, two versions of the log could created, one detailed and one > only logging main topics so one can easily follow the processes. This could > be interesting for people not familiar with the details of relax and of the > approaches used for calculation/optimization... > > > would be extremely useful. > > > Doug > > > > > > > > On Oct 22, 2007, at 4:15 PM, Sebastien Morin wrote: > > Hi all ! > > First of all, I think that the new feature for automatic looping is quite > interesting..! > > However, I think that something could be done to make the analysis easier. > > When one starts a relax run, text is sent to the standard output. I usually > redirect this text to a log file so I can analyze if any trouble arises... > > I think that logging should be automatic. This would not mean that > standard output would be suppress, but rather that standard output would be, > also, saved in a text file along with the results. > > For analysis where some kind of looping is done (like here), the logs could > be separated into different steps. For the full_analysis.py script, logging > could be done independantly for each round and added to the other > directories created... > > aic/ m0/ m1/ m2/ m3/ m4/ m5/ m6/ m7/ m8/ m9/ opt/ log > > You may say that we can manually do that, but when using the automatic > looping options, one would get a huge log... > > Maybe, also, two versions of the log could created, one detailed and one > only logging main topics so one can easily follow the processes. This could > be interesting for people not familiar with the details of relax and of the > approaches used for calculation/optimization... > > Let me know what you think of this and also if I'm being clear or not... > > Cheers > > > Séb :) > > > -- > ______________________________________ > _______________________________________________ > | | > || 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 ||| > || || > |_______________________________________________| > ______________________________________ > > > > _______________________________________________ > relax (http://nmr-relax.com) > > This is the relax-users mailing list > relax-users@gna.org > > 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 > > _______________________________________________ relax (http://nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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