mailr5434 - in /1.3/generic_fns/structure: main.py scientific.py


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

Header


Content

Posted by edward on April 08, 2008 - 15:42:
Author: bugman
Date: Tue Apr  8 15:21:22 2008
New Revision: 5434

URL: http://svn.gna.org/viewcvs/relax?rev=5434&view=rev
Log:
Added the atom_id keyword to the Scientific Python PDB data object 
atom_loop() method.


Modified:
    1.3/generic_fns/structure/main.py
    1.3/generic_fns/structure/scientific.py

Modified: 1.3/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=5434&r1=5433&r2=5434&view=diff
==============================================================================
--- 1.3/generic_fns/structure/main.py (original)
+++ 1.3/generic_fns/structure/main.py Tue Apr  8 15:21:22 2008
@@ -53,7 +53,7 @@
     cdp = relax_data_store[relax_data_store.current_pipe]
 
     # Loop over all atoms of the spin_id selection.
-    for mol_name, res_num, res_name, atom_num, atom_name, pos in 
cdp.structure.atom_loop(spin_id=spin_id, pos=True):
+    for mol_name, res_num, res_name, atom_num, atom_name, pos in 
cdp.structure.atom_loop(atom_id=spin_id, pos=True):
         # Get the corresponding molecule container.
         mol_cont = return_molecule('#' + mol_name)
 

Modified: 1.3/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=5434&r1=5433&r2=5434&view=diff
==============================================================================
--- 1.3/generic_fns/structure/scientific.py (original)
+++ 1.3/generic_fns/structure/scientific.py Tue Apr  8 15:21:22 2008
@@ -51,17 +51,20 @@
     id = 'scientific'
 
 
-    def atom_loop(self, pos=False):
+    def atom_loop(self, atom_id=None, pos=False):
         """Generator function for looping over all atoms in the Scientific 
Python data objects.
 
-        @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)
+        @keyword atom_id:   The molecule, residue, and atom identifier 
string.  Only atoms matching
+                            this selection will be yielded.
+        @type atom_id:      str
+        @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)
         """
 
         # Split up the selection string.




Related Messages


Powered by MHonArc, Updated Tue Apr 08 16:20:16 2008