mailr24823 - /branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py


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

Header


Content

Posted by edward on July 30, 2014 - 12:22:
Author: bugman
Date: Wed Jul 30 12:22:43 2014
New Revision: 24823

URL: http://svn.gna.org/viewcvs/relax?rev=24823&view=rev
Log:
Added linear constraints for the pivot and average domain translation frame 
order parameters.

The pivot coordinates are constrained between -999 and 999 Angstrom and the 
translation between -500
and 500 Angstrom.  This allows the frame_order.pdb_model user function to 
operate in the case of
failed models - often the free rotors fitting to torsionally restricted data 
- by preventing the PDB
coordinates from being out of the PDB format range.  It should also speed up 
optimisation by
stopping the optimisation of failed models earlier.


Modified:
    branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py

Modified: 
branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py?rev=24823&r1=24822&r2=24823&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py  
  (original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/parameters.py  
  Wed Jul 30 12:22:43 2014
@@ -90,7 +90,16 @@
         -0.125 <= S <= 1,
         0 <= sigma_max <= pi,
 
-    The pivot point parameter, domain position parameters, and eigenframe 
parameters are unconstrained.
+    The pivot point and average domain position parameter constraints are::
+
+        -999 <= pivot_x <= 999
+        -999 <= pivot_y <= 999
+        -999 <= pivot_z <= 999
+        -500 <= ave_pos_x <= 500
+        -500 <= ave_pos_y <= 500
+        -500 <= ave_pos_y <= 500
+    
+    These are necessary to allow for valid PDB representations to be 
created.  The eigenframe parameters are unconstrained.
 
 
     Matrix notation
@@ -120,6 +129,32 @@
         |               |                        |        |
         | 0  0  0  0 -1 |                        |  -pi   |
 
+    The pivot and average position constraints in the A.x >= b notation are::
+
+        | 1  0  0  0  0  0 |                        | -999.0 |
+        |                  |                        |        |
+        |-1  0  0  0  0  0 |                        | -999.0 |
+        |                  |                        |        |
+        | 0  1  0  0  0  0 |                        | -999.0 |
+        |                  |                        |        |
+        | 0 -1  0  0  0  0 |     |  pivot_x  |      | -999.0 |
+        |                  |     |           |      |        |
+        | 0  0  1  0  0  0 |     |  pivot_y  |      | -999.0 |
+        |                  |     |           |      |        |
+        | 0  0 -1  0  0  0 |     |  pivot_z  |      | -999.0 |
+        |                  |  .  |           |  >=  |        |
+        | 0  0  0  1  0  0 |     | ave_pos_x |      | -500.0 |
+        |                  |     |           |      |        |
+        | 0  0  0 -1  0  0 |     | ave_pos_y |      | -500.0 |
+        |                  |     |           |      |        |
+        | 0  0  0  0  1  0 |     | ave_pos_z |      | -500.0 |
+        |                  |                        |        |
+        | 0  0  0  0 -1  0 |                        | -500.0 |
+        |                  |                        |        |
+        | 0  0  0  0  0  1 |                        | -500.0 |
+        |                  |                        |        |
+        | 0  0  0  0  0 -1 |                        | -500.0 |
+
 
     @keyword scaling_matrix:    The diagonal, square scaling matrix.
     @type scaling_matrix:       numpy rank-2 square matrix
@@ -137,6 +172,28 @@
 
     # Loop over the parameters of the model.
     for i in range(n):
+        # The pivot parameters.
+        if cdp.params[i] in ['pivot_x', 'pivot_y', 'pivot_z']:
+            # -999 <= pivot_i <= 999.
+            A.append(zero_array * 0.0)
+            A.append(zero_array * 0.0)
+            A[j][i] = 1.0
+            A[j+1][i] = -1.0
+            b.append(-999.0 / scaling_matrix[i, i])
+            b.append(-999.0 / scaling_matrix[i, i])
+            j = j + 2
+
+        # The average domain translation parameters.
+        if cdp.params[i] in ['ave_pos_x', 'ave_pos_y', 'ave_pos_z']:
+            # -500 <= ave_pos_i <= 500.
+            A.append(zero_array * 0.0)
+            A.append(zero_array * 0.0)
+            A[j][i] = 1.0
+            A[j+1][i] = -1.0
+            b.append(-500.0 / scaling_matrix[i, i])
+            b.append(-500.0 / scaling_matrix[i, i])
+            j = j + 2
+
         # The cone opening angles and sigma_max.
         if cdp.params[i] in ['cone_theta', 'cone_theta_x', 'cone_theta_y', 
'cone_sigma_max']:
             # 0 <= theta <= pi.




Related Messages


Powered by MHonArc, Updated Wed Jul 30 13:00:03 2014