mailr8108 - /1.3/generic_fns/pymol.py


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

Header


Content

Posted by edward on December 03, 2008 - 21:10:
Author: bugman
Date: Wed Dec  3 21:10:26 2008
New Revision: 8108

URL: http://svn.gna.org/viewcvs/relax?rev=8108&view=rev
Log:
Bug fixes for the PyMOL open_pdb() method.

This method was not handling the structural object properly.


Modified:
    1.3/generic_fns/pymol.py

Modified: 1.3/generic_fns/pymol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pymol.py?rev=8108&r1=8107&r2=8108&view=diff
==============================================================================
--- 1.3/generic_fns/pymol.py (original)
+++ 1.3/generic_fns/pymol.py Wed Dec  3 21:10:26 2008
@@ -24,7 +24,7 @@
 """Module for interfacing with PyMOL."""
 
 # Python module imports.
-from os import popen
+from os import popen, sep
 from string import split
 
 # relax module imports.
@@ -71,8 +71,15 @@
         # Reinitialise PyMOL.
         self.pipe_write("reinitialize")
 
-        # Open the PDB file.
-        self.pipe_write("load " + cdp.structure.file_name)
+        # Open the PDB files.
+        for i in xrange(cdp.structure.num):
+            # The file path.
+            file = cdp.structure.file[i]
+            if cdp.structure.path[i]:
+                file = cdp.structure.path[i] + sep + file
+
+            # Open the file in PyMOL.
+            self.pipe_write("load " + file)
 
 
     def pipe_open(self):




Related Messages


Powered by MHonArc, Updated Wed Dec 03 23:40:04 2008