mailr5381 - /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 April 07, 2008 - 18:16:
Author: bugman
Date: Mon Apr  7 18:16:24 2008
New Revision: 5381

URL: http://svn.gna.org/viewcvs/relax?rev=5381&view=rev
Log:
Updated the cartoon() function to the new relax design.


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=5381&r1=5380&r2=5381&view=diff
==============================================================================
--- 1.3/generic_fns/pymol.py (original)
+++ 1.3/generic_fns/pymol.py Mon Apr  7 18:16:24 2008
@@ -27,6 +27,7 @@
 # relax module imports.
 from data import Data as relax_data_store
 from relax_errors import RelaxError, RelaxImplementError, RelaxNoPipeError, 
RelaxNoSequenceError
+from relax_io import file_root
 
 
 class Pymol:
@@ -42,19 +43,16 @@
 
 
 
-def cartoon(run=None):
+def cartoon():
     """Apply the PyMOL cartoon style and colour by secondary structure."""
 
-    # Arguments.
-    self.run = run
-
-    # Test if the run exists.
-    if not self.run in relax_data_store.run_names:
-        raise RelaxNoPipeError, self.run
+    # Test if the current data pipe exists.
+    if not relax_data_store.current_pipe:
+        raise RelaxNoPipeError
 
     # Identifier.
-    pdb_file = relax_data_store.pdb[self.run].file_name
-    id = self.relax.IO.file_root(pdb_file)
+    pdb_file = 
relax_data_store[relax_data_store.current_pipe].structure.file_name()
+    id = file_root(pdb_file)
 
     # Hide everything.
     self.pipe_write("cmd.hide('everything'," + `id` + ")")




Related Messages


Powered by MHonArc, Updated Mon Apr 07 18:40:11 2008