Author: bugman Date: Mon Apr 7 18:46:52 2008 New Revision: 5393 URL: http://svn.gna.org/viewcvs/relax?rev=5393&view=rev Log: Converted the open_pdb() function into a class method. 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=5393&r1=5392&r2=5393&view=diff ============================================================================== --- 1.3/generic_fns/pymol.py (original) +++ 1.3/generic_fns/pymol.py Mon Apr 7 18:46:52 2008 @@ -48,6 +48,24 @@ """Method for clearing the PyMOL command history.""" self.command_history = "" + + + def open_pdb(run=None): + """Function for opening the PDB file in PyMOL.""" + + # Argument. + if run: + self.run = run + + # Test if the pipe is open. + if not self.pipe_open_test(): + return + + # Reinitialise PyMOL. + self.pipe_write("reinitialize") + + # Open the PDB file. + self.pipe_write("load " + relax_data_store.pdb[self.run].file_name) def pipe_open(self): @@ -189,24 +207,6 @@ self.pipe_write(command) -def open_pdb(run=None): - """Function for opening the PDB file in PyMOL.""" - - # Argument. - if run: - self.run = run - - # Test if the pipe is open. - if not self.pipe_open_test(): - return - - # Reinitialise PyMOL. - self.pipe_write("reinitialize") - - # Open the PDB file. - self.pipe_write("load " + relax_data_store.pdb[self.run].file_name) - - def tensor_pdb(run=None, file=None): """Display the diffusion tensor geometric structure."""