mailr14859 - /1.3/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 October 12, 2011 - 18:54:
Author: bugman
Date: Wed Oct 12 18:54:15 2011
New Revision: 14859

URL: http://svn.gna.org/viewcvs/relax?rev=14859&view=rev
Log:
More attempts at fixing the N-state model code.......


Modified:
    1.3/specific_fns/n_state_model.py

Modified: 1.3/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=14859&r1=14858&r2=14859&view=diff
==============================================================================
--- 1.3/specific_fns/n_state_model.py (original)
+++ 1.3/specific_fns/n_state_model.py Wed Oct 12 18:54:15 2011
@@ -878,17 +878,27 @@
         frq = []
 
         # The PCS data.
-        for align_id in cdp.pcs_ids:
+        for align_id in cdp.align_ids:
+            # No RDC or PCS data, so jump to the next alignment.
+            if not align_id in cdp.rdc_ids and not align_id in cdp.pcs_ids:
+                continue
+
             # Append empty arrays to the PCS structures.
             pcs.append([])
             pcs_err.append([])
             pcs_weight.append([])
 
             # Get the temperature for the PCS constant.
-            temp.append(cdp.temperature[align_id])
+            if cdp.temperature.has_key(align_id):
+                temp.append(cdp.temperature[align_id])
+            else:
+                temp.append(0.0)
 
             # Get the spectrometer frequency in Tesla units for the PCS 
constant.
-            frq.append(cdp.frq[align_id] * 2.0 * pi / g1H)
+            if cdp.frq.has_key(align_id):
+                frq.append(cdp.frq[align_id] * 2.0 * pi / g1H)
+            else:
+                frq.append(1e-10)
 
             # Spin loop.
             j = 0
@@ -1071,7 +1081,11 @@
                 unit_vect[i] = [[None, None, None]]*num
 
         # The RDC data.
-        for align_id in cdp.rdc_ids:
+        for align_id in cdp.align_ids:
+            # No RDC or PCS data, so jump to the next alignment.
+            if not align_id in cdp.rdc_ids and not align_id in cdp.pcs_ids:
+                continue
+
             # Append empty arrays to the RDC structures.
             rdc.append([])
             rdc_err.append([])




Related Messages


Powered by MHonArc, Updated Wed Oct 12 19:00:01 2011