mailr28107 - in /trunk: pipe_control/structure/main.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 November 25, 2015 - 18:38:
Author: bugman
Date: Wed Nov 25 18:38:12 2015
New Revision: 28107

URL: http://svn.gna.org/viewcvs/relax?rev=28107&view=rev
Log:
Added the 'format' and 'dir' arguments to the structure.pca user function.

This is to the front and back ends.

Modified:
    trunk/pipe_control/structure/main.py
    trunk/user_functions/structure.py

Modified: trunk/pipe_control/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=28107&r1=28106&r2=28107&view=diff
==============================================================================
--- trunk/pipe_control/structure/main.py        (original)
+++ trunk/pipe_control/structure/main.py        Wed Nov 25 18:38:12 2015
@@ -1004,7 +1004,7 @@
     cdp.N = len(from_mols)
 
 
-def pca(pipes=None, models=None, molecules=None, atom_id=None, 
algorithm=None, num_modes=4):
+def pca(pipes=None, models=None, molecules=None, atom_id=None, 
algorithm=None, num_modes=4, format='grace', dir=None):
     """PCA analysis of the motions between all the loaded models.
 
     @keyword pipes:     The data pipes to determine the RMSD for.
@@ -1019,6 +1019,10 @@
     @type algorithm:    str
     @keyword num_modes: The number of PCA modes to calculate.
     @type num_modes:    int
+    @keyword format:    The graph format to use.
+    @type format:       str
+    @keyword dir:       The optional directory to place the graphs into.
+    @type dir:          str
     """
 
     # Checks.

Modified: trunk/user_functions/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=28107&r1=28106&r2=28107&view=diff
==============================================================================
--- trunk/user_functions/structure.py   (original)
+++ trunk/user_functions/structure.py   Wed Nov 25 18:38:12 2015
@@ -919,9 +919,28 @@
     desc_short = "number of modes",
     desc = "The number of PCA modes to calculate."
 )
-# Description.
-uf.desc.append(Desc_container())
-uf.desc[-1].add_paragraph("Perform a principle component analysis (PCA) for 
all the chosen structures.")
+uf.add_keyarg(
+    name = "format",
+    default = "grace",
+    py_type = "str",
+    desc_short = "graph format",
+    desc = "The format of the plot data.",
+    wiz_element_type = "combo",
+    wiz_combo_choices = ["grace"],
+    wiz_read_only = True,
+    can_be_none = True
+)
+uf.add_keyarg(
+    name = "dir",
+    py_type = "str",
+    arg_type = "dir sel",
+    desc_short = "directory name",
+    desc = "The directory to save the graphs into.",
+    can_be_none = True
+)
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph("Perform a principle component analysis (PCA) for 
all the chosen structures.  2D graphs of the PC projections will be generated 
and placed in the specified directory.")
 uf.desc[-1].add_paragraph(paragraph_multi_struct)
 uf.desc[-1].add_paragraph(paragraph_atom_id)
 # Prompt examples.




Related Messages


Powered by MHonArc, Updated Wed Nov 25 18:40:03 2015