mailr24377 - in /branches/frame_order_cleanup: lib/structure/internal/ pipe_control/ specific_analyses/frame_order/


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

Header


Content

Posted by edward on July 01, 2014 - 16:17:
Author: bugman
Date: Tue Jul  1 16:17:10 2014
New Revision: 24377

URL: http://svn.gna.org/viewcvs/relax?rev=24377&view=rev
Log:
Redesign of the axis geometric representation for the frame order motions.

This is now much more model dependent to avoid clashes with the rotor objects 
and other
representations:

- For the torsionless isotropic cone, a single z-axis is created.

- For the double rotor, a single z-axis is produced connecting the two 
pivots, from pivot2 to pivot1.

- For the pseudo-ellipse and free rotor pseudo-ellipse, the x and y-axes are 
created.

- For the torsionless pseudo-ellipse, all three x, y and z-axes are created.

- For all other models, no axis system is produced as this has been made 
redundant by the rotor
  objects.


Modified:
    branches/frame_order_cleanup/lib/structure/internal/object.py
    branches/frame_order_cleanup/pipe_control/pymol_control.py
    branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py

Modified: branches/frame_order_cleanup/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/structure/internal/object.py?rev=24377&r1=24376&r2=24377&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/structure/internal/object.py       
(original)
+++ branches/frame_order_cleanup/lib/structure/internal/object.py       Tue 
Jul  1 16:17:10 2014
@@ -207,6 +207,7 @@
          | CNC    | Apex or centre of the cone geometric object    |
          | CNX    | Axis of the cone geometric object              |
          | CNE    | Edge of the cone geometric object              |
+         | AXE    | The axis geometric object                      |
          |________|________________________________________________|
 
         For any other residues, no description is returned.
@@ -232,6 +233,7 @@
             "CNC": "Apex or centre of the cone geometric object",
             "CNX": "Axis of the cone geometric object",
             "CNE": "Edge of the cone geometric object",
+            "AXE": "The axis geometric object",
         }
 
         # Return the description, if one exists.

Modified: branches/frame_order_cleanup/pipe_control/pymol_control.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/pymol_control.py?rev=24377&r1=24376&r2=24377&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/pymol_control.py  (original)
+++ branches/frame_order_cleanup/pipe_control/pymol_control.py  Tue Jul  1 
16:17:10 2014
@@ -566,8 +566,8 @@
     if id == None:
         raise RelaxError("The PyMOL object ID must be supplied.")
 
-    # Select the AVE, CNX, and SIM residues.
-    pymol_obj.exec_cmd("select (%s & resn AVE,CNX,SIM)" % id)
+    # Select the AXE residues.
+    pymol_obj.exec_cmd("select (%s & resn AXE)" % id)
 
     # Show the vector as a stick.
     pymol_obj.exec_cmd("show stick, 'sele'")
@@ -576,7 +576,7 @@
     pymol_obj.exec_cmd("color cyan, 'sele'")
 
     # Select the atom used for labelling.
-    pymol_obj.exec_cmd("select (%s & resn AVE,CNX,SIM and symbol N)" % id)
+    pymol_obj.exec_cmd("select (%s & resn AXE and symbol N)" % id)
 
     # Hide the atom.
     pymol_obj.exec_cmd("hide ('sele')")

