mailr5507 - /1.3/generic_fns/selection.py


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

Header


Content

Posted by edward on April 09, 2008 - 17:16:
Author: bugman
Date: Wed Apr  9 17:04:22 2008
New Revision: 5507

URL: http://svn.gna.org/viewcvs/relax?rev=5507&view=rev
Log:
Deleted the exists_mol_data(), exists_res_data(), and exists_spin_data() 
functions.

These are now redundant because of the is_empty() methods of the mol-res-spin 
data object stack.


Modified:
    1.3/generic_fns/selection.py

Modified: 1.3/generic_fns/selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/selection.py?rev=5507&r1=5506&r2=5507&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Wed Apr  9 17:04:22 2008
@@ -395,89 +395,6 @@
     return True
 
 
-def exists_mol_data(mol_container):
-    """Function for determining if any data exists in the given molecule 
container.
-
-    @param mol_container:   The ResidueContainer object.
-    @type mol_container:    class instance
-    @return:                The answer to the question about the existence 
of data.
-    @rtype:                 bool
-    """
-
-    # The single molecule has been named.
-    if mol_container.name != None:
-        return True
-
-    # More than 1 residue (hence data exists).
-    if len(mol_container.res) > 1:
-        return True
-
-    # The single residue contains data.
-    if exists_res_data(mol_container.res[0]):
-        return True
-
-    # No data!
-    return False
-
-
-def exists_res_data(res_container):
-    """Function for determining if any data exists in the given residue 
container.
-
-    @param res_container:   The ResidueContainer object.
-    @type res_container:    class instance
-    @return:                The answer to the question about the existence 
of data.
-    @rtype:                 bool
-    """
-
-    # The single residue has been named or numbered.
-    if res_container.name != None or res_container.num != None:
-        return True
-
-    # More than 1 spin (hence data exists).
-    if len(res_container.spin) > 1:
-        return True
-
-    # The single spin contains data.
-    if exists_spin_data(res_container.spin[0]):
-        return True
-
-    # No data!
-    return False
-
-
-def exists_spin_data(spin_container):
-    """Function for determining if any data exists in the given spin 
container.
-
-    @param spin_container:  The SpinContainer object.
-    @type spin_container:   class instance
-    @return:                The answer to the question about the existence 
of data.
-    @rtype:                 bool
-    """
-
-    # The single spin has been named or numbered.
-    if spin_container.name != None or spin_container.num != None:
-        return True
-
-    # The object names in an empty spin container.
-    white_list = ['name', 'num', 'select'] 
-
-    # Loop over the objects in the spin container.
-    for name in dir(spin_container):
-        # Skip white listed objects.
-        if name in white_list:
-            continue
-
-        # Skip objects beginning with '__'.
-        if search('^__', name):
-            continue
-
-        # Found an object not in the white list (hence the spin container 
has been modified).
-        return True
-
-    # No data!
-    return False
-
-
 def generate_spin_id(data=None, mol_name_col=None, res_num_col=0, 
res_name_col=1, spin_num_col=None, spin_name_col=None):
     """Function for generating the spin selection string from the given data.
 




Related Messages


Powered by MHonArc, Updated Wed Apr 09 17:20:17 2008