mailr17041 - in /branches/interatomic: ./ specific_fns/consistency_tests.py user_functions/grace.py user_functions/value.py


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

Header


Content

Posted by edward on June 22, 2012 - 18:32:
Author: bugman
Date: Fri Jun 22 18:32:57 2012
New Revision: 17041

URL: http://svn.gna.org/viewcvs/relax?rev=17041&view=rev
Log:
Merged revisions 17039-17040 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r17039 | bugman | 2012-06-22 18:21:16 +0200 (Fri, 22 Jun 2012) | 5 lines
  
  Converted the consistency testing documentation strings to the Uf_tables 
and Desc_container design.
  
  This is needed to use the consistency testing documentation within the user 
function help system.
........
  r17040 | bugman | 2012-06-22 18:23:31 +0200 (Fri, 22 Jun 2012) | 3 lines
  
  Added the consistency testing documentation to the grace.write and value.* 
user functions.
........

Modified:
    branches/interatomic/   (props changed)
    branches/interatomic/specific_fns/consistency_tests.py
    branches/interatomic/user_functions/grace.py
    branches/interatomic/user_functions/value.py

Propchange: branches/interatomic/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 22 18:32:57 2012
@@ -1,1 +1,1 @@
-/trunk:1-17030
+/trunk:1-17040

Modified: branches/interatomic/specific_fns/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/specific_fns/consistency_tests.py?rev=17041&r1=17040&r2=17041&view=diff
==============================================================================
--- branches/interatomic/specific_fns/consistency_tests.py (original)
+++ branches/interatomic/specific_fns/consistency_tests.py Fri Jun 22 
18:32:57 2012
@@ -36,6 +36,8 @@
 from relax_errors import RelaxError, RelaxFuncSetupError, 
RelaxNoSequenceError, RelaxNoValueError, RelaxSpinTypeError
 from relax_warnings import RelaxDeselectWarning
 import specific_fns
+from user_functions.data import Uf_tables; uf_tables = Uf_tables()
+from user_functions.objects import Desc_container
 
 
 class Consistency_tests(API_base, API_common):
@@ -272,30 +274,17 @@
                 setattr(data_cont, name, None)
 
 
