mailr5405 - /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 08, 2008 - 10:40:
Author: bugman
Date: Tue Apr  8 10:40:18 2008
New Revision: 5405

URL: http://svn.gna.org/viewcvs/relax?rev=5405&view=rev
Log:
Updated the tensor_pdb() 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=5405&r1=5404&r2=5405&view=diff
==============================================================================
--- 1.3/generic_fns/pymol.py (original)
+++ 1.3/generic_fns/pymol.py Tue Apr  8 10:40:18 2008
@@ -223,53 +223,57 @@
         pymol.pipe_write(command)
 
 
-def tensor_pdb(run=None, file=None):
-    """Display the diffusion tensor geometric structure."""
-
-    # Arguments.
-    self.run = run
-
-    # Test if the run exists.
-    if not self.run in relax_data_store.run_names:
-        raise RelaxNoPipeError, self.run
+def tensor_pdb(file=None):
+    """Display the diffusion tensor geometric structure.
+
+    @keyword file:  The name of the file containing the diffusion tensor 
geometric object.
+    @type file:     str
+    """
+
+    # Test if the current data pipe exists.
+    if not relax_data_store.current_pipe:
+        raise RelaxNoPipeError
+
+    # The file root.
+    id = file_root(pdb_file)
 
     # Read in the tensor PDB file.
-    self.pipe_write("load " + file)
+    pymol.pipe_write("load " + id)
 
 
     # Centre of mass.
     #################
 
     # Select the COM residue.
-    self.pipe_write("select resn COM")
+    pymol.pipe_write("select resn COM")
 
     # Show the centre of mass as the dots representation.
-    self.pipe_write("show dots, 'sele'")
+    pymol.pipe_write("show dots, 'sele'")
 
     # Colour it blue.
-    self.pipe_write("color blue, 'sele'")
+    pymol.pipe_write("color blue, 'sele'")
 
 
     # The diffusion tensor axes.
     ############################
 
     # Select the AXS residue.
-    self.pipe_write("select resn AXS")
+    pymol.pipe_write("select resn AXS")
 
     # Hide everything.
-    self.pipe_write("hide ('sele')")
+    pymol.pipe_write("hide ('sele')")
 
     # Show as 'sticks'.
-    self.pipe_write("show sticks, 'sele'")
+    pymol.pipe_write("show sticks, 'sele'")
 
     # Colour it cyan.
-    self.pipe_write("color cyan, 'sele'")
+    pymol.pipe_write("color cyan, 'sele'")
 
     # Select the N atoms of the AXS residue (used to display the axis 
labels).
-    self.pipe_write("select (resn AXS and elem N)")
+    pymol.pipe_write("select (resn AXS and elem N)")
 
     # Label the atoms.
-    self.pipe_write("label 'sele', name")
+    pymol.pipe_write("label 'sele', name")
 
 
 
@@ -277,17 +281,17 @@
     ##########################
 
     # Select the SIM residue.
-    self.pipe_write("select resn SIM")
+    pymol.pipe_write("select resn SIM")
 
     # Colour it.
-    self.pipe_write("colour cyan, 'sele'")
+    pymol.pipe_write("colour cyan, 'sele'")
 
 
     # Clean up.
     ###########
 
     # Remove the selection.
-    self.pipe_write("cmd.delete('sele')")
+    pymol.pipe_write("cmd.delete('sele')")
 
 
 def vector_dist(run=None, file=None):




Related Messages


Powered by MHonArc, Updated Tue Apr 08 11:00:07 2008