mailr9155 - /branches/frame_order/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 June 25, 2009 - 16:02:
Author: bugman
Date: Thu Jun 25 16:02:26 2009
New Revision: 9155

URL: http://svn.gna.org/viewcvs/relax?rev=9155&view=rev
Log:
Added a test for a loaded structure to the pymol.cartoon() user function.


Modified:
    branches/frame_order/generic_fns/pymol.py

Modified: branches/frame_order/generic_fns/pymol.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/generic_fns/pymol.py?rev=9155&r1=9154&r2=9155&view=diff
==============================================================================
--- branches/frame_order/generic_fns/pymol.py (original)
+++ branches/frame_order/generic_fns/pymol.py Thu Jun 25 16:02:26 2009
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2006-2008 Edward d'Auvergne                                  
 #
+# Copyright (C) 2006-2009 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -29,7 +29,7 @@
 # relax module imports.
 from generic_fns.mol_res_spin import exists_mol_res_spin_data
 from generic_fns import pipes
-from relax_errors import RelaxError, RelaxNoSequenceError
+from relax_errors import RelaxError, RelaxNoPdbError, RelaxNoSequenceError
 from relax_io import file_root, open_write_file, test_binary
 from specific_fns.setup import get_specific_fn
 
@@ -162,6 +162,10 @@
 
     # Get the current data pipe.
     cdp = pipes.get_pipe()
+
+    # Test for the structure.
+    if not hasattr(cdp, 'structure'):
+        raise RelaxNoPdbError
 
     # Loop over the PDB files.
     open_files = []




Related Messages


Powered by MHonArc, Updated Thu Jun 25 16:40:03 2009