mailr17067 - /branches/interatomic/test_suite/shared_data/align_data/population_model/


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

Header


Content

Posted by edward on June 27, 2012 - 09:59:
Author: bugman
Date: Wed Jun 27 09:59:41 2012
New Revision: 17067

URL: http://svn.gna.org/viewcvs/relax?rev=17067&view=rev
Log:
Converted the population model RDC test data to the interatomic data design.

The RDC lists now consist of the two spin ID columns and a data column.


Modified:
    
branches/interatomic/test_suite/shared_data/align_data/population_model/generate.py
    
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_0
    
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_2
    
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_3

Modified: 
branches/interatomic/test_suite/shared_data/align_data/population_model/generate.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/shared_data/align_data/population_model/generate.py?rev=17067&r1=17066&r2=17067&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/shared_data/align_data/population_model/generate.py
 (original)
+++ 
branches/interatomic/test_suite/shared_data/align_data/population_model/generate.py
 Wed Jun 27 09:59:41 2012
@@ -8,7 +8,8 @@
 from re import search
 
 # relax imports.
-from generic_fns.mol_res_spin import spin_loop
+from generic_fns.interatomic import interatomic_loop
+from generic_fns.mol_res_spin import return_spin, spin_loop
 from status import Status; status = Status()
 
 
@@ -33,8 +34,15 @@
 deselect.spin(spin_id=':UNK@H17')
 deselect.spin(spin_id=':UNK@H18')
 
-# Load the CH vectors for the C atoms.
-structure.vectors(spin_id='@C*', attached='H*', ave=False)
+# Load the CH vectors.
+dipole_pair.define(spin_id1='@C*', spin_id2='@H*', direct_bond=True)
+dipole_pair.unit_vectors(ave=False)
+
+# Deselect the CH2 carbon-proton pairs.
+deselect.interatom(spin_id1=':UNK@C6', spin_id2=':UNK@H6')
+deselect.interatom(spin_id1=':UNK@C6', spin_id2=':UNK@H7')
+deselect.interatom(spin_id1=':UNK@C12', spin_id2=':UNK@H17')
+deselect.interatom(spin_id1=':UNK@C12', spin_id2=':UNK@H18')
 
 # Init the alignment tensors.
 A_5D = []
@@ -152,39 +160,40 @@
         continue
 
     # Header.
-    out.write('%-10s %-10s %-10s %-10s %-10s %20s\n' % ('mol_name', 
'res_num', 'res_name', 'spin.num', 'spin.name', 'rdc'))
+    out.write('# %-18s %-20s %20s\n' % ('spin_id1', 'spin_id2', 'rdc'))
 
-    # Loop over the spins.
-    for spin, mol_name, res_num, res_name in spin_loop(full_info=True):
-        # Skip protons.
-        if spin.element == 'H':
+    # Loop over the interatomic data.
+    for interatom in interatomic_loop():
+        # Deselected containers.
+        if not interatom.select:
             continue
 
-        # Skip spin.
+        # Get the spins.
+        spin1 = return_spin(interatom.spin_id1)
+        spin2 = return_spin(interatom.spin_id2)
+
+        # Skip.
         skip = False
         for j in range(len(missing[i])):
-            if missing[i][j][1] == '*' and res_num == missing[i][j][0]:
+            if missing[i][j][1] == '*' and spin1._res_num == 
missing[i][j][0]:
                 skip = True
-            elif res_num == missing[i][j][0] and spin.name == 
missing[i][j][1]:
+            elif res_num == missing[i][j][0] and spin1.name == 
missing[i][j][1]:
                 skip = True
         if skip:
             continue
 
         # No vector.
-        if not hasattr(spin, 'xh_vect'):
+        if not hasattr(interatom, 'vector'):
             continue
 
         # Loop over the states.
         rdc_full = 0.0
         for j in range(len(pops)):
-            # Unit vector.
-            unit = spin.xh_vect[j] / norm(spin.xh_vect[j])
-
             # Calculate the RDC.
-            rdc = const * dot(unit, dot(A[i], unit))
+            rdc = const * dot(interatom.vector[j], dot(A[i], 
interatom.vector[j]))
 
             # Add to the full RDC.
             rdc_full = rdc_full  +  pops[j] * rdc
 
         # Output the rdc.
-        out.write('%-10s %-10s %-10s %-10s %-10s %20s\n' % (mol_name, 
res_num, res_name, spin.num, spin.name, rdc_full))
+        out.write('%-20s %-20s %20s\n' % (interatom.spin_id1, 
interatom.spin_id2, rdc_full))

