mailr6298 - /1.3/specific_fns/model_free/results.py


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

Header


Content

Posted by edward on May 28, 2008 - 23:56:
Author: bugman
Date: Wed May 28 23:56:54 2008
New Revision: 6298

URL: http://svn.gna.org/viewcvs/relax?rev=6298&view=rev
Log:
Renamed read_columnar_pdb() to __load_structure() and converted to the new 
design.


Modified:
    1.3/specific_fns/model_free/results.py

Modified: 1.3/specific_fns/model_free/results.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/results.py?rev=6298&r1=6297&r2=6298&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/results.py (original)
+++ 1.3/specific_fns/model_free/results.py Wed May 28 23:56:54 2008
@@ -743,21 +743,32 @@
                 spin.fixed = mf_fixed
 
 
-    def read_columnar_pdb(self, verbosity=1):
-        """Function for reading the PDB file."""
+    def __load_structure(self, spin_line, col, verbosity=1):
+        """Load the structure back into the current data pipe.
+
+        @param spin_line:   The line of data for a single spin.
+        @type spin_line:    list of str
+        @param col:         The column indecies.
+        @type col:          dict of int
+        @keyword verbosity: A variable specifying the amount of information 
to print.  The higher
+                            the value, the greater the verbosity.
+        @type verbosity:    int
+        @return:            True if the structure was loaded, False 
otherwise.
+        @rtype:             bool
+        """
 
         # File name.
-        pdb = self.file_line[col['pdb']]
+        pdb = spin_line[col['pdb']]
 
         # PDB model.
-        pdb_model = eval(self.file_line[col['pdb_model']])
+        pdb_model = eval(spin_line[col['pdb_model']])
 
         # Read the PDB file (if it exists).
         if not pdb == 'None':
-            self.relax.generic.structure.read_pdb(run=self.run, file=pdb, 
model=pdb_model, fail=0, verbosity=verbosity)
-            return 1
+            generic_fns.structure.main.read_pdb(file=pdb, model=pdb_model, 
fail=False, verbosity=verbosity)
+            return True
         else:
-            return 0
+            return False
 
 
     def read_columnar_relax_data(self):
@@ -928,7 +939,7 @@
 
             # PDB.
             if not pdb:
-                if self.read_columnar_pdb(verbosity):
+                if self.__load_structure(file_line, col, verbosity):
                     pdb = True
 
             # XH vector, heteronucleus, and proton.




Related Messages


Powered by MHonArc, Updated Thu May 29 00:20:21 2008