mailr3515 - /1.3/generic_fns/molecule.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:49:
Author: bugman
Date: Sun Nov 11 22:49:55 2007
New Revision: 3515

URL: http://svn.gna.org/viewcvs/relax?rev=3515&view=rev
Log:
Simplified generic_fns.molecule.display().

The function was also updated to the same format as the equivalent residue 
and spin functions.


Modified:
    1.3/generic_fns/molecule.py

Modified: 1.3/generic_fns/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/molecule.py?rev=3515&r1=3514&r2=3515&view=diff
==============================================================================
--- 1.3/generic_fns/molecule.py (original)
+++ 1.3/generic_fns/molecule.py Sun Nov 11 22:49:55 2007
@@ -177,13 +177,11 @@
     # Split up the selection string.
     mol_token, res_token, spin_token = tokenise(mol_id)
 
-    # Disallow spin selections.
-    if spin_token != None:
-        raise RelaxSpinSelectDisallowError
-
-    # Disallow residue selections.
+    # Disallowed selections.
     if res_token != None:
         raise RelaxResSelectDisallowError
+    if spin_token != None:
+        raise RelaxSpinSelectDisallowError
 
     # The molecule selection string.
     if mol_token:
@@ -192,13 +190,12 @@
         mol_sel = None
 
     # Print a header.
-    print "\nMolecule information:"
-    print "%-20s%-10s" % ("Name", "Number of residues")
+    print "\n\n%-15s %-15s" % ("Molecule", "Number of residues")
 
     # Molecule loop.
     for mol in molecule_loop(mol_sel):
         # Print the molecule data.
-        print "%-20s%-10i" % (mol.name, len(mol.res))
+        print "%-15s %-15s" % (mol.name, `len(mol.res)`)
 
 
 def rename(mol_id, new_name=None):




Related Messages


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