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'