mailr22657 - in /trunk: specific_analyses/frame_order/uf.py user_functions/frame_order.py


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

Header


Content

Posted by edward on April 07, 2014 - 11:49:
Author: bugman
Date: Mon Apr  7 11:49:27 2014
New Revision: 22657

URL: http://svn.gna.org/viewcvs/relax?rev=22657&view=rev
Log:
The frame_order.pivot user function can now be used to turn the pivot 
optimisation on and off.

If the pivot point is not given, this user function will now just set the 
fixed flag and nothing
else, allowing the optimisation status of a pre-set pivot to be changed.


Modified:
    trunk/specific_analyses/frame_order/uf.py
    trunk/user_functions/frame_order.py

Modified: trunk/specific_analyses/frame_order/uf.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/uf.py?rev=22657&r1=22656&r2=22657&view=diff
==============================================================================
--- trunk/specific_analyses/frame_order/uf.py   (original)
+++ trunk/specific_analyses/frame_order/uf.py   Mon Apr  7 11:49:27 2014
@@ -408,6 +408,13 @@
     # Test if the current data pipe exists.
     pipes.test()
 
+    # Store the fixed flag.
+    cdp.pivot_fixed = fix
+
+    # No pivot given, so quit.
+    if pivot == None:
+        return
+
     # Convert the pivot to a numpy array.
     pivot = array(pivot, float64)
 
@@ -423,9 +430,6 @@
 
         # Store the variable.
         setattr(cdp, name, pivot)
-
-    # Store the fixed flag.
-    cdp.pivot_fixed = fix
 
 
 def quad_int(flag=False):

Modified: trunk/user_functions/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/frame_order.py?rev=22657&r1=22656&r2=22657&view=diff
==============================================================================
--- trunk/user_functions/frame_order.py (original)
+++ trunk/user_functions/frame_order.py Mon Apr  7 11:49:27 2014
@@ -179,7 +179,8 @@
     py_type = "num_list",
     dim = 3,
     desc_short = "pivot point",
-    desc = "The pivot point for the motion (e.g. the position between the 2 
domains in PDB coordinates)."
+    desc = "The pivot point for the motion (e.g. the position between the 2 
domains in PDB coordinates).",
+    can_be_none = True
 )
 uf.add_keyarg(
     name = "order",
@@ -201,14 +202,17 @@
 # Description.
 uf.desc.append(Desc_container())
 uf.desc[-1].add_paragraph("This will set the pivot points for the two domain 
system within the PDB coordinate system.  This is required for interpreting 
PCS data as well as for the generation of cone or other PDB representations 
of the domain motions.")
+uf.desc[-1].add_paragraph("This user function can also be used to change the 
optimisation status of an already set pivot point.  By simply providing the 
fixed flag and not the pivot point values, the pivot can be changed to be 
either fixed during optimisation or that it will be optimised.")
 # Prompt examples.
 uf.desc.append(Desc_container("Prompt examples"))
 uf.desc[-1].add_paragraph("To set the pivot point, type one of:")
 uf.desc[-1].add_prompt("relax> frame_order.pivot([12.067, 14.313, -3.2675])")
 uf.desc[-1].add_prompt("relax> frame_order.pivot(pivot=[12.067, 14.313, 
-3.2675])")
+uf.desc[-1].add_paragraph("To change an already set and fixed pivot point so 
that it can now be optimised, type:")
+uf.desc[-1].add_prompt("relax> frame_order.pivot(fix=False)")
 uf.backend = pivot
 uf.menu_text = "&pivot"
-uf.wizard_size = (900, 500)
+uf.wizard_size = (900, 600)
 uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
 
 




Related Messages


Powered by MHonArc, Updated Mon Apr 07 13:20:02 2014