-    default_value_doc = """
-        Consistency testing default values
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-        These default values are found in the file 'physical_constants.py'.
-
-         
______________________________________________________________________________________
-        |                                       |                    |       
                  |
-        | Data type                             | Object name        | Value 
                  |
-        
|_______________________________________|____________________|_________________________|
-        |                                       |                    |       
                  |
-        | Bond length                           | 'r'                | 1.02 
* 1e-10            |
-        |                                       |                    |       
                  |
-        | CSA                                   | 'csa'              | -172 
* 1e-6             |
-        |                                       |                    |       
                  |
-        | Heteronucleus type                    | 'heteronuc_type'   | '15N' 
                  |
-        |                                       |                    |       
                  |
-        | Proton type                           | 'proton_type'      | '1H'  
                  |
-        |                                       |                    |       
                  |
-        | Angle Theta                           | 'orientation'      | 15.7  
                  |
-        |                                       |                    |       
                  |
-        | Correlation time                      | 'tc'               | 13 * 
1e-9               |
-        
|_______________________________________|____________________|_________________________|
-
-        """
+    default_value_doc = Desc_container("Consistency testing default values")
+    default_value_doc.add_paragraph("These default values are found in the 
file 'physical_constants.py'.")
+    _table = uf_tables.add_table(label="table: consistency testing default 
values", caption="Consistency testing default values.")
+    _table.add_headings(["Data type", "Object name", "Value"])
+    _table.add_row(["Bond length", "'r'", "1.02 * 1e-10"])
+    _table.add_row(["CSA", "'csa'", "-172 * 1e-6"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'", "'15N'"])
+    _table.add_row(["Angle theta", "'proton_type'", "'1H'"])
+    _table.add_row(["Proton type", "'orientation'", "15.7"])
+    _table.add_row(["Correlation time", "'tc'", "13 * 1e-9"])
+    default_value_doc.add_table(_table.label)
 
 
     def overfit_deselect(self):
@@ -333,45 +322,23 @@
                     spin.select = False
 
 
-    return_data_name_doc = """
-        Consistency testing data type string matching patterns
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-         ___________________________________________
-        |                       |                  |
-        | Data type             | Object name      |
-        |_______________________|__________________|
-        |                       |                  |
-        | J(0)                  | 'j0'             |
-        |                       |                  |
-        | F_eta                 | 'f_eta'          |
-        |                       |                  |
-        | F_R2                  | 'f_r2'           |
-        |                       |                  |
-        | Bond length           | 'r'              |
-        |                       |                  |
-        | CSA                   | 'csa'            |
-        |                       |                  |
-        | Heteronucleus type    | 'heteronuc_type' |
-        |                       |                  |
-        | Proton type           | 'proton_type'    |
-        |                       |                  |
-        | Angle Theta           | 'orientation'    |
-        |                       |                  |
-        | Correlation time      | 'tc'             |
-        |_______________________|__________________|
-        """
-
-
-    set_doc = """
-        Consistency testing set details
-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-        In consistency testing, only four values can be set, the bond 
length, CSA, angle
-        Theta ('orientation') and correlation time values. These must be set 
prior to the
-        calculation of consistency functions.
-
-        """
+    return_data_name_doc = Desc_container("Consistency testing data type 
string matching patterns")
+    _table = uf_tables.add_table(label="table: Consistency testing data 
types", caption="Consistency testing data type string matching patterns.")
+    _table.add_headings(["Data type", "Object name"])
+    _table.add_row(["J(0)", "'j0'"])
+    _table.add_row(["F_eta", "'f_eta'"])
+    _table.add_row(["F_R2", "'f_r2'"])
+    _table.add_row(["Bond length", "'r'"])
+    _table.add_row(["CSA", "'csa'"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'"])
+    _table.add_row(["Proton type", "'proton_type'"])
+    _table.add_row(["Angle theta", "'orientation'"])
+    _table.add_row(["Correlation time", "'tc'"])
+    return_data_name_doc.add_table(_table.label)
+
+
+    set_doc = Desc_container("Consistency testing set details")
+    set_doc.add_paragraph("In consistency testing, only four values can be 
set, the bond length, CSA, angle Theta ('orientation') and correlation time 
values. These must be set prior to the calculation of consistency functions.")
 
 
     def set_error(self, model_info, index, error):

Modified: branches/interatomic/user_functions/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/user_functions/grace.py?rev=17041&r1=17040&r2=17041&view=diff
==============================================================================
--- branches/interatomic/user_functions/grace.py (original)
+++ branches/interatomic/user_functions/grace.py Fri Jun 22 18:32:57 2012
@@ -30,8 +30,9 @@
 from generic_fns import grace, minimise
 from graphics import WIZARD_IMAGE_PATH
 from prompt.doc_string import regexp_doc
+from specific_fns.consistency_tests import Consistency_tests
+from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.model_free import Model_free
-from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.noe import Noe
 from specific_fns.relax_fit import Relax_fit
 from user_functions.data import Uf_info; uf_info = Uf_info()
@@ -183,6 +184,7 @@
 uf.desc.append(Noe.return_data_name_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
 uf.desc.append(Model_free.return_data_name_doc)
 # Prompt examples.
 uf.desc.append(Desc_container("Prompt examples"))

Modified: branches/interatomic/user_functions/value.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/user_functions/value.py?rev=17041&r1=17040&r2=17041&view=diff
==============================================================================
--- branches/interatomic/user_functions/value.py (original)
+++ branches/interatomic/user_functions/value.py Fri Jun 22 18:32:57 2012
@@ -32,6 +32,7 @@
 from generic_fns import diffusion_tensor, pipes, value
 from graphics import WIZARD_IMAGE_PATH
 from relax_errors import RelaxError
+from specific_fns.consistency_tests import Consistency_tests
 from specific_fns.jw_mapping import Jw_mapping
 from specific_fns.model_free import Model_free
 from specific_fns.relax_fit import Relax_fit
@@ -89,6 +90,8 @@
 uf.desc.append(Model_free.return_data_name_doc)
 uf.desc.append(Jw_mapping.set_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
+uf.desc.append(Consistency_tests.set_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
 uf.desc.append(Relax_fit.set_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(N_state_model.set_doc)
@@ -121,6 +124,7 @@
 uf.desc.append(regexp_doc)
 uf.desc.append(Model_free.return_data_name_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
 uf.desc.append(Noe.return_data_name_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(N_state_model.return_data_name_doc)
@@ -260,6 +264,8 @@
 uf.desc.append(Model_free.return_data_name_doc)
 uf.desc.append(Jw_mapping.set_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
+uf.desc.append(Consistency_tests.set_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
 uf.desc.append(Relax_fit.set_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(N_state_model.set_doc)
@@ -330,12 +336,15 @@
 uf.desc.append(Model_free.set_doc)
 uf.desc.append(Model_free.return_data_name_doc)
 uf.desc.append(Model_free.default_value_doc)
+uf.desc.append(diffusion_tensor.__set_doc__)
+uf.desc.append(diffusion_tensor.__return_data_name_doc__)
+uf.desc.append(diffusion_tensor.__default_value_doc__)
 uf.desc.append(Jw_mapping.set_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
 uf.desc.append(Jw_mapping.default_value_doc)
-uf.desc.append(diffusion_tensor.__set_doc__)
-uf.desc.append(diffusion_tensor.__return_data_name_doc__)
-uf.desc.append(diffusion_tensor.__default_value_doc__)
+uf.desc.append(Consistency_tests.set_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
+uf.desc.append(Consistency_tests.default_value_doc)
 uf.desc.append(Relax_fit.set_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(Relax_fit.default_value_doc)
@@ -422,6 +431,7 @@
 uf.desc.append(regexp_doc)
 uf.desc.append(Model_free.return_data_name_doc)
 uf.desc.append(Jw_mapping.return_data_name_doc)
+uf.desc.append(Consistency_tests.return_data_name_doc)
 uf.desc.append(Noe.return_data_name_doc)
 uf.desc.append(Relax_fit.return_data_name_doc)
 uf.desc.append(N_state_model.return_data_name_doc)




Related Messages


Powered by MHonArc, Updated Fri Jun 22 19:00:02 2012