mailr17073 - /branches/interatomic/specific_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 June 27, 2012 - 17:41:
Author: bugman
Date: Wed Jun 27 17:41:26 2012
New Revision: 17073

URL: http://svn.gna.org/viewcvs/relax?rev=17073&view=rev
Log:
Fixes for the _minimise_bc_data() model-free method.


Modified:
    branches/interatomic/specific_fns/n_state_model.py

Modified: branches/interatomic/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/specific_fns/n_state_model.py?rev=17073&r1=17072&r2=17073&view=diff
==============================================================================
--- branches/interatomic/specific_fns/n_state_model.py (original)
+++ branches/interatomic/specific_fns/n_state_model.py Wed Jun 27 17:41:26 
2012
@@ -812,7 +812,7 @@
                 pcs_flag = True
 
             # Spin loop.
-            spin_index = 0
+            pcs_index = 0
             for spin in spin_loop():
                 # Skip deselected spins.
                 if not spin.select:
@@ -825,15 +825,19 @@
                         spin.pcs_bc = {}
 
                     # Add the back calculated PCS (in ppm).
-                    spin.pcs_bc[align_id] = model.deltaij_theta[align_index, 
spin_index] * 1e6
-
-                # Increment the data index if the spin container has data.
-                if hasattr(spin, 'pcs'):
-                    spin_index = spin_index + 1
+                    spin.pcs_bc[align_id] = model.deltaij_theta[align_index, 
pcs_index] * 1e6
+
+                    # Increment the data index if the spin container has 
data.
+                    pcs_index = pcs_index + 1
 
             # Interatomic data container loop.
-            interatom_index = 0
+            rdc_index = 0
             for interatom in interatomic_loop():
+                # Skip deselected containers.
+                if not interatom.select:
+                    continue
+
+                print interatom
                 # Containers with RDC data.
                 if rdc_flag and hasattr(interatom, 'rdc'):
                     # Initialise the data structure if necessary.
@@ -841,11 +845,12 @@
                         interatom.rdc_bc = {}
 
                     # Append the back calculated PCS.
-                    interatom.rdc_bc[align_id] = 
model.Dij_theta[align_index, interatom_index]
-
-                # Increment the data index if the interatom container has 
data.
-                if hasattr(interatom, 'rdc'):
-                    interatom_index = interatom_index + 1
+                    print model.Dij_theta.shape
+                    print align_index, rdc_index
+                    interatom.rdc_bc[align_id] = 
model.Dij_theta[align_index, rdc_index]
+
+                    # Increment the data index if the interatom container 
has data.
+                    rdc_index = rdc_index + 1
 
 
     def _minimise_setup_atomic_pos(self):




Related Messages


Powered by MHonArc, Updated Wed Jun 27 18:00:02 2012