Author: bugman Date: Wed Dec 7 18:04:11 2011 New Revision: 15046 URL: http://svn.gna.org/viewcvs/relax?rev=15046&view=rev Log: The frame_order.pivot user function now accepts the fix argument to allow the pivot to be fixed. This is for optimisation. Modified: branches/frame_order_testing/prompt/frame_order.py branches/frame_order_testing/specific_fns/frame_order.py Modified: branches/frame_order_testing/prompt/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/prompt/frame_order.py?rev=15046&r1=15045&r2=15046&view=diff ============================================================================== --- branches/frame_order_testing/prompt/frame_order.py (original) +++ branches/frame_order_testing/prompt/frame_order.py Wed Dec 7 18:04:11 2011 @@ -138,7 +138,7 @@ frame_order_obj._domain_to_pdb(domain=domain, pdb=pdb) - def pivot(self, pivot=None): + def pivot(self, pivot=None, fix=False): """Set the pivot point for the two body motion in the structural coordinate system. Keyword Arguments @@ -147,6 +147,8 @@ pivot: The pivot point for the motion (e.g. the position between the 2 domains in PDB coordinates). + fix: A flag specifying if the pivot point should be fixed during optimisation. + Examples ~~~~~~~~ @@ -160,14 +162,16 @@ # Function intro text. if self._exec_info.intro: text = self._exec_info.ps3 + "frame_order.pivot(" - text = text + "pivot=" + repr(pivot) + ")" + text = text + "pivot=" + repr(pivot) + text = text + ", fix=" + repr(fix) + ")" print(text) # The argument checks. arg_check.is_num_list(pivot, 'pivot point', size=3) - - # Execute the functional code. - frame_order_obj._pivot(pivot=pivot) + arg_check.is_bool(fix, 'fix flag') + + # Execute the functional code. + frame_order_obj._pivot(pivot=pivot, fix=fix) def ref_domain(self, ref=None): Modified: branches/frame_order_testing/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/frame_order.py?rev=15046&r1=15045&r2=15046&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/frame_order.py (original) +++ branches/frame_order_testing/specific_fns/frame_order.py Wed Dec 7 18:04:11 2011 @@ -935,19 +935,21 @@ return num - def _pivot(self, pivot=None): + def _pivot(self, pivot=None, fix=None): """Set the pivot point for the 2 body motion. - @param pivot: The pivot point of the two bodies (domains, etc.) in the structural - coordinate system. + @keyword pivot: The pivot point of the two bodies (domains, etc.) in the structural coordinate system. @type pivot: list of num + @keyword fix: A flag specifying if the pivot point should be fixed during optimisation. + @type fix: bool """ # Test if the current data pipe exists. pipes.test() - # Set the pivot point. + # Set the pivot point and fixed flag. cdp.pivot = pivot + cdp.pivot_fixed = fix # Convert to floats. for i in range(3):