mailr4998 - /branches/N_state_model/prompt/n_state_model.py


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

Header


Content

Posted by edward on February 15, 2008 - 09:54:
Author: bugman
Date: Fri Feb 15 09:54:25 2008
New Revision: 4998

URL: http://svn.gna.org/viewcvs/relax?rev=4998&view=rev
Log:
Fixed the n_state_model.CoM() user function to allow the centre arg to be 
None.


Modified:
    branches/N_state_model/prompt/n_state_model.py

Modified: branches/N_state_model/prompt/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/prompt/n_state_model.py?rev=4998&r1=4997&r2=4998&view=diff
==============================================================================
--- branches/N_state_model/prompt/n_state_model.py (original)
+++ branches/N_state_model/prompt/n_state_model.py Fri Feb 15 09:54:25 2008
@@ -103,13 +103,14 @@
                 raise RelaxListNumError, ('pivot point', pivot_point)
 
         # CoM argument.
-        if type(centre) != list:
-            raise RelaxListError, ('centre of mass', centre)
-        if len(centre) != 3:
-            raise RelaxLenError, ('centre of mass', 3)
-        for i in xrange(len(centre)):
-            if type(centre[i]) != int and type(centre[i]) != float:
-                raise RelaxListNumError, ('centre of mass', centre)
+        if centre != None:
+            if type(centre) != list:
+                raise RelaxListError, ('centre of mass', centre)
+            if len(centre) != 3:
+                raise RelaxLenError, ('centre of mass', 3)
+            for i in xrange(len(centre)):
+                if type(centre[i]) != int and type(centre[i]) != float:
+                    raise RelaxListNumError, ('centre of mass', centre)
 
         # Execute the functional code.
         n_state_model_obj.CoM(pivot_point=pivot_point, centre=centre)




Related Messages


Powered by MHonArc, Updated Fri Feb 15 10:00:33 2008