mailr14863 - /1.3/maths_fns/n_state_model.py


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

Header


Content

Posted by edward on October 12, 2011 - 19:07:
Author: bugman
Date: Wed Oct 12 19:07:04 2011
New Revision: 14863

URL: http://svn.gna.org/viewcvs/relax?rev=14863&view=rev
Log:
Revert the reversion of revision r14853 which was a reversion of r14849, as 
it was ok!

The command used was:
svn merge -r14853:r14852 .

.....
  Reverted r14849 as this was not the correct solution to the problem!
  
  The command used was:
  svn merge -r14849:r14848 .
  
  .....
    r14849 | bugman | 2011-10-12 17:40:47 +0200 (Wed, 12 Oct 2011) | 5 lines
    Changed paths:
      M /1.3/maths_fns/n_state_model.py
             
    Yet another fix for the N-state model target functions.
                 
    The Ln3+ optimisation with the tensors fixed was resulting in a chi2 
value of 0 at all times!
  .....
.....


Modified:
    1.3/maths_fns/n_state_model.py

Modified: 1.3/maths_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/n_state_model.py?rev=14863&r1=14862&r2=14863&view=diff
==============================================================================
--- 1.3/maths_fns/n_state_model.py (original)
+++ 1.3/maths_fns/n_state_model.py Wed Oct 12 19:07:04 2011
@@ -633,6 +633,7 @@
             # Create tensor i from the parameters.
             if not self.fixed_tensors[i]:
                 to_tensor(self.A[i], params[5*index:5*index + 5])
+                index += 1
 
             # Loop over the spin systems j.
             for j in xrange(self.num_spins):
@@ -648,10 +649,6 @@
                     if not self.missing_deltaij[i, j]:
                         self.deltaij_theta[i, j] = 
ave_pcs_tensor(self.pcs_const[i, j], self.paramag_unit_vect[j], self.N, 
self.A[i], weights=self.probs)
 
-            # Skip the rest if the tensor is fixed.
-            if self.fixed_tensors[i]:
-                continue
-
             # Calculate and sum the single alignment chi-squared value (for 
the RDC).
             if self.rdc_flag:
                 chi2_sum = chi2_sum + chi2(self.Dij[i], self.Dij_theta[i], 
self.rdc_sigma_ij[i])
@@ -659,9 +656,6 @@
             # Calculate and sum the single alignment chi-squared value (for 
the PCS).
             if self.pcs_flag:
                 chi2_sum = chi2_sum + chi2(self.deltaij[i], 
self.deltaij_theta[i], self.pcs_sigma_ij[i])
-
-            # Increment the index.
-            index += 1
 
         # Return the chi-squared value.
         return chi2_sum
@@ -834,6 +828,7 @@
             # Create tensor i from the parameters.
             if not self.fixed_tensors[i]:
                 to_tensor(self.A[i], params[5*index:5*index + 5])
+                index += 1
 
             # Loop over the spin systems j.
             for j in xrange(self.num_spins):
@@ -849,10 +844,6 @@
                     if not self.missing_deltaij[i, j]:
                         self.deltaij_theta[i, j] = 
ave_pcs_tensor(self.pcs_const[i, j], self.paramag_unit_vect[j], self.N, 
self.A[i], weights=self.probs)
 
-            # Skip the rest if the tensor is fixed.
-            if self.fixed_tensors[i]:
-                continue
-
             # Calculate and sum the single alignment chi-squared value (for 
the RDC).
             if self.rdc_flag:
                 chi2_sum = chi2_sum + chi2(self.Dij[i], self.Dij_theta[i], 
self.rdc_sigma_ij[i])
@@ -860,9 +851,6 @@
             # Calculate and sum the single alignment chi-squared value (for 
the PCS).
             if self.pcs_flag:
                 chi2_sum = chi2_sum + chi2(self.deltaij[i], 
self.deltaij_theta[i], self.pcs_sigma_ij[i])
-
-            # Increment the index.
-            index += 1
 
         # Return the chi-squared value.
         return chi2_sum




Related Messages


Powered by MHonArc, Updated Wed Oct 12 19:20:02 2011