mailr18824 - 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 - 19:35:
Author: bugman
Date: Thu Mar 14 19:35:40 2013
New Revision: 18824

URL: http://svn.gna.org/viewcvs/relax?rev=18824&view=rev
Log:
Added file, directory and overwrite force arguments to the 
structure.create_rotor_pdb user function.


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=18824&r1=18823&r2=18824&view=diff
==============================================================================
--- trunk/generic_fns/structure/geometric.py (original)
+++ trunk/generic_fns/structure/geometric.py Thu Mar 14 19:35:40 2013
@@ -583,9 +583,13 @@
     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):
+def create_rotor_pdb(file=None, dir=None, axis=None, axis_pt=True, 
centre=None, span=2e-9, blade_length=5e-10, force=False, staggered=False):
     """Create a PDB representation of a rotor motional model.
 
+    @keyword file:          The name of the PDB file to create.
+    @type file:             str
+    @keyword dir:           The name of the directory to place the PDB file 
into.
+    @type dir:              str
     @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.
@@ -596,6 +600,8 @@
     @type span:             float
     @keyword blade_length:  The length of the representative rotor blades.
     @type blade_length:     float
+    @keyword force:         A flag which if set will overwrite any 
pre-existing file.
+    @type force:            bool
     @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
     """

Modified: trunk/user_functions/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=18824&r1=18823&r2=18824&view=diff
==============================================================================
--- trunk/user_functions/structure.py (original)
+++ trunk/user_functions/structure.py Thu Mar 14 19:35:40 2013
@@ -237,6 +237,24 @@
 uf.title = "Create a PDB file representation of a rotor."
 uf.title_short = "Rotor PDB representation."
 uf.add_keyarg(
+    name = "file",
+    default = "rotor.pdb",
+    py_type = "str",
+    arg_type = "file sel",
+    desc_short = "file name",
+    desc = "The name of the PDB file.",
+    wiz_filesel_wildcard = "PDB files (*.pdb)|*.pdb;*.PDB",
+    wiz_filesel_style = FD_SAVE
+)
+uf.add_keyarg(
+    name = "dir",
+    py_type = "str",
+    arg_type = "dir",
+    desc_short = "directory name",
+    desc = "The directory to place the file into.",
+    can_be_none = True
+)
+uf.add_keyarg(
     name = "axis",
     py_type = "float_array",
     dim = 3,
@@ -270,6 +288,13 @@
     py_type = "num",
     desc_short = "blade length",
     desc = "The length of the representative rotor blades."
+)
+uf.add_keyarg(
+    name = "force",
+    default = False,
+    py_type = "bool",
+    desc_short = "force flag",
+    desc = "A flag which if True will overwrite the file if it already 
exists."
 )
 uf.add_keyarg(
     name = "staggered",




Related Messages


Powered by MHonArc, Updated Thu Mar 14 20:00:02 2013