mailr15061 - /branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py


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

Header


Content

Posted by edward on December 08, 2011 - 13:49:
Author: bugman
Date: Thu Dec  8 13:49:05 2011
New Revision: 15061

URL: http://svn.gna.org/viewcvs/relax?rev=15061&view=rev
Log:
Created a script for the back-calculation of RDC and PCS data from the PCS 
only fit average structure.


Added:
    
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py
      - copied, changed from r15025, 
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/back_calc.py

Copied: 
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py
 (from r15025, 
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/back_calc.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py?p2=branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py&p1=branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/back_calc.py&r1=15025&r2=15061&rev=15061&view=diff
==============================================================================
--- 
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/back_calc.py
 (original)
+++ 
branches/frame_order_testing/test_suite/shared_data/frame_order/rotor2/pcs_only/ave_pos_back_calc.py
 Thu Dec  8 13:49:05 2011
@@ -7,8 +7,8 @@
 # Create a data pipe.
 pipe.create('bc', 'N-state')
 
-# Load the C-domain distribution.
-structure.read_pdb('distribution')
+# Load the average C-domain pos.
+structure.read_pdb('ave_pos')
 
 # Load the spins.
 structure.load_spins('@N')
@@ -32,18 +32,18 @@
 paramag.centre(pos=[35.934, 12.194, -4.206])
 
 # Loop over the alignments.
-tensors = ['dy', 'tb', 'tm', 'er']
-for i in range(len(cdp.align_tensors)):
-    # The tag.
-    tag = cdp.align_tensors[i].name
+ids = ['dy', 'tb', 'tm', 'er']
+for id in ids:
+    # Load the distribution-based PCS.
+    pcs.read(align_id=id, file='pcs_%s.txt'%id, res_num_col=2, 
spin_name_col=5, data_col=6, error_col=7)
 
     # The temperature and field strength.
-    temperature(id=tag, temp=303)
-    frq.set(id=tag, frq=900e6)
+    temperature(id=id, temp=303)
+    frq.set(id=id, frq=900e6)
 
     # Back-calculate the data.
-    rdc.back_calc(tag)
-    pcs.back_calc(tag)
+    rdc.back_calc(id)
+    pcs.back_calc(id)
 
     # Set 1 Hz and 0.1 ppm errors on all data.
     for spin in spin_loop():
@@ -54,12 +54,18 @@
             spin.pcs_err = {}
 
         # Set the errors.
-        spin.rdc_err[tag] = 1.0
-        spin.pcs_err[tag] = 0.1
+        spin.rdc_err[id] = 1.0
+        spin.pcs_err[id] = 0.1
 
     # Write the data.
-    rdc.write(align_id=tag, file='rdc_%s.txt'%tensors[i], bc=True, 
force=True)
-    pcs.write(align_id=tag, file='pcs_%s.txt'%tensors[i], bc=True, 
force=True)
+    rdc.write(align_id=id, file='ave_pos_rdc_%s.txt'%id, bc=True, force=True)
+    pcs.write(align_id=id, file='ave_pos_pcs_%s.txt'%id, bc=True, force=True)
 
+# Calculate Q-factors.
+rdc.calc_q_factors()
+pcs.calc_q_factors()
+
+# Grace plot.
+file = open(
 # Store the state.
-state.save('back_calc', force=True)
+state.save('ave_pos_back_calc', force=True)




Related Messages


Powered by MHonArc, Updated Thu Dec 08 14:00:02 2011