mailr2609 - /1.3/generic_fns/pdb.py


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

Header


Content

Posted by edward on October 07, 2006 - 19:38:
Author: bugman
Date: Sat Oct  7 19:37:56 2006
New Revision: 2609

URL: http://svn.gna.org/viewcvs/relax?rev=2609&view=rev
Log:
Fix for bug #7335 (https://gna.org/bugs/index.php?7335).

The code which tests that the proton and heteronucleus have not been set to 
the same atom name has
been moved from the 'self.read()' function to the 'self.vectors()' function.  
Two more lines of
code, which were placing the atom names into the 'self.relax.data.pdb' data 
structure were also
identified to cause similar problems and were shifted from the read to the 
vectors function.


Modified:
    1.3/generic_fns/pdb.py

Modified: 1.3/generic_fns/pdb.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pdb.py?rev=2609&r1=2608&r2=2609&view=diff
==============================================================================
--- 1.3/generic_fns/pdb.py (original)
+++ 1.3/generic_fns/pdb.py Sat Oct  7 19:37:56 2006
@@ -152,10 +152,6 @@
                 warn(RelaxNoPDBFileWarning(self.file_path))
                 return
 
-        # Test that the nuclei have been correctly set.
-        if self.heteronuc == self.proton:
-            raise RelaxError, "The proton and heteronucleus are set to the 
same atom."
-
 
         # Data creation.
         ################
@@ -168,10 +164,6 @@
 
         # Model.
         self.relax.data.pdb[self.run].model = model
-
-        # Nuclei.
-        self.relax.data.pdb[self.run].proton = proton
-        self.relax.data.pdb[self.run].heteronuc = heteronuc
 
 
         # Load the structures.
@@ -227,9 +219,17 @@
             except:
                 raise RelaxRegExpError, ('residue name', name)
 
+        # Test that the nuclei have been correctly set.
+        if self.heteronuc == self.proton:
+            raise RelaxError, "The proton and heteronucleus are set to the 
same atom."
+
         # Print out.
         if self.print_flag:
             print "\nCalculating unit XH vectors.\n"
+
+        # Nuclei.
+        self.relax.data.pdb[self.run].proton = proton
+        self.relax.data.pdb[self.run].heteronuc = heteronuc
 
         # Number of structures.
         num_str = len(self.relax.data.pdb[self.run].structures)




Related Messages


Powered by MHonArc, Updated Sat Oct 07 20:00:05 2006