mailr8655 - in /branches/ave_noe/generic_fns: noesy.py xplor.py


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

Header


Content

Posted by edward on January 26, 2009 - 18:44:
Author: bugman
Date: Mon Jan 26 18:44:13 2009
New Revision: 8655

URL: http://svn.gna.org/viewcvs/relax?rev=8655&view=rev
Log:
Shifted the checks of the atom id strings from the Xplor parser to the NOE 
restraint reading fn.


Modified:
    branches/ave_noe/generic_fns/noesy.py
    branches/ave_noe/generic_fns/xplor.py

Modified: branches/ave_noe/generic_fns/noesy.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/ave_noe/generic_fns/noesy.py?rev=8655&r1=8654&r2=8655&view=diff
==============================================================================
--- branches/ave_noe/generic_fns/noesy.py (original)
+++ branches/ave_noe/generic_fns/noesy.py Mon Jan 26 18:44:13 2009
@@ -29,7 +29,7 @@
 
 # relax module imports.
 from generic_fns import pipes
-from generic_fns.mol_res_spin import exists_mol_res_spin_data
+from generic_fns.mol_res_spin import exists_mol_res_spin_data, return_spin
 from generic_fns.xplor import parse_noe_restraints
 from relax_errors import RelaxNoSequenceError
 from relax_io import open_read_file
@@ -112,3 +112,10 @@
     # Parse and extract the NOE restraints.
     if format == 'xplor':
         cdp.noe_restraints = parse_noe_restraints(lines)
+
+    # Check for the presence of the spin containers corresponding to the 
atom ids.
+    for restraint in cdp.noe_restraints:
+        if not return_spin(restraint[0]):
+            raise RelaxError, "The spin container corresponding to '%s' 
cannot be found." % restraint[0]
+        if not return_spin(restraint[1]):
+            raise RelaxError, "The spin container corresponding to '%s' 
cannot be found." % restraint[1]

Modified: branches/ave_noe/generic_fns/xplor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/ave_noe/generic_fns/xplor.py?rev=8655&r1=8654&r2=8655&view=diff
==============================================================================
--- branches/ave_noe/generic_fns/xplor.py (original)
+++ branches/ave_noe/generic_fns/xplor.py Mon Jan 26 18:44:13 2009
@@ -120,10 +120,7 @@
                 atom = atom + lines[line_index][char_index]
 
             # Convert the atom data to a relax atom id.
-            relax_id = __convert_to_id(atom)
-            data[-1][0] = relax_id
-            if not return_spin(relax_id):
-                raise RelaxError, "The spin container corresponding to '%s' 
(or '%s' in Xplor format) cannot be found." % (relax_id, atom)
+            data[-1][0] = __convert_to_id(atom)
 
             # Extract the second atom string.
             atom = ''
@@ -152,10 +149,7 @@
                 atom = atom + lines[line_index][char_index]
 
             # Convert the atom data to a relax atom id.
-            relax_id = __convert_to_id(atom)
-            data[-1][1] = relax_id
-            if not return_spin(relax_id):
-                raise RelaxError, "The spin container corresponding to '%s' 
(or '%s' in Xplor format) cannot be found." % (relax_id, atom)
+            data[-1][1] = __convert_to_id(atom)
 
             # The rest of the data (NOE restraint info).
             info = split(lines[line_index][char_index+1:])




Related Messages


Powered by MHonArc, Updated Mon Jan 26 22:40:03 2009