mailr26677 - /branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py


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

Header


Content

Posted by edward on November 21, 2014 - 09:08:
Author: bugman
Date: Fri Nov 21 09:08:44 2014
New Revision: 26677

URL: http://svn.gna.org/viewcvs/relax?rev=26677&view=rev
Log:
Size fix for the rotor representation from the frame_order.pdb_model user 
function.

The size problem was detected via the Frame_order.test_pdb_model_rotor system 
test.  The rotors in
the PDB representation were all fixed in size, and ignored the 'size' 
argument of the
frame_order.pdb_model user function.  The size argument is now passed into 
the add_rotors() function
of the specific_analyses.frame_order.geometric and passed on to the rotor() 
function of the
lib.structure.represent.rotor module.


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

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=26677&r1=26676&r2=26677&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py   
  (original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py   
  Fri Nov 21 09:08:44 2014
@@ -350,13 +350,15 @@
         mol.atom_add(atom_name=atom_name, res_name='TLE', res_num=1, 
pos=pos, element='Ti', pdb_record='HETATM')
 
 
-def add_rotors(structure=None, representation=None, sims=False):
+def add_rotors(structure=None, representation=None, size=None, sims=False):
     """Add all rotor objects for the current frame order model to the 
structural object.
 
     @keyword structure:         The internal structural object to add the 
rotor objects to.
     @type structure:            lib.structure.internal.object.Internal 
instance
     @keyword representation:    The representation to create.  If this is 
set to None, the rotor will be dumbbell shaped with propellers at both ends.  
If set to 'A' or 'B', only half of the rotor will be shown.
     @type representation:       None or str
+    @keyword size:              The size of the geometric object in 
Angstroms.
+    @type size:                 float
     @keyword sims:              A flag which if True will add the Monte 
Carlo simulation rotors to the structural object.  There must be one model 
for each Monte Carlo simulation already present in the structural object.
     @type sims:                 bool
     """
@@ -416,11 +418,11 @@
             axes = generate_axis_system(sim_index=sim_indices[i])
             axis.append(axes[:, 2])
 
-            # The size of the rotor, taking the 30 Angstrom cone 
representation into account.
+            # The size of the rotor (Angstrom), taking the cone 
representation into account by adding 5 Angstrom.
             if cdp.model in [MODEL_ROTOR, MODEL_FREE_ROTOR]:
-                span.append(20e-10)
-            else:
-                span.append(35e-10)
+                span.append(size)
+            else:
+                span.append(size + 5.0)
 
             # Stagger the propeller blades.
             if cdp.model in MODEL_LIST_FREE_ROTORS:
@@ -461,9 +463,9 @@
             axis.append(frame[:, 0])
             axis.append(frame[:, 1])
 
-            # The rotor size.
-            span.append(20e-10)
-            span.append(20e-10)
+            # The rotor size (Angstrom).
+            span.append(size)
+            span.append(size)
 
             # Stagger the propeller blades.
             staggered.append(True)
@@ -487,7 +489,7 @@
 
     # Add each rotor to the structure as a new molecule.
     for i in range(len(axis)):
-        rotor(structure=structure, rotor_angle=rotor_angle[i], axis=dot(T, 
axis[i]), axis_pt=pivot[i], label=label[i], centre=com[i], span=span[i], 
blade_length=5e-10, model_num=models[i], staggered=staggered[i], 
half_rotor=half_rotor)
+        rotor(structure=structure, rotor_angle=rotor_angle[i], axis=dot(T, 
axis[i]), axis_pt=pivot[i], label=label[i], centre=com[i], span=span[i]/1e10, 
blade_length=5e-10, model_num=models[i], staggered=staggered[i], 
half_rotor=half_rotor)
 
 
 def average_position(structure=None, models=None, sim=None):
@@ -705,7 +707,7 @@
         add_pivots(structure=structures[i], sims=sims[i])
 
         # Add all rotor objects.
-        add_rotors(structure=structures[i], 
representation=representation[i], sims=sims[i])
+        add_rotors(structure=structures[i], 
representation=representation[i], size=size, sims=sims[i])
 
         # Add the axis systems.
         add_axes(structure=structures[i], representation=representation[i], 
size=size, sims=sims[i])




Related Messages


Powered by MHonArc, Updated Fri Nov 21 10:00:02 2014