Author: bugman
Date: Wed Sep 10 11:43:11 2014
New Revision: 25728
URL: http://svn.gna.org/viewcvs/relax?rev=25728&view=rev
Log:
Redesigned the frame_order.permute_axes user function frontend.
Previously only cyclic permutations were considered, however non-cyclic
permutations are also
allowed when accompanied by an axis inversion. Therefore 3 combinations exist
with cone_theta_x <=
cone_theta_y, or 2 when the current combination is excluded.
Modified:
branches/frame_order_cleanup/specific_analyses/frame_order/uf.py
branches/frame_order_cleanup/user_functions/frame_order.py
Modified: branches/frame_order_cleanup/specific_analyses/frame_order/uf.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/uf.py?rev=25728&r1=25727&r2=25728&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/uf.py
(original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/uf.py Wed Sep
10 11:43:11 2014
@@ -101,8 +101,12 @@
create_distribution(file=dist, dir=dir, compress_type=compress_type,
force=force)
-def permute_axes():
- """Permute the axes of the motional eigenframe to switch between local
minima."""
+def permute_axes(permutation='A'):
+ """Permute the axes of the motional eigenframe to switch between local
minima.
+
+ @keyword permutation: The permutation to use. This can be either 'A' or
'B' to select between the 3 permutations, excluding the current combination.
+ @type permutation: str
+ """
# Check that the model is valid.
if cdp.model not in [MODEL_PSEUDO_ELLIPSE,
MODEL_PSEUDO_ELLIPSE_TORSIONLESS]:
Modified: branches/frame_order_cleanup/user_functions/frame_order.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/user_functions/frame_order.py?rev=25728&r1=25727&r2=25728&view=diff
==============================================================================
--- branches/frame_order_cleanup/user_functions/frame_order.py (original)
+++ branches/frame_order_cleanup/user_functions/frame_order.py Wed Sep 10
11:43:11 2014
@@ -27,6 +27,7 @@
from specific_analyses.frame_order.uf import num_int_pts, pdb_model,
permute_axes, pivot, ref_domain, select_model
from specific_analyses.frame_order.variables import MODEL_DOUBLE_ROTOR,
MODEL_FREE_ROTOR, MODEL_ISO_CONE, MODEL_ISO_CONE_FREE_ROTOR,
MODEL_ISO_CONE_TORSIONLESS, MODEL_PSEUDO_ELLIPSE,
MODEL_PSEUDO_ELLIPSE_FREE_ROTOR, MODEL_PSEUDO_ELLIPSE_TORSIONLESS, MODEL_RIGID,
MODEL_ROTOR
from user_functions.data import Uf_info; uf_info = Uf_info()
+from user_functions.data import Uf_tables; uf_tables = Uf_tables()
from user_functions.objects import Desc_container
@@ -135,19 +136,40 @@
uf = uf_info.add_uf('frame_order.permute_axes')
uf.title = "Permute the axes of the motional eigenframe to switch between
local minima."
uf.title_short = "Eigenframe axis permutation."
-# Description.
-uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("The pseudo-elliptic frame order models consist of
multiple solutions as the optimisation space contains multiple local minima.
Because of the constraint cone_theta_x <= cone_theta_y, there are exactly two
local minima. These correspond to permutations of the motional system - the
eigenframe x, y and z-axes as well as the cone opening angles cone_theta_x,
cone_theta_y, and cone_sigma_max associated with these axes are simultaneously
permuted. But as the mechanics of the cone angles is not identical to that of
the torsion angle, only one of the two local minima is the global minimum.")
-uf.desc[-1].add_paragraph("When optimising the pseudo-elliptic models,
specifically the '%s' and '%s' model, either of the two local minima can be
found. Convergence to the global minimum is not guaranteed. Therefore this
user function can be used to permute the motional system to jump from one local
minimum to the other. Optimisation will be required as the permuted parameters
will not be exactly at the minimum." % (MODEL_PSEUDO_ELLIPSE,
MODEL_PSEUDO_ELLIPSE_TORSIONLESS))
-uf.desc[-1].add_paragraph("The motional system consists of three permutations
but, because of the cone_theta_x <= cone_theta_y condition, the permutation
which causes a violation of this constraint will be skipped.")
+uf.add_keyarg(
+ name = "permutation",
+ default = "A",
+ py_type = "str",
+ desc_short = "permutation",
+ desc = "Which of the two permutations 'A' or 'B' to create. Three
permutations are possible, and 'A' and 'B' select those which are not the
starting combination.",
+ wiz_element_type = "combo",
+ wiz_combo_choices = [
+ "A",
+ "B"
+ ],
+ wiz_read_only = True
+)
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph("The pseudo-elliptic frame order models consist of
multiple solutions as the optimisation space contains multiple local minima.
Because of the constraint cone_theta_x <= cone_theta_y, there are exactly three
local minima (out of 6 possible permutations). These correspond to
permutations of the motional system - the eigenframe x, y and z-axes as well as
the cone opening angles cone_theta_x, cone_theta_y, and cone_sigma_max
associated with these axes. But as the mechanics of the cone angles is not
identical to that of the torsion angle, only one of the three local minima is
the global minimum.")
+uf.desc[-1].add_paragraph("When optimising the pseudo-elliptic models,
specifically the '%s' and '%s' model, any of the three local minima can be
found. Convergence to the global minimum is not guaranteed. Therefore this
user function can be used to permute the motional system to jump from one local
minimum to the other. Optimisation will be required as the permuted parameters
will not be exactly at the minimum." % (MODEL_PSEUDO_ELLIPSE,
MODEL_PSEUDO_ELLIPSE_TORSIONLESS))
+table = uf_tables.add_table(label="table: frame_order.permute_axes
combinations", caption="The motional eigenframe permutations for the
frame_order.permute_axes user function.", caption_short="The permutations for
the frame_order.permute_axes user function.")
+table.add_headings(["Permutation ", "Axis inversion", "If x < y < z", "If x <
z < y", "If z < x < y"])
+table.add_row([ "[x', y', z']", " z ", " Self ", "
Self ", " Self "])
+table.add_row([ "[x', z', y']", " -z ", " A ", " A
", " x "])
+table.add_row([ "[y', x', z']", " -z ", " x ", " x
", " x "])
+table.add_row([ "[y', z', x']", " z ", " B ", " x
", " x "])
+table.add_row([ "[z', x', y']", " z ", " x ", " x
", " A "])
+table.add_row([ "[z', y', x']", " -z ", " x ", " B
", " B "])
+uf.desc[-1].add_table(table.label)
# Prompt examples.
uf.desc.append(Desc_container("Prompt examples"))
-uf.desc[-1].add_paragraph("Simply type:")
-uf.desc[-1].add_prompt("relax> frame_order.permute_axes()")
+uf.desc[-1].add_paragraph("For combination 'A', simply type:")
+uf.desc[-1].add_prompt("relax> frame_order.permute_axes('A')")
uf.backend = permute_axes
uf.menu_text = "per&mute_axes"
-uf.wizard_height_desc = 500
-uf.wizard_size = (900, 600)
+uf.wizard_height_desc = 550
+uf.wizard_size = (1000, 750)
uf.wizard_image = WIZARD_IMAGE_PATH + 'frame_order.png'
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits