mailr14808 - /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 06, 2011 - 15:21:
Author: bugman
Date: Thu Oct  6 15:21:52 2011
New Revision: 14808

URL: http://svn.gna.org/viewcvs/relax?rev=14808&view=rev
Log:
Bug fix for missing RDC back-calculated data (rdc_bc).

If a sequence is read from a PDB file, but the N-H bond vector cannot be 
extracted due to a missing
proton, the alignment tensor fit to RDC data (specifically the Monte Carlo 
simulations) would fail.


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=14808&r1=14807&r2=14808&view=diff
==============================================================================
--- 1.3/specific_fns/n_state_model.py (original)
+++ 1.3/specific_fns/n_state_model.py Thu Oct  6 15:21:52 2011
@@ -1714,8 +1714,14 @@
             if not hasattr(spin, 'rdc_bc'):
                 self.calculate()
 
+            # The data.
+            if not hasattr(spin, 'rdc_bc') or 
spin.rdc_bc.has_key(data_id[2]):
+                data = None
+            else:
+                data = spin.rdc_bc[data_id[2]]
+
             # Append the data.
-            mc_data.append(spin.rdc_bc[data_id[2]])
+            mc_data.append(data)
 
         # PCS data.
         elif data_id[1] == 'pcs' and hasattr(spin, 'pcs'):
@@ -1723,8 +1729,14 @@
             if not hasattr(spin, 'pcs_bc'):
                 self.calculate()
 
+            # The data.
+            if not hasattr(spin, 'pcs_bc') or 
spin.pcs_bc.has_key(data_id[2]):
+                data = None
+            else:
+                data = spin.pcs_bc[data_id[2]]
+
             # Append the data.
-            mc_data.append(spin.pcs_bc[data_id[2]])
+            mc_data.append(data)
 
         # NOESY data.
         elif data_id[1] == 'noesy' and hasattr(spin, 'noesy'):




Related Messages


Powered by MHonArc, Updated Thu Oct 06 21:20:02 2011