mailRe: r10918 - /branches/bieri_gui/auto_analyses/dauvergne_protocol.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on February 25, 2010 - 09:32:
Hi,

There are 2 issues with this commit.  The first is that modification
to this code should occur in the 1.3 line, not in the branch.
Secondly, this is again the wrong way to get status information.  Let
me implement the status information singleton object.  I can then
place this information into the status object.  For this I will place
the model name, as well as the list of all models (self.mf_models and
self.local_tm_models) into the object.  The relax controller can then
read these and update what is displayed (i.e. the model name optimised
can even be displayed).  Therefore, please revert this commit with:

$ svn merge -r10918:10917 .

and commit (with the svn command used and a link to this message in
the commit message).

Thanks,

Edward


On 25 February 2010 04:47,  <michael.bieri@xxxxxx> wrote:
Author: michaelbieri
Date: Thu Feb 25 04:47:12 2010
New Revision: 10918

URL: http://svn.gna.org/viewcvs/relax?rev=10918&view=rev
Log:
A feedback of the progress of local tm models in the d'auvergne_protocol.py 
script was added.

This feedback will be read by the relaxGUI controller and the progress bar 
will be updated.

Modified:
   branches/bieri_gui/auto_analyses/dauvergne_protocol.py

Modified: branches/bieri_gui/auto_analyses/dauvergne_protocol.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/auto_analyses/dauvergne_protocol.py?rev=10918&r1=10917&r2=10918&view=diff
==============================================================================
--- branches/bieri_gui/auto_analyses/dauvergne_protocol.py (original)
+++ branches/bieri_gui/auto_analyses/dauvergne_protocol.py Thu Feb 25 
04:47:12 2010
@@ -143,6 +143,7 @@
 from os import getcwd, listdir, sep
 from re import search
 from string import lower
+from time import sleep

 # relax module imports.
 from float import floatAsByteArray
@@ -154,7 +155,7 @@


 class dAuvergne_protocol:
-    def __init__(self, diff_model=None, mf_models=['m0', 'm1', 'm2', 'm3', 
'm4', 'm5', 'm6', 'm7', 'm8', 'm9'], local_tm_models=['tm0', 'tm1', 'tm2', 
'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9'], pdb_file=None, 
seq_args=None, het_name=None, relax_data=None, unres=None, exclude=None, 
bond_length=None, csa=None, hetnuc=None, proton='1H', grid_inc=11, 
min_algor='newton', mc_num=500, user_fns=None, conv_loop=True):
+    def __init__(self, progress = 0, diff_model=None, mf_models=['m0', 
'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9'], 
local_tm_models=['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 
'tm8', 'tm9'], pdb_file=None, seq_args=None, het_name=None, 
relax_data=None, unres=None, exclude=None, bond_length=None, csa=None, 
hetnuc=None, proton='1H', grid_inc=11, min_algor='newton', mc_num=500, 
user_fns=None, conv_loop=True):
        """Perform the full model-free analysis protocol of d'Auvergne and 
Gooley, 2008b.

        @keyword diff_model:        The global diffusion model to optimise. 
 This can be one of 'local_tm', 'sphere', 'oblate', 'prolate', 'ellipsoid', 
or 'final'.
@@ -213,6 +214,7 @@
        self.min_algor = min_algor
        self.mc_num = mc_num
        self.conv_loop = conv_loop
+        self.progress = progress

        # User variable checks.
        self.check_vars()
@@ -230,6 +232,7 @@

        # MI - Local tm.
        ################
+

        if self.diff_model == 'local_tm':
            # Base directory to place files into.
@@ -740,6 +743,13 @@
            if pipes.has_pipe(name):
                self.interpreter.pipe.delete(name)
            self.interpreter.pipe.create(name, 'mf')
+
+            # Update progress.
+            print'\nProgress: '+ str(self.progress)
+            if local_tm:
+                self.progress = self.progress + (100/len(self.pipes))
+            else:
+                self.progress = self.progress + 5

            # Load the sequence.
            self.interpreter.sequence.read(file=self.seq_args[0], 
dir=self.seq_args[1], mol_name_col=self.seq_args[2], 
res_num_col=self.seq_args[3], res_name_col=self.seq_args[4], 
spin_num_col=self.seq_args[5], spin_name_col=self.seq_args[6], 
sep=self.seq_args[7])


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@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-commits




Related Messages


Powered by MHonArc, Updated Fri Feb 26 00:20:56 2010