mailr5420 - /1.3/prompt/structure.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 - 12:28:
Author: bugman
Date: Tue Apr  8 12:28:20 2008
New Revision: 5420

URL: http://svn.gna.org/viewcvs/relax?rev=5420&view=rev
Log:
Changed the force flag of the structure.create_diff_tensor_pdb() user 
function to a bool.


Modified:
    1.3/prompt/structure.py

Modified: 1.3/prompt/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/structure.py?rev=5420&r1=5419&r2=5420&view=diff
==============================================================================
--- 1.3/prompt/structure.py (original)
+++ 1.3/prompt/structure.py Tue Apr  8 12:28:20 2008
@@ -43,7 +43,7 @@
         self.__relax__ = relax
 
 
-    def create_diff_tensor_pdb(self, scale=1.8e-6, file='tensor.pdb', 
dir=None, force=0):
+    def create_diff_tensor_pdb(self, scale=1.8e-6, file='tensor.pdb', 
dir=None, force=False):
         """Create a PDB file to represent the diffusion tensor.
 
         Keyword Arguments
@@ -55,7 +55,7 @@
 
         dir:  The directory where the file is located.
 
-        force:  A flag which, if set to 1, will overwrite the any 
pre-existing file.
+        force:  A flag which, if set to True, will overwrite the any 
pre-existing file.
 
 
         Description
@@ -160,8 +160,8 @@
             raise RelaxNoneStrError, ('directory name', dir)
 
         # The force flag.
-        if type(force) != int or (force != 0 and force != 1):
-            raise RelaxBinError, ('force flag', force)
+        if type(force) != bool:
+            raise RelaxBoolError, ('force flag', force)
 
         # Execute the functional code.
         generic_fns.structure.geometric.create_diff_tensor_pdb(scale=scale, 
file=file, dir=dir, force=force)




Related Messages


Powered by MHonArc, Updated Tue Apr 08 14:20:11 2008