mailr23189 - in /trunk: specific_analyses/frame_order/uf.py user_functions/frame_order.py


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

Header


Content

Posted by edward on May 15, 2014 - 15:49:
Author: bugman
Date: Thu May 15 15:49:41 2014
New Revision: 23189

URL: http://svn.gna.org/viewcvs/relax?rev=23189&view=rev
Log:
Modified the frame_order.pdb_model user function so that the three PDB files 
are optional.

This allows only certain components of the frame order theory to be 
represented in PDB format.

Modified:
    trunk/specific_analyses/frame_order/uf.py
    trunk/user_functions/frame_order.py

Modified: trunk/specific_analyses/frame_order/uf.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/uf.py?rev=23189&r1=23188&r2=23189&view=diff
==============================================================================
--- trunk/specific_analyses/frame_order/uf.py   (original)
+++ trunk/specific_analyses/frame_order/uf.py   Thu May 15 15:49:41 2014
@@ -363,11 +363,11 @@
     """Create 3 different PDB files for representing the frame order 
dynamics of the system.
 
     @keyword ave_pos_file:  The name of the file for the average molecule 
structure.
-    @type ave_pos_file:     str
+    @type ave_pos_file:     str or None
     @keyword rep_file:      The name of the file of the PDB representation 
of the frame order dynamics to create.
-    @type rep_file:         str
+    @type rep_file:         str or None
     @keyword dist_file:     The name of the file which will contain multiple 
models spanning the full dynamics distribution of the frame order model.
-    @type dist_file:        str
+    @type dist_file:        str or None
     @keyword dir:           The name of the directory to place the PDB file 
into.
     @type dir:              str
     @keyword size:          The size of the geometric object in Angstroms.
@@ -380,21 +380,28 @@
     @type neg_cone:         bool
     """
 
+    # Check that at least one PDB file name is given.
+    if not ave_pos_file and not rep_file and not dist_file:
+        raise RelaxError("Minimally one PDB file name must be supplied.")
+
     # Test if the current data pipe exists.
     pipes.test()
 
     # Create the average position structure.
-    pdb_ave_pos(file=ave_pos_file, dir=dir, force=force)
+    if ave_pos_file:
+        pdb_ave_pos(file=ave_pos_file, dir=dir, force=force)
 
     # Nothing more to do for the rigid model.
     if cdp.model == 'rigid':
         return
 
     # Create the geometric representation.
-    pdb_geometric_rep(file=rep_file, dir=dir, size=size, inc=inc, 
force=force, neg_cone=neg_cone)
+    if rep_file:
+        pdb_geometric_rep(file=rep_file, dir=dir, size=size, inc=inc, 
force=force, neg_cone=neg_cone)
 
     # Create the distribution.
-    pdb_distribution(file=dist_file, dir=dir, force=force)
+    if dist_file:
+        pdb_distribution(file=dist_file, dir=dir, force=force)
 
 
 def pivot(pivot=None, order=1, fix=False):

Modified: trunk/user_functions/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/frame_order.py?rev=23189&r1=23188&r2=23189&view=diff
==============================================================================
--- trunk/user_functions/frame_order.py (original)
+++ trunk/user_functions/frame_order.py Thu May 15 15:49:41 2014
@@ -105,7 +105,8 @@
     desc_short = "average structure file name",
     desc = "The name of the 3D structure PDB file for the molecular 
structure with the moving domains shifted to the average position.",
     wiz_filesel_wildcard = "PDB files (*.pdb)|*.pdb;*.PDB",
-    wiz_filesel_style = FD_SAVE
+    wiz_filesel_style = FD_SAVE,
+    can_be_none = True
 )
 uf.add_keyarg(
     name = "rep_file",
@@ -115,7 +116,8 @@
     desc_short = "PDB representation file name",
     desc = "The name of the PDB file for the geometric object representation 
of the frame order dynamics.",
     wiz_filesel_wildcard = "PDB files (*.pdb)|*.pdb;*.PDB",
-    wiz_filesel_style = FD_SAVE
+    wiz_filesel_style = FD_SAVE,
+    can_be_none = True
 )
 uf.add_keyarg(
     name = "dist_file",
@@ -125,7 +127,8 @@
     desc_short = "distribution file name",
     desc = "The name of the file which will contain multiple models spanning 
the full dynamics distribution of the frame order model.",
     wiz_filesel_wildcard = "PDB files (*.pdb)|*.pdb;*.PDB",
-    wiz_filesel_style = FD_SAVE
+    wiz_filesel_style = FD_SAVE,
+    can_be_none = True
 )
 uf.add_keyarg(
     name = "dir",




Related Messages


Powered by MHonArc, Updated Thu May 15 16:00:02 2014