mailr26168 - /trunk/specific_analyses/relax_disp/api.py


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

Header


Content

Posted by tlinnet on October 06, 2014 - 17:07:
Author: tlinnet
Date: Mon Oct  6 17:07:54 2014
New Revision: 26168

URL: http://svn.gna.org/viewcvs/relax?rev=26168&view=rev
Log:
Removed then function loop_cluster_ids() from dispersion API().

This should be implemented elsewhere.

Bug #22754 (https://gna.org/bugs/index.php?22754): The minimise.calculate() 
does not calculate chi2 value for clustered residues.

Modified:
    trunk/specific_analyses/relax_disp/api.py

Modified: trunk/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=26168&r1=26167&r2=26168&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/api.py   (original)
+++ trunk/specific_analyses/relax_disp/api.py   Mon Oct  6 17:07:54 2014
@@ -625,90 +625,6 @@
 
         # Minimisation.
         self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc, 
scaling_matrix=scaling_matrix, constraints=constraints, verbosity=verbosity, 
sim_index=sim_index)
-
-
-    def loop_cluster_ids(self, spin_id=None):
-        """Create list of cluster ids, its associated list of spin 
containers,  its associated list of spin_ids, the selection string for the 
cluster id and bool to determine if spin of interest is in the cluster.
-
-        @param spin_id:     The spin identification string.
-        @type spin_id:      None
-        @return:            The list of cluster ids, the nested list of spin 
container instances, the nested list of spin ids, the selection string for 
the cluster and list of boolean if spin_id is contained in cluster_id.
-        @rtype:             list of str, list of list of spin container, 
list of list of spin ids, list of str, list of bool
-        """
-
-        # Initialise cluster ids.
-        cluster_ids = ['free spins']
-
-        # Add the defined cluster IDs.
-        if hasattr(cdp, 'clustering'):
-            for key in list(cdp.clustering.keys()):
-                if key not in cluster_ids:
-                    cluster_ids.append(key)
-
-        # Now collect spins and spin_id per cluster ids.
-        cluster_spin_list = []
-        cluster_spin_id_list = []
-        cluster_spin_sel_list = []
-        clust_contain_spin_id_list = []
-
-        # Loop over the cluster ids
-        if hasattr(cdp, 'clustering'):
-            # Now loop over the cluster_ids in the list, and collect per id.
-            for cluster_id in cluster_ids:
-                cluster_id_spin_list = []
-                cluster_id_spin_id_list = []
-                # Now loop through spins in the clustered id, and collect
-                col_sel_str = ''
-                mol_token = None
-                for clust_spin_id in cdp.clustering[cluster_id]:
-                    clust_spin = return_spin(clust_spin_id)
-
-                    # Skip de-selected
-                    if not clust_spin.select:
-                        continue
-
-                    # Add to list.
-                    cluster_id_spin_list.append(clust_spin)
-                    cluster_id_spin_id_list.append(clust_spin_id)
-
-                    # Add id to string
-                    mol_token, res_token, spin_token = 
tokenise(clust_spin_id)
-                    col_sel_str += '%s,' % (res_token)
-
-                # Make selection for molecule.
-                if mol_token == None:
-                    col_sel_str = ':' + col_sel_str
-                else:
-                    col_sel_str = '#%s:' % mol_token + col_sel_str
-
-                # Make a selection object, based on the cluster id.
-                select_obj = Selection(col_sel_str)
-                # Does the current cluster id contain the spin of interest.
-                clust_contain_spin_id = select_obj.contains_spin_id(spin_id)
-                # If the spin_id is set to None, then we calculate for all:
-                if spin_id == None:
-                    clust_contain_spin_id = True
-
-                cluster_spin_list.append(cluster_id_spin_list)
-                cluster_spin_id_list.append(cluster_id_spin_id_list)
-                cluster_spin_sel_list.append(col_sel_str)
-                clust_contain_spin_id_list.append(clust_contain_spin_id)
-
-        # If clustering has not been specified, then collect for free spins, 
according to selection.
-        else:
-            # Now loop over selected spins.
-            free_spin_list = []
-            free_spin_id_list = []
-            for cur_spin, cur_spin_id in spin_loop(selection=spin_id, 
return_id=True, skip_desel=True):
-                free_spin_list.append(cur_spin)
-                free_spin_id_list.append(cur_spin_id)
-
-            cluster_spin_list.append(free_spin_list)
-            cluster_spin_id_list.append(free_spin_id_list)
-            cluster_spin_sel_list.append(None)
-            clust_contain_spin_id_list.append(True)
-
-        return cluster_ids, cluster_spin_list, cluster_spin_id_list, 
cluster_spin_sel_list, clust_contain_spin_id_list
 
 
     def map_bounds(self, param, spin_id=None):




Related Messages


Powered by MHonArc, Updated Mon Oct 06 17:20:01 2014