Author: bugman Date: Sun Jun 29 14:42:03 2008 New Revision: 6582 URL: http://svn.gna.org/viewcvs/relax?rev=6582&view=rev Log: Modified exists_mol_res_spin_data() to accept the data pipe arg. Modified: 1.3/generic_fns/mol_res_spin.py Modified: 1.3/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=6582&r1=6581&r2=6582&view=diff ============================================================================== --- 1.3/generic_fns/mol_res_spin.py (original) +++ 1.3/generic_fns/mol_res_spin.py Sun Jun 29 14:42:03 2008 @@ -1028,21 +1028,24 @@ print "%-15s %-15s %-15s %-15s %-15s" % (mol_name, `res_num`, res_name, `spin.num`, spin.name) -def exists_mol_res_spin_data(): +def exists_mol_res_spin_data(pipe=None): """Function for determining if any molecule-residue-spin data exists. + @keyword pipe: The data pipe in which the molecule-residue-spin data will be checked for. + @type pipe: str @return: The answer to the question about the existence of data. @rtype: bool """ + # The current data pipe. + if pipe == None: + pipe = ds.current_pipe + # Test the data pipe. - pipes.test(ds.current_pipe) - - # Alias the data pipe container. - cdp = ds[ds.current_pipe] + pipes.test(pipe) # The molecule, residue, spin object stack is empty. - if cdp.mol.is_empty(): + if ds[pipe].mol.is_empty(): return False # Otherwise.