Modified: 
branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py?rev=24377&r1=24376&r2=24377&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py   
  (original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py   
  Tue Jul  1 16:17:10 2014
@@ -52,34 +52,30 @@
     @type size:         float
     """
 
-    # The pivot point.
-    pivot = generate_pivot(order=1)
-
     # Create the molecule.
-    structure.add_molecule(name='axes')
+    mol_name = 'axes'
+    structure.add_molecule(name=mol_name)
+
+    # The pivot points.
+    pivot1 = generate_pivot(order=1)
+    pivot2 = generate_pivot(order=2)
 
     # Alias the molecules.
-    mol = structure.get_molecule('axes', model=1)
+    mol = structure.get_molecule(mol_name, model=1)
     mol_neg = None
     if structure.num_models() == 2:
-        mol_neg = structure.get_molecule('axes', model=2)
+        mol_neg = structure.get_molecule(mol_name, model=2)
 
     # The inversion matrix.
     inv_mat = -eye(3)
 
-    # Add the pivot point.
-    structure.add_atom(mol_name=cdp.model, pdb_record='HETATM', atom_num=1, 
atom_name='R', res_name='PIV', res_num=1, pos=pivot, element='C')
-
-    # The spherical angles.
-    if cdp.model in ['iso cone', 'free rotor', 'iso cone, torsionless', 'iso 
cone, free rotor', 'rotor']:
+    # A single z-axis, when no rotor object is present.
+    if cdp.model in ['iso cone, torsionless']:
         # Print out.
         print("\nGenerating the z-axis system.")
 
         # The axis.
-        if cdp.model in ['rotor', 'free rotor']:
-            axis = create_rotor_axis_alpha(alpha=cdp.axis_alpha, 
pivot=pivot, point=com)
-        else:
-            axis = create_rotor_axis_spherical(theta=cdp.axis_theta, 
phi=cdp.axis_phi)
+        axis = create_rotor_axis_spherical(theta=cdp.axis_theta, 
phi=cdp.axis_phi)
         print(("Central axis: %s." % axis))
 
         # Rotations and inversions.
@@ -96,7 +92,7 @@
             # Fill the structure.
             for i in range(cdp.sim_number):
                 if cdp.model in ['rotor', 'free rotor']:
-                    axis_sim[i] = 
create_rotor_axis_alpha(alpha=cdp.axis_alpha_sim[i], pivot=pivot, point=com)
+                    axis_sim[i] = 
create_rotor_axis_alpha(alpha=cdp.axis_alpha_sim[i], pivot=pivot1, point=com)
                 else:
                     axis_sim[i] = 
create_rotor_axis_spherical(theta=cdp.axis_theta_sim[i], 
phi=cdp.axis_phi_sim[i])
 
@@ -106,16 +102,32 @@
 
         # Generate the axis vectors.
         print("\nGenerating the axis vectors.")
-        res_num = generate_vector_residues(mol=mol, vector=axis_pos, 
atom_name='z-ax', res_name_vect='AXE', sim_vectors=axis_sim_pos, res_num=2, 
origin=pivot, scale=size)
+        res_num = generate_vector_residues(mol=mol, vector=axis_pos, 
atom_name='z-ax', res_name_vect='AXE', sim_vectors=axis_sim_pos, res_num=2, 
origin=pivot1, scale=size)
 
         # The negative.
         if mol_neg != None:
-            res_num = generate_vector_residues(mol=mol_neg, vector=axis_neg, 
atom_name='z-ax', res_name_vect='AXE', sim_vectors=axis_sim_neg, res_num=2, 
origin=pivot, scale=size)
+            res_num = generate_vector_residues(mol=mol_neg, vector=axis_neg, 
atom_name='z-ax', res_name_vect='AXE', sim_vectors=axis_sim_neg, res_num=2, 
origin=pivot1, scale=size)
+
+    # The z-axis connecting two motional modes.
+    elif cdp.model in ['double rotor']:
+        # Printout.
+        print("\nGenerating the z-axis linking the two pivot points.")
+
+        # The axis.
+        axis = pivot1 - pivot2
+        print(("Interconnecting axis: %s." % axis))
+
+        # Generate the axis vectors.
+        print("\nGenerating the axis vectors.")
+        res_num = generate_vector_residues(mol=mol, vector=axis, 
atom_name='z-ax', res_name_vect='AXE', res_num=1, origin=pivot2)
 
     # The full axis system.
-    else:
+    elif cdp.model in ['pseudo-ellipse', 'pseudo-ellipse, torsionless', 
'pseudo-ellipse, free rotor']:
         # Print out.
         print("\nGenerating the full axis system.")
+
+        # Add the pivot point.
+        structure.add_atom(mol_name=mol_name, pdb_record='HETATM', 
atom_num=1, atom_name='R', res_name='AXE', res_num=1, pos=pivot1, element='C')
 
         # The axis system.
         axes = zeros((3, 3), float64)
@@ -143,9 +155,13 @@
                 euler_to_R_zyz(cdp.eigen_alpha_sim[i], 
cdp.eigen_beta_sim[i], cdp.eigen_gamma_sim[i], axes_sim_neg[i])
                 axes_sim_neg[i] = dot(inv_mat, axes_sim_neg[i])
 
+        # The axes to create.
+        label = ['x', 'y']
+        if cdp.model in ['pseudo-ellipse, torsionless']:
+            label = ['x', 'y', 'z']
+
         # Generate the axis vectors.
         print("\nGenerating the axis vectors.")
-        label = ['x', 'y', 'z']
         for j in range(len(label)):
             # The simulation data.
             axis_sim_pos = None
@@ -155,9 +171,9 @@
                 axis_sim_neg = axes_sim_neg[:,:, j]
 
             # The vectors.
-            res_num = generate_vector_residues(mol=mol, vector=axes_pos[:, 
j], atom_name='%s-ax'%label[j], res_name_vect='AXE', 
sim_vectors=axis_sim_pos, res_num=2, origin=pivot, scale=size)
+            res_num = generate_vector_residues(mol=mol, vector=axes_pos[:, 
j], atom_name='%s-ax'%label[j], res_name_vect='AXE', 
sim_vectors=axis_sim_pos, res_num=2, origin=pivot1, scale=size)
             if mol_neg != None:
-                res_num = generate_vector_residues(mol=mol_neg, 
vector=axes_neg[:, j], atom_name='%s-ax'%label[j], res_name_vect='AXE', 
sim_vectors=axis_sim_neg, res_num=2, origin=pivot, scale=size)
+                res_num = generate_vector_residues(mol=mol_neg, 
vector=axes_neg[:, j], atom_name='%s-ax'%label[j], res_name_vect='AXE', 
sim_vectors=axis_sim_neg, res_num=2, origin=pivot1, scale=size)
 
 
 def add_cones(structure=None, size=None, inc=None):




Related Messages


Powered by MHonArc, Updated Tue Jul 01 16:40:02 2014