mailr18823 - in /trunk: generic_fns/structure/geometric.py user_functions/structure.py


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

Header


Content

Posted by edward on March 14, 2013 - 17:54:
Author: bugman
Date: Thu Mar 14 17:54:01 2013
New Revision: 18823

URL: http://svn.gna.org/viewcvs/relax?rev=18823&view=rev
Log:
Created the front end for the new structure.create_rotor_pdb user function.

This will be used to create a PDB representation of a rotor motional model.


Modified:
    trunk/generic_fns/structure/geometric.py
    trunk/user_functions/structure.py

Modified: trunk/generic_fns/structure/geometric.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/geometric.py?rev=18823&r1=18822&r2=18823&view=diff
==============================================================================
--- trunk/generic_fns/structure/geometric.py (original)
+++ trunk/generic_fns/structure/geometric.py Thu Mar 14 17:54:01 2013
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2003-2012 Edward d'Auvergne                                  
 #
+# Copyright (C) 2003-2013 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -583,6 +583,23 @@
     status.observers.result_file.notify()
 
 
+def create_rotor_pdb(axis=None, axis_pt=True, centre=None, span=2e-9, 
blade_length=5e-10, staggered=False):
+    """Create a PDB representation of a rotor motional model.
+
+    @keyword axis:          The vector defining the rotor axis.
+    @type axis:             numpy rank-1, 3D array
+    @keyword axis_pt:       A point lying anywhere on the rotor axis.  This 
is used to define the position of the axis in 3D space.
+    @type axis_pt:          numpy rank-1, 3D array
+    @keyword centre:        The central point of the representation.  If 
this point is not on the rotor axis, then the closest point on the axis will 
be used for the centre.
+    @type centre:           numpy rank-1, 3D array
+    @keyword span:          The distance from the central point to the rotor 
blades (meters).
+    @type span:             float
+    @keyword blade_length:  The length of the representative rotor blades.
+    @type blade_length:     float
+    @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
+    """
+
 def create_vector_dist(length=None, symmetry=True, file=None, dir=None, 
force=False):
     """Create a PDB representation of the vector distribution.
 

Modified: trunk/user_functions/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=18823&r1=18822&r2=18823&view=diff
==============================================================================
--- trunk/user_functions/structure.py (original)
+++ trunk/user_functions/structure.py Thu Mar 14 17:54:01 2013
@@ -230,6 +230,64 @@
 uf.wizard_size = (1000, 750)
 uf.wizard_apply_button = False
 uf.wizard_image = WIZARD_IMAGE_PATH + 'structure' + sep + 
'create_diff_tensor_pdb.png'
+
+
+# The structure.create_rotor_pdb user function.
+uf = uf_info.add_uf('structure.create_rotor_pdb')
+uf.title = "Create a PDB file representation of a rotor."
+uf.title_short = "Rotor PDB representation."
+uf.add_keyarg(
+    name = "axis",
+    py_type = "float_array",
+    dim = 3,
+    desc_short = "rotor axis vector",
+    desc = "The vector defining the rotor axis."
+)
+uf.add_keyarg(
+    name = "axis_pt",
+    py_type = "float_array",
+    dim = 3,
+    desc_short = "rotor axis point",
+    desc = "A point lying anywhere on the rotor axis.  This is used to 
define the position of the axis in 3D space."
+)
+uf.add_keyarg(
+    name = "centre",
+    py_type = "float_array",
+    dim = 3,
+    desc_short = "central point",
+    desc = "The central point of the representation.  If this point is not 
on the rotor axis, then the closest point on the axis will be used for the 
centre."
+)
+uf.add_keyarg(
+    name = "span",
+    default = 2e-9,
+    py_type = "num",
+    desc_short = "representation span",
+    desc = "The distance from the central point to the rotor blades 
(meters)."
+)
+uf.add_keyarg(
+    name = "blade_length",
+    default = 5e-10,
+    py_type = "num",
+    desc_short = "blade length",
+    desc = "The length of the representative rotor blades."
+)
+uf.add_keyarg(
+    name = "staggered",
+    default = False,
+    py_type = "bool",
+    desc_short = "staggered flag",
+    desc = "A flag which if True will cause the rotor blades to be 
staggered.  This is used to avoid blade overlap."
+)
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph("This creates a PDB file representation of a rotor 
motional model.  The model axis is defined by a vector and a single point on 
the axis.  The centre of the representation will be taken as the point on the 
rotor axis closest to the given centre position.  The size of the 
representation is defined by the span, which is the distance from the central 
point to the rotors, and the length of the blades.")
+uf.backend = generic_fns.structure.geometric.create_rotor_pdb
+uf.menu_text = "create_&rotor_pdb"
+uf.gui_icon = "oxygen.actions.list-add-relax-blue"
+uf.wizard_height_desc = 400
+uf.wizard_size = (900, 700)
+uf.wizard_apply_button = False
+uf.wizard_image = WIZARD_IMAGE_PATH + 'structure' + sep + '2JK4.png'
 
 
 # The structure.create_vector_dist user function.




Related Messages


Powered by MHonArc, Updated Thu Mar 14 19:40:02 2013