Author: bugman Date: Thu Jul 2 23:27:38 2009 New Revision: 9186 URL: http://svn.gna.org/viewcvs/relax?rev=9186&view=rev Log: Shifted the set_domain() back-end from the N-state model to the alignment tensor. Modified: branches/frame_order/generic_fns/align_tensor.py branches/frame_order/specific_fns/n_state_model.py Modified: branches/frame_order/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/generic_fns/align_tensor.py?rev=9186&r1=9185&r2=9186&view=diff ============================================================================== --- branches/frame_order/generic_fns/align_tensor.py (original) +++ branches/frame_order/generic_fns/align_tensor.py Thu Jul 2 23:27:38 2009 @@ -1529,6 +1529,31 @@ """ +def set_domain(tensor=None, domain=None): + """Set the domain label for the given tensor. + + @param tensor: The alignment tensor label. + @type tensor: str + @param domain: The domain label. + @type domain: str + """ + + # Alias the current data pipe. + cdp = pipes.get_pipe() + + # Loop over the tensors. + match = False + for tensor_cont in cdp.align_tensors: + # Find the matching tensor and then store the domain label. + if tensor_cont.name == tensor: + tensor_cont.domain = domain + match = True + + # The tensor label doesn't exist. + if not match: + raise RelaxNoTensorError, ('alignment', tensor) + + def svd(basis_set=0, tensors=None): """Function for calculating the singular values of all the loaded tensors. Modified: branches/frame_order/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/specific_fns/n_state_model.py?rev=9186&r1=9185&r2=9186&view=diff ============================================================================== --- branches/frame_order/specific_fns/n_state_model.py (original) +++ branches/frame_order/specific_fns/n_state_model.py Thu Jul 2 23:27:38 2009 @@ -1830,31 +1830,6 @@ __docformat__ = "plaintext" - def set_domain(self, tensor=None, domain=None): - """Set the domain label for the given tensor. - - @param tensor: The alignment tensor label. - @type tensor: str - @param domain: The domain label. - @type domain: str - """ - - # Alias the current data pipe. - cdp = pipes.get_pipe() - - # Loop over the tensors. - match = False - for tensor_cont in cdp.align_tensors: - # Find the matching tensor and then store the domain label. - if tensor_cont.name == tensor: - tensor_cont.domain = domain - match = True - - # The tensor label doesn't exist. - if not match: - raise RelaxNoTensorError, ('alignment', tensor) - - def set_non_spin_params(self, value=None, param=None): """Function for setting all the N-state model parameter values.