mailr24402 - /branches/frame_order_cleanup/lib/structure/represent/rotor.py


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

Header


Content

Posted by edward on July 02, 2014 - 11:57:
Author: bugman
Date: Wed Jul  2 11:57:18 2014
New Revision: 24402

URL: http://svn.gna.org/viewcvs/relax?rev=24402&view=rev
Log:
Improvements to the lib.structure.represent.rotor.rotor() function for 
handling models.

The 'rotor', 'rotor2', or 'rotor3' molecule name determination is now also 
model specific.


Modified:
    branches/frame_order_cleanup/lib/structure/represent/rotor.py

Modified: branches/frame_order_cleanup/lib/structure/represent/rotor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/structure/represent/rotor.py?rev=24402&r1=24401&r2=24402&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/structure/represent/rotor.py       
(original)
+++ branches/frame_order_cleanup/lib/structure/represent/rotor.py       Wed 
Jul  2 11:57:18 2014
@@ -32,7 +32,7 @@
 from lib.geometry.rotations import axis_angle_to_R
 
 
-def rotor(structure=None, rotor_angle=None, axis=None, axis_pt=True, 
label=None, centre=None, span=2e-9, blade_length=5e-10, model=None, 
staggered=False):
+def rotor(structure=None, rotor_angle=None, axis=None, axis_pt=True, 
label=None, centre=None, span=2e-9, blade_length=5e-10, model_num=None, 
staggered=False):
     """Create a PDB representation of a rotor motional model.
 
     @keyword structure:     The internal structural object instance to add 
the rotor to as a molecule.
@@ -51,8 +51,8 @@
     @type span:             float
     @keyword blade_length:  The length of the representative rotor blades.
     @type blade_length:     float
-    @keyword model:         The structural model number to add the rotor to. 
 If not supplied, the same rotor structure will be added to all models.
-    @type model:            int or None
+    @keyword model_num:     The structural model number to add the rotor to. 
 If not supplied, the same rotor structure will be added to all models.
+    @type model_num:        int or None
     @keyword staggered:     A flag which if True will cause the rotor blades 
to be staggered.  This is used to avoid blade overlap.
     @type staggered:        bool
     """
@@ -68,18 +68,18 @@
     axis_norm = axis / norm(axis)
 
     # Add a structure (handling up to 3 rotors).
-    if structure.has_molecule(name='rotor') and 
structure.has_molecule(name='rotor2'):
-        structure.add_molecule(name='rotor3')
+    if structure.has_molecule(model_num=model_num, name='rotor') and 
structure.has_molecule(model_num=model_num, name='rotor2'):
+        structure.add_molecule(model_num=model_num, name='rotor3')
         mol_name = 'rotor3'
-    elif structure.has_molecule(name='rotor'):
-        structure.add_molecule(name='rotor2')
+    elif structure.has_molecule(model_num=model_num, name='rotor'):
+        structure.add_molecule(model_num=model_num, name='rotor2')
         mol_name = 'rotor2'
     else:
-        structure.add_molecule(name='rotor')
+        structure.add_molecule(model_num=model_num, name='rotor')
         mol_name = 'rotor'
 
     # Loop over the models.
-    for model in structure.model_loop(model):
+    for model in structure.model_loop(model_num):
         # Alias the single molecule from the single model.
         mol = structure.get_molecule(mol_name, model=model.num)
 




Related Messages


Powered by MHonArc, Updated Wed Jul 02 12:00:02 2014