mailr7383 - /1.3/generic_fns/structure/scientific.py


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

Header


Content

Posted by edward on September 26, 2008 - 23:18:
Author: bugman
Date: Fri Sep 26 23:18:18 2008
New Revision: 7383

URL: http://svn.gna.org/viewcvs/relax?rev=7383&view=rev
Log:
Fixes for the Scientific structural object load_pdb() method.

The finding of previously loaded PDBs has been fixed.


Modified:
    1.3/generic_fns/structure/scientific.py

Modified: 1.3/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=7383&r1=7382&r2=7383&view=diff
==============================================================================
--- 1.3/generic_fns/structure/scientific.py (original)
+++ 1.3/generic_fns/structure/scientific.py Fri Sep 26 23:18:18 2008
@@ -476,7 +476,7 @@
 
         # Initial print out.
         if verbosity:
-            print "Scientific Python PDB parser.\n"
+            print "\nScientific Python PDB parser.\n"
 
         # Test if the file exists.
         if not access(file_path, F_OK):
@@ -491,15 +491,23 @@
         # Store the model number.
         self.model = model
 
-        # Use pointers (references) if the PDB data exists in another run.
-        for data_pipe in ds:
+        # Use pointers (references) if the PDB data exists in another data 
pipe.
+        for key in ds:
+            # Skip the current pipe.
+            if key == ds.current_pipe:
+                continue
+
+            # Get the data pipe.
+            data_pipe = ds[key]
+
+            # Structure already exists.
             if hasattr(data_pipe, 'structure') and 
data_pipe.structure.file[0] == expanded[1] and data_pipe.structure.model == 
model:
                 # Make a pointer to the data.
                 self.structural_data = data_pipe.structure.structural_data
 
                 # Print out.
                 if verbosity:
-                    print "Using the structures from the data pipe " + 
`data_pipe.pipe_name` + "."
+                    print "Using the structures from the data pipe " + `key` 
+ "."
                     for i in xrange(len(self.structural_data)):
                         print self.structural_data[i]
 




Related Messages


Powered by MHonArc, Updated Fri Sep 26 23:40:02 2008