mailr4611 - /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 January 10, 2008 - 17:48:
Author: bugman
Date: Thu Jan 10 17:48:28 2008
New Revision: 4611

URL: http://svn.gna.org/viewcvs/relax?rev=4611&view=rev
Log:
Implemented the interface of the n_state_model.set_type() user function.


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=4611&r1=4610&r2=4611&view=diff
==============================================================================
--- branches/N_state_model/prompt/n_state_model.py (original)
+++ branches/N_state_model/prompt/n_state_model.py Thu Jan 10 17:48:28 2008
@@ -87,4 +87,47 @@
         n_state_model.set_domain(tensor=tensor, domain=domain)
 
 
+    def set_type(self, tensor=None, red=False):
+        """Set whether the alignment tensor is the full or reduced tensor.
 
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        tensor:  The alignment tensor identification string.
+
+        red:  The state of the alignment tensor.  If True, then it is 
labelled as the full tensor.
+        If False, then it is labelled as the tensor reduced because of 
domain motions.
+
+
+        Description
+        ~~~~~~~~~~~
+
+        Prior to optimisation of the N-state model the state of alignment 
tensor, whether it is the
+        full or reduced tensor, must be set using this user function.
+
+
+        Examples
+        ~~~~~~~~
+
+        To state that the alignment tensor loaded as 'chi3 C-dom' is the 
reduced tensor, type:
+
+        relax> n_state_model.set_type(tensor='chi3 C-dom', red=True)
+        """
+
+        # Function intro text.
+        if self.__relax__.interpreter.intro:
+            text = sys.ps3 + "n_state_model.set_type("
+            text = text + "tensor=" + `tensor`
+            text = text + ", red=" + `red` + ")"
+            print text
+
+        # Tensor argument.
+        if type(tensor) != str:
+            raise RelaxStrError, ('tensor', tensor)
+
+        # Red argument.
+        if type(red) != bool:
+            raise RelaxBoolError, ('red', red)
+
+        # Execute the functional code.
+        n_state_model.set_type(tensor=tensor, red=red)




Related Messages


Powered by MHonArc, Updated Thu Jan 10 18:00:25 2008