Modified: 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_0
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_0?rev=17067&r1=17066&r2=17067&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_0
 (original)
+++ 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_0
 Wed Jun 27 09:59:41 2012
@@ -1,10 +1,10 @@
-mol_name   res_num    res_name   spin.num   spin.name                   rdc
-LE         900        UNK        1          C1               -8.99008059436
-LE         900        UNK        2          C2               -11.1727013693
-LE         900        UNK        3          C3               -12.7645493632
-LE         900        UNK        4          C4               -25.6305124864
-LE         900        UNK        13         C7               -45.4329078085
-LE         900        UNK        14         C8               -45.6507371723
-LE         900        UNK        15         C9                -43.883378626
-LE         900        UNK        16         C10              -36.2358839976
-LE         900        UNK        17         C11              -43.6585501407
+# spin_id1           spin_id2                              rdc
+#LE:900@C1           #LE:900@H1                 -8.99008059436
+#LE:900@C2           #LE:900@H2                 -11.1727013693
+#LE:900@C3           #LE:900@H3                 -12.7645493632
+#LE:900@C4           #LE:900@H4                 -25.6305124864
+#LE:900@C7           #LE:900@H12                -45.4329078085
+#LE:900@C8           #LE:900@H13                -45.6507371723
+#LE:900@C9           #LE:900@H14                 -43.883378626
+#LE:900@C10          #LE:900@H15                -36.2358839976
+#LE:900@C11          #LE:900@H16                -43.6585501407

Modified: 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_2
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_2?rev=17067&r1=17066&r2=17067&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_2
 (original)
+++ 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_2
 Wed Jun 27 09:59:41 2012
@@ -1,10 +1,10 @@
-mol_name   res_num    res_name   spin.num   spin.name                   rdc
-LE         900        UNK        1          C1              0.0558217781223
-LE         900        UNK        2          C2              0.0749776961711
-LE         900        UNK        3          C3              0.0205783203822
-LE         900        UNK        4          C4              0.0412213151059
-LE         900        UNK        13         C7              0.0222255415748
-LE         900        UNK        14         C8              0.0196998835613
-LE         900        UNK        15         C9              0.0292391050148
-LE         900        UNK        16         C10             0.0735146554972
-LE         900        UNK        17         C11             0.0267010276098
+# spin_id1           spin_id2                              rdc
+#LE:900@C1           #LE:900@H1                0.0558217781223
+#LE:900@C2           #LE:900@H2                0.0749776961711
+#LE:900@C3           #LE:900@H3                0.0205783203822
+#LE:900@C4           #LE:900@H4                0.0412213151059
+#LE:900@C7           #LE:900@H12               0.0222255415748
+#LE:900@C8           #LE:900@H13               0.0196998835613
+#LE:900@C9           #LE:900@H14               0.0292391050148
+#LE:900@C10          #LE:900@H15               0.0735146554972
+#LE:900@C11          #LE:900@H16               0.0267010276098

Modified: 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_3
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_3?rev=17067&r1=17066&r2=17067&view=diff
==============================================================================
--- 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_3
 (original)
+++ 
branches/interatomic/test_suite/shared_data/align_data/population_model/missing_rdc_3
 Wed Jun 27 09:59:41 2012
@@ -1,9 +1,9 @@
-mol_name   res_num    res_name   spin.num   spin.name                   rdc
-LE         900        UNK        1          C1                24.7282064343
-LE         900        UNK        2          C2                24.9197912176
-LE         900        UNK        3          C3                27.8993003775
-LE         900        UNK        4          C4               0.948535173994
-LE         900        UNK        13         C7                2.09456125408
-LE         900        UNK        14         C8                6.74141169982
-LE         900        UNK        15         C9                8.69255563861
-LE         900        UNK        17         C11              -2.24181940515
+# spin_id1           spin_id2                              rdc
+#LE:900@C1           #LE:900@H1                  24.7282064343
+#LE:900@C2           #LE:900@H2                  24.9197912176
+#LE:900@C3           #LE:900@H3                  27.8993003775
+#LE:900@C4           #LE:900@H4                 0.948535173994
+#LE:900@C7           #LE:900@H12                 2.09456125408
+#LE:900@C8           #LE:900@H13                 6.74141169982
+#LE:900@C9           #LE:900@H14                 8.69255563861
+#LE:900@C11          #LE:900@H16                -2.24181940515




Related Messages


Powered by MHonArc, Updated Wed Jun 27 10:20:02 2012