mailr6671 - /branches/rdc_analysis/generic_fns/structure/internal.py


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

Header


Content

Posted by edward on July 04, 2008 - 16:35:
Author: bugman
Date: Fri Jul  4 16:14:32 2008
New Revision: 6671

URL: http://svn.gna.org/viewcvs/relax?rev=6671&view=rev
Log:
The internal PDB object atom_loop() method now recognises the ave arg, but 
does nothing when True.


Modified:
    branches/rdc_analysis/generic_fns/structure/internal.py

Modified: branches/rdc_analysis/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6671&r1=6670&r2=6671&view=diff
==============================================================================
--- branches/rdc_analysis/generic_fns/structure/internal.py (original)
+++ branches/rdc_analysis/generic_fns/structure/internal.py Fri Jul  4 
16:14:32 2008
@@ -414,35 +414,41 @@
         # Generate the selection object.
         sel_obj = Selection(atom_id)
 
-        # Loop over the models.
-        for struct in self.structural_data:
-            # Loop over all atoms.
-            for i in xrange(len(struct.atom_name)):
-                # Skip non-matching atoms.
-                if sel_obj and not sel_obj.contains_spin(struct.atom_num[i], 
struct.atom_name[i], struct.res_num[i], struct.res_name[i]):
-                    continue
-
-                # Build the tuple to be yielded.
-                atomic_tuple = ()
-                if model_num_flag:
-                    atomic_tuple = atomic_tuple + (struct.model,)
-                if mol_name_flag:
-                    atomic_tuple = atomic_tuple + (None,)
-                if res_num_flag:
-                    atomic_tuple = atomic_tuple + (struct.res_num[i],)
-                if res_name_flag:
-                    atomic_tuple = atomic_tuple + (struct.res_name[i],)
-                if atom_num_flag:
-                    atomic_tuple = atomic_tuple + (struct.atom_num[i],)
-                if atom_name_flag:
-                    atomic_tuple = atomic_tuple + (struct.atom_name[i],)
-                if element_flag:
-                    atomic_tuple = atomic_tuple + (struct.element[i],)
-                if pos_flag:
-                    atomic_tuple = atomic_tuple + (array([struct.x[i], 
struct.y[i], struct.z[i]], float64),)
-
-                # Yield the information.
-                yield atomic_tuple
+        # Average properties mode.
+        if ave:
+            pass
+
+        # Individual structure mode.
+        else:
+            # Loop over the models.
+            for struct in self.structural_data:
+                # Loop over all atoms.
+                for i in xrange(len(struct.atom_name)):
+                    # Skip non-matching atoms.
+                    if sel_obj and not 
sel_obj.contains_spin(struct.atom_num[i], struct.atom_name[i], 
struct.res_num[i], struct.res_name[i]):
+                        continue
+
+                    # Build the tuple to be yielded.
+                    atomic_tuple = ()
+                    if model_num_flag:
+                        atomic_tuple = atomic_tuple + (struct.model,)
+                    if mol_name_flag:
+                        atomic_tuple = atomic_tuple + (None,)
+                    if res_num_flag:
+                        atomic_tuple = atomic_tuple + (struct.res_num[i],)
+                    if res_name_flag:
+                        atomic_tuple = atomic_tuple + (struct.res_name[i],)
+                    if atom_num_flag:
+                        atomic_tuple = atomic_tuple + (struct.atom_num[i],)
+                    if atom_name_flag:
+                        atomic_tuple = atomic_tuple + (struct.atom_name[i],)
+                    if element_flag:
+                        atomic_tuple = atomic_tuple + (struct.element[i],)
+                    if pos_flag:
+                        atomic_tuple = atomic_tuple + (array([struct.x[i], 
struct.y[i], struct.z[i]], float64),)
+
+                    # Yield the information.
+                    yield atomic_tuple
 
 
     def load_pdb(self, file_path, model=None, verbosity=False):




Related Messages


Powered by MHonArc, Updated Fri Jul 04 16:40:12 2008