mailRe: r26170 - /trunk/specific_analyses/relax_disp/api.py


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

Header


Content

Posted by Edward d'Auvergne on October 06, 2014 - 17:19:
Hi Troels,

In the commit message, you should mention which functions/methods you
modified.  Here for example the model_loop() method.  This is for
following the evolution of this method - being able to search the
commit messages for model_loop to find all changes to this method is a
very important tool for long-term source code development.

Cheers,

Edward


On 6 October 2014 17:07,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Mon Oct  6 17:07:57 2014
New Revision: 26170

URL: http://svn.gna.org/viewcvs/relax?rev=26170&view=rev
Log:
Initial try to fix unit test test_value_set_r1_rit().

The problem is, that no spin-id can be generated, since the spins are 
created manually,

"
File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/pipe_control/mol_res_spin.py",
 line 1498, in generate_spin_id_unique
if res and res.name != None and mol._res_name_count[res.name] > 1:
AttributeError: 'MoleculeContainer' object has no attribute 
'_res_name_count'
"

Bug #22754 (https://gna.org/bugs/index.php?22754): The minimise.calculate() 
does not calculate chi2 value for clustered residues.

Modified:
    trunk/specific_analyses/relax_disp/api.py

Modified: trunk/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=26170&r1=26169&r2=26170&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/api.py   (original)
+++ trunk/specific_analyses/relax_disp/api.py   Mon Oct  6 17:07:57 2014
@@ -851,20 +851,31 @@
         """

         # Loop over individual spins for the R2eff model.
-        if cdp.model_type == MODEL_R2EFF:
-            # The spin loop.
-            for spin, spin_id in spin_loop(return_id=True):
-                # Skip deselected spins
-                if not spin.select:
-                    continue
-
-                # Yield the spin ID as a list.
-                yield [spin_id]
-
-         # The cluster loop.
-        else:
-            for spin_ids in loop_cluster(skip_desel=False):
-                yield spin_ids
+        if hasattr(cdp, 'model_type'):
+            if cdp.model_type == MODEL_R2EFF:
+                # The spin loop.
+                for spin, spin_id in spin_loop(return_id=True):
+                    # Skip deselected spins
+                    if not spin.select:
+                        continue
+
+                    # Yield the spin ID as a list.
+                    yield [spin_id]
+
+             # The cluster loop.
+            else:
+                for spin_ids in loop_cluster(skip_desel=False):
+                    yield spin_ids
+
+        # If no model is present, then set the values.
+        # The spin loop.
+        for spin, spin_id in spin_loop(return_id=True):
+            # Skip deselected spins
+            if not spin.select:
+                continue
+
+            # Yield the spin ID as a list.
+            yield [spin_id]


     def model_statistics(self, model_info=None, spin_id=None, 
global_stats=None):


_______________________________________________
relax (http://www.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 Mon Oct 06 18:20:14 2014