mailr4226 - /branches/N_state_model/specific_fns/n_state_model.py


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

Header


Content

Posted by edward on December 20, 2007 - 18:16:
Author: bugman
Date: Thu Dec 20 18:16:33 2007
New Revision: 4226

URL: http://svn.gna.org/viewcvs/relax?rev=4226&view=rev
Log:
Created the N-state model function return_data_name().


Modified:
    branches/N_state_model/specific_fns/n_state_model.py

Modified: branches/N_state_model/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4226&r1=4225&r2=4226&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Thu Dec 20 18:16:33 
2007
@@ -27,3 +27,29 @@
 class N_state_model:
     def __init__(self):
         """Class containing functions for the N-state model."""
+
+
+    def return_data_name(self, name):
+        """
+        N-state model data type string matching patterns
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+        
____________________________________________________________________________________________
+        |                        |              |                            
                      |
+        | Data type              | Object name  | Patterns                   
                      |
+        
|________________________|______________|__________________________________________________|
+        |                        |              |                            
                      |
+        | Bond length            | 'r'          | '^r$' or '[Bb]ond[ 
-_][Ll]ength'                 |
+        |                        |              |                            
                      |
+        | CSA                    | 'csa'        | '^[Cc][Ss][Aa]$'           
                      |
+        
|________________________|______________|__________________________________________________|
+
+        """
+
+        # Bond length.
+        if search('^r$', name) or search('[Bb]ond[ -_][Ll]ength', name):
+            return 'r'
+
+        # CSA.
+        if search('^[Cc][Ss][Aa]$', name):
+            return 'csa'




Related Messages


Powered by MHonArc, Updated Thu Dec 20 18:20:13 2007