mailr7056 - /1.3/generic_fns/vmd.py


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

Header


Content

Posted by edward on August 01, 2008 - 12:09:
Author: bugman
Date: Fri Aug  1 11:08:51 2008
New Revision: 7056

URL: http://svn.gna.org/viewcvs/relax?rev=7056&view=rev
Log:
Converted the VMD class methods into module functions.


Modified:
    1.3/generic_fns/vmd.py

Modified: 1.3/generic_fns/vmd.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/vmd.py?rev=7056&r1=7055&r2=7056&view=diff
==============================================================================
--- 1.3/generic_fns/vmd.py (original)
+++ 1.3/generic_fns/vmd.py Fri Aug  1 11:08:51 2008
@@ -35,35 +35,24 @@
 from relax_errors import RelaxNoPdbError
 
 
-# The relax data storage object.
+def view(self, run):
+    """Function for viewing the collection of molecules using VMD."""
 
+    # Test if the module is available.
+    if not module_avail:
+        print "VMD is not available (cannot import 
Scientific.Visualization.VMD due to missing Numeric dependency)."
+        return
 
+    # Test if the PDB file has been loaded.
+    if not ds.pdb.has_key(run):
+        raise RelaxNoPdbError, run
 
-class Vmd:
-    def __init__(self, relax):
-        """Class containing the functions for viewing molecules."""
+    # Create an empty scene.
+    ds.vmd_scene = VMD.Scene()
 
-        self.relax = relax
+    # Add the molecules to the scene.
+    for i in xrange(len(ds.pdb[run].structures)):
+        ds.vmd_scene.addObject(VMD.Molecules(ds.pdb[run].structures[i]))
 
-
-    def view(self, run):
-        """Function for viewing the collection of molecules using VMD."""
-
-        # Test if the module is available.
-        if not module_avail:
-            print "VMD is not available (cannot import 
Scientific.Visualization.VMD due to missing Numeric dependency)."
-            return
-
-        # Test if the PDB file has been loaded.
-        if not ds.pdb.has_key(run):
-            raise RelaxNoPdbError, run
-
-        # Create an empty scene.
-        ds.vmd_scene = VMD.Scene()
-
-        # Add the molecules to the scene.
-        for i in xrange(len(ds.pdb[run].structures)):
-            ds.vmd_scene.addObject(VMD.Molecules(ds.pdb[run].structures[i]))
-
-        # View the scene.
-        ds.vmd_scene.view()
+    # View the scene.
+    ds.vmd_scene.view()




Related Messages


Powered by MHonArc, Updated Fri Aug 01 14:00:14 2008