mailr11255 - in /1.3: generic_fns/align_tensor.py prompt/align_tensor.py


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

Header


Content

Posted by edward on June 29, 2010 - 11:07:
Author: bugman
Date: Tue Jun 29 11:07:54 2010
New Revision: 11255

URL: http://svn.gna.org/viewcvs/relax?rev=11255&view=rev
Log:
Created the align_tensor.fix() user function for fixing the alignment tensor 
during optimisation.


Modified:
    1.3/generic_fns/align_tensor.py
    1.3/prompt/align_tensor.py

Modified: 1.3/generic_fns/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/align_tensor.py?rev=11255&r1=11254&r2=11255&view=diff
==============================================================================
--- 1.3/generic_fns/align_tensor.py (original)
+++ 1.3/generic_fns/align_tensor.py Tue Jun 29 11:07:54 2010
@@ -432,6 +432,20 @@
         print("\n\n\n")
 
 
+def fix(fixed=True):
+    """Fix the alignment tensor during optimisation.
+
+    @param fixed:   If True, the alignment tensor will be fixed during 
optimisation.  If False, the alignment tensors will be optimised.
+    @type fixed:    bool
+    """
+
+    # Test if the current data pipe exists.
+    pipes.test()
+
+    # Set the flag.
+    cdp.align_tensors.fixed = fixed
+
+
 def fold_angles(sim_index=None):
     """Wrap the Euler angles and remove the glide reflection and 
translational symmetries.
 

Modified: 1.3/prompt/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/align_tensor.py?rev=11255&r1=11254&r2=11255&view=diff
==============================================================================
--- 1.3/prompt/align_tensor.py (original)
+++ 1.3/prompt/align_tensor.py Tue Jun 29 11:07:54 2010
@@ -151,6 +151,28 @@
 
         # Execute the functional code.
         align_tensor.display(tensor=tensor)
+
+
+    def fix(self, fixed=True):
+        """Fix all alignment tensors so that they do not change during 
optimisation.
+
+        Keyword Arguments
+        ~~~~~~~~~~~~~~~~~
+
+        fixed:  The flag specifying if the tensors should be fixed or 
variable.
+        """
+
+        # Function intro text.
+        if self._exec_info.intro:
+            text = self._exec_info.ps3 + "align_tensor.fix("
+            text = text + "fixed=" + repr(fixed) + ")"
+            print(text)
+
+        # The argument checks.
+        arg_check.is_bool(fixed, 'fixed')
+
+        # Execute the functional code.
+        align_tensor.fix(fixed=fixed)
 
 
     def init(self, tensor=None, params=None, scale=1.0, angle_units='deg', 
param_types=0, errors=False):




Related Messages


Powered by MHonArc, Updated Tue Jun 29 11:20:01 2010