mailr3510 - /1.3/generic_fns/residue.py


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

Header


Content

Posted by edward on November 11, 2007 - 22:38:
Author: bugman
Date: Sun Nov 11 22:38:04 2007
New Revision: 3510

URL: http://svn.gna.org/viewcvs/relax?rev=3510&view=rev
Log:
Large simplifications to the generic_fns.residue.display() function.

This is in anticipation of the addition of the full_info flag to the residue 
loop.


Modified:
    1.3/generic_fns/residue.py

Modified: 1.3/generic_fns/residue.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/residue.py?rev=3510&r1=3509&r2=3510&view=diff
==============================================================================
--- 1.3/generic_fns/residue.py (original)
+++ 1.3/generic_fns/residue.py Sun Nov 11 22:38:04 2007
@@ -181,27 +181,12 @@
     if spin_token != None:
         raise RelaxSpinSelectDisallowError
 
-    # The molecule selection string.
-    if mol_token:
-        mol_sel = '#' + mol_token
-    else:
-        mol_sel = None
-
-    # Molecule loop.
-    for mol in molecule_loop(mol_sel):
-        # Print a header.
-        print "\n\nMolecule: " + `mol.name`
-        print "%-8s%-8s%-10s" % ("Number", "Name", "Number of spins")
-
-        # The residue identifier for this molecule.
-        res_sel = '#' + mol.name
-        if res_token:
-            res_sel = res_sel + ':' + res_token
-
-        # Loop over the residues of this molecule.
-        for res in residue_loop(res_sel):
-            # Print the residue data.
-            print "%-8i%-8s%-10i" % (res.num, res.name, len(res.spin))
+    # Print a header.
+    print "\n\n%-15s%-15s%-15s%-15s" % ("Molecule", "Res number", "Res 
name", "Number of spins")
+
+    # Residue loop.
+    for res, mol_name in residue_loop(res_id, full_info=True):
+        print "%-15s%-15s%-15s" % (mol_name, `res.num`, res.name, 
len(res.spin))
 
 
 def rename(res_id, new_name=None):




Related Messages


Powered by MHonArc, Updated Sun Nov 11 23:00:19 2007