mailRe: r5253 - /1.3/generic_fns/grace.py


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

Header


Content

Posted by Edward d'Auvergne on April 03, 2008 - 18:26:
Seb, these changes are all good.  One thing though is that the
spin_loop() generator is needed to loop over the spins, rather than
"for i in xrange(len(cdp.res)):".

Cheers,

Edward


On Thu, Apr 3, 2008 at 5:42 AM,  <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor
 Date: Thu Apr  3 05:42:40 2008
 New Revision: 5253

 URL: http://svn.gna.org/viewcvs/relax?rev=5253&view=rev
 Log:
 Started the modification to the new design by :

 1. Introducing the alias for the current data pipe (cdp).
 2. replacing all instances of 'self.run = run' with the alias for the 
current data pipe (cdp) ;
 3. introducing the exists_mol_res_spin_data() to replace 
'relax_data_store.res.has_key(self.run)' instances.


 Modified:
    1.3/generic_fns/grace.py

 Modified: 1.3/generic_fns/grace.py
 URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/grace.py?rev=5253&r1=5252&r2=5253&view=diff
 
==============================================================================
 --- 1.3/generic_fns/grace.py (original)
 +++ 1.3/generic_fns/grace.py Thu Apr  3 05:42:40 2008
 @@ -98,13 +98,13 @@
     def get_data(self):
         """Function for getting all the xy data."""

 -        # Initialise.
 -        self.data = []
 +        # Alias the current data pipe.
 +       cdp = relax_data_store[relax_data_store.current_pipe]

         # Loop over the residues.
 -        for i in xrange(len(relax_data_store.res[self.run])):
 -            # Remap the data structure 
'relax_data_store.res[self.run][i]'.
 -            data = relax_data_store.res[self.run][i]
 +        for i in xrange(len(cdp.res)):
 +            # Remap the data structure 'cdp.res[i]'.
 +            data = cdp.res[i]

             # Skip the residue if there is no match to 'self.res_num' 
(unless it is None).
             if type(self.res_num) == int:
 @@ -125,7 +125,7 @@

             # Number of data points per residue.
             if self.plot_data == 'sim':
 -                points = relax_data_store.sim_number[self.run]
 +                points = cdp.sim_number
             else:
                 points = 1

 @@ -201,8 +201,8 @@
             raise RelaxNoPipeError, self.run

         # Test if the sequence data is loaded.
 -        if not relax_data_store.res.has_key(self.run):
 -            raise RelaxNoSequenceError, self.run
 +        if not exists_mol_res_spin_data():
 +            raise RelaxNoSequenceError

         # Test if the residue number is a valid regular expression.
         if type(self.res_num) == str:
 @@ -336,8 +336,8 @@

         # X axis start and end.
         if self.x_data_type == 'res':
 -            self.file.write("@    world xmin " + 
`relax_data_store.res[self.run][0].num - 1` + "\n")
 -            self.file.write("@    world xmax " + 
`relax_data_store.res[self.run][-1].num + 1` + "\n")
 +            self.file.write("@    world xmin " + `cdp.res[0].num - 1` + 
"\n")
 +            self.file.write("@    world xmax " + `cdp.res[-1].num + 1` + 
"\n")

         # X-axis label.
         if self.x_data_type == 'res':
 @@ -449,8 +449,8 @@

         # X axis start and end.
         if self.x_data_type == 'res':
 -            self.file.write("@    world xmin " + 
`relax_data_store.res[self.run][0].num - 1` + "\n")
 -            self.file.write("@    world xmax " + 
`relax_data_store.res[self.run][-1].num + 1` + "\n")
 +            self.file.write("@    world xmin " + `cdp.res[0].num - 1` + 
"\n")
 +            self.file.write("@    world xmax " + `cdp.res[-1].num + 1` + 
"\n")

         # X-axis label.
         if self.x_data_type == 'res':


 _______________________________________________
 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 Thu Apr 03 18:42:22 2008