mailr2708 - /branches/tensor_pdb/generic_fns/pymol.py


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

Header


Content

Posted by edward . dauvergne on October 31, 2006 - 08:57:
Author: bugman
Date: Tue Oct 31 08:57:07 2006
New Revision: 2708

URL: http://svn.gna.org/viewcvs/relax?rev=2708&view=rev
Log:
The 'pymol.view()' user function now works.

A number of calls to pipes located at 'self.relax.data.molmol' where changed 
to
'self.relax.data.pymol'.  The Molmol 'InitAll' and loading functions where 
changed to the PyMOL
equivalents.  Now PyMOL executes and opens up the PDB file.


Modified:
    branches/tensor_pdb/generic_fns/pymol.py

Modified: branches/tensor_pdb/generic_fns/pymol.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/tensor_pdb/generic_fns/pymol.py?rev=2708&r1=2707&r2=2708&view=diff
==============================================================================
--- branches/tensor_pdb/generic_fns/pymol.py (original)
+++ branches/tensor_pdb/generic_fns/pymol.py Tue Oct 31 08:57:07 2006
@@ -95,7 +95,7 @@
 
 
     def open_pdb(self, run=None):
-        """Function for opening the PDB file in Molmol."""
+        """Function for opening the PDB file in PyMOL."""
 
         # Argument.
         if run:
@@ -105,11 +105,11 @@
         if not self.pipe_open_test():
             return
 
-        # Run InitAll to remove everything from molmol.
-        self.pipe_write("InitAll yes")
-
-        # Open the PDB.
-        self.pipe_write("ReadPdb " + self.relax.data.pdb[self.run].file_name)
+        # Reinitialise PyMOL.
+        self.pipe_write("reinitialise")
+
+        # Open the PDB file.
+        self.pipe_write("load " + self.relax.data.pdb[self.run].file_name)
 
 
     def pipe_open(self):
@@ -140,7 +140,7 @@
 
         # Test if the pipe has been broken.
         try:
-            self.relax.data.molmol.write('\n')
+            self.relax.data.pymol.write('\n')
         except IOError:
             return 0
 
@@ -159,7 +159,7 @@
             self.pipe_open()
 
         # Write the command to the pipe.
-        self.relax.data.molmol.write(command + '\n')
+        self.relax.data.pymol.write(command + '\n')
 
         # Place the command in the command history.
         if store_command:




Related Messages


Powered by MHonArc, Updated Tue Oct 31 09:20:05 2006