mailr5369 - /1.3/generic_fns/structure/api_base.py


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

Header


Content

Posted by edward on April 07, 2008 - 16:47:
Author: bugman
Date: Mon Apr  7 16:47:28 2008
New Revision: 5369

URL: http://svn.gna.org/viewcvs/relax?rev=5369&view=rev
Log:
Added the atom_loop() prototype generator method stub to the structural API.


Modified:
    1.3/generic_fns/structure/api_base.py

Modified: 1.3/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/api_base.py?rev=5369&r1=5368&r2=5369&view=diff
==============================================================================
--- 1.3/generic_fns/structure/api_base.py (original)
+++ 1.3/generic_fns/structure/api_base.py Mon Apr  7 16:47:28 2008
@@ -84,6 +84,29 @@
         raise RelaxImplementError
 
 
+    def atom_loop(self, pos=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/).
+        It should loop over all atoms of the system yielding the molecule 
name, residue number and
+        name, and atom number and name.  If the pos argument is True, then 
the atom position should
+        also be yielded.
+
+
+        @keyword pos:   A flag which if True will cause the atom position to 
be yielded along with
+                        all the other information.
+        @type pos:      bool
+        @return:        A tuple consisting of the molecule name, residue 
number, residue name, atom
+                        number, and atom name.  If pos is True, then the 3D 
array of the atom
+                        position is also returned.
+        @rtype:         tuple (str, int, str, int, str) and if pos==True, 
(str, int, str, int, str,
+                        array of len 3)
+        """
+
+        # Raise the error.
+        raise RelaxImplementError
+
+
     def load_structures(self, file_path, model, verbosity=False):
         """Prototype method stub for loading structures from a file.
 




Related Messages


Powered by MHonArc, Updated Mon Apr 07 17:00:19 2008