mailr18877 - in /trunk/generic_fns/structure: api_base.py scientific.py


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

Header


Content

Posted by edward on March 19, 2013 - 15:03:
Author: bugman
Date: Tue Mar 19 15:03:22 2013
New Revision: 18877

URL: http://svn.gna.org/viewcvs/relax?rev=18877&view=rev
Log:
Added the index_flag argument to all structural API atom_loop() methods.


Modified:
    trunk/generic_fns/structure/api_base.py
    trunk/generic_fns/structure/scientific.py

Modified: trunk/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/api_base.py?rev=18877&r1=18876&r2=18877&view=diff
==============================================================================
--- trunk/generic_fns/structure/api_base.py (original)
+++ trunk/generic_fns/structure/api_base.py Tue Mar 19 15:03:22 2013
@@ -132,7 +132,7 @@
         raise RelaxImplementError('are_bonded')
 
 
-    def atom_loop(self, atom_id=None, str_id=None, model_num=None, 
model_num_flag=False, mol_name_flag=False, res_num_flag=False, 
res_name_flag=False, atom_num_flag=False, atom_name_flag=False, 
element_flag=False, pos_flag=False, ave=False):
+    def atom_loop(self, atom_id=None, str_id=None, model_num=None, 
model_num_flag=False, mol_name_flag=False, res_num_flag=False, 
res_name_flag=False, atom_num_flag=False, atom_name_flag=False, 
element_flag=False, pos_flag=False, index_flag=False, ave=False):
         """Prototype generator method stub for looping over all atoms in the 
structural data object.
 
         This method should be designed as a generator 
(http://www.python.org/dev/peps/pep-0255/).
@@ -172,6 +172,8 @@
         @type element_flag:         bool
         @keyword pos_flag:          A flag which if True will cause the 
atomic position to be yielded.
         @type pos_flag:             bool
+        @keyword index_flag:        A flag which if True will cause the 
atomic index to be yielded.
+        @type index_flag:           bool
         @keyword ave:               A flag which if True will result in this 
method returning the average atom properties across all loaded structures.
         @type ave:                  bool
         @return:                    A tuple of atomic information, as 
described in the docstring.

Modified: trunk/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/scientific.py?rev=18877&r1=18876&r2=18877&view=diff
==============================================================================
--- trunk/generic_fns/structure/scientific.py (original)
+++ trunk/generic_fns/structure/scientific.py Tue Mar 19 15:03:22 2013
@@ -178,7 +178,7 @@
         return False
 
 
-    def atom_loop(self, atom_id=None, str_id=None, model_num=None, 
model_num_flag=False, mol_name_flag=False, res_num_flag=False, 
res_name_flag=False, atom_num_flag=False, atom_name_flag=False, 
element_flag=False, pos_flag=False, ave=False):
+    def atom_loop(self, atom_id=None, str_id=None, model_num=None, 
model_num_flag=False, mol_name_flag=False, res_num_flag=False, 
res_name_flag=False, atom_num_flag=False, atom_name_flag=False, 
element_flag=False, pos_flag=False, index_flag=False, ave=False):
         """Generator function for looping over all atoms in the Scientific 
Python data objects.
 
         @keyword atom_id:           The molecule, residue, and atom 
identifier string.  Only atoms
@@ -209,6 +209,8 @@
                                     yielded.
         @type pos_flag:             bool
                                     average atom properties across all 
loaded structures.
+        @keyword index_flag:        A flag which if True will cause the 
atomic index to be yielded.
+        @type index_flag:           bool
         @type ave:                  bool
         @return:                    A tuple of atomic information, as 
described in the docstring.
         @rtype:                     tuple consisting of optional molecule 
name (str), residue number




Related Messages


Powered by MHonArc, Updated Tue Mar 19 15:20:02 2013