mailr5009 - /1.3/data/mol_res_spin.py


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

Header


Content

Posted by edward on February 15, 2008 - 11:37:
Author: bugman
Date: Fri Feb 15 11:37:58 2008
New Revision: 5009

URL: http://svn.gna.org/viewcvs/relax?rev=5009&view=rev
Log:
Converted all the select variables of the mol-res-spin structures to booleans.


Modified:
    1.3/data/mol_res_spin.py

Modified: 1.3/data/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/mol_res_spin.py?rev=5009&r1=5008&r2=5009&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Fri Feb 15 11:37:58 2008
@@ -38,7 +38,7 @@
 class SpinContainer(Prototype):
     """Class containing all the spin system specific data."""
 
-    def __init__(self, spin_name=None, spin_num=None, select=1):
+    def __init__(self, spin_name=None, spin_num=None, select=True):
         """Set up the default objects of the spin system data container."""
 
         # The spin system name and number.
@@ -98,13 +98,13 @@
         # Residue data.
         text = text + "%-8s%-8s%-8s%-10s" % ("Index", "Number", "Name", 
"Selected") + "\n"
         for i in xrange(len(self)):
-            text = text + "%-8i%-8s%-8s%-10i" % (i, `self[i].num`, 
self[i].name, self[i].select) + "\n"
+            text = text + "%-8i%-8s%-8s%-10s" % (i, `self[i].num`, 
self[i].name, self[i].select) + "\n"
         text = text + "\nThese can be accessed by typing 
'D.mol[i].res[j].spin[k]', where D is the relax data storage object.\n"
 
         return text
 
 
-    def add_item(self, spin_name=None, spin_num=None, select=1):
+    def add_item(self, spin_name=None, spin_num=None, select=True):
         """Function for appending an empty container to the list."""
 
         self.append(SpinContainer(spin_name, spin_num, select))
@@ -117,7 +117,7 @@
 class ResidueContainer(Prototype):
     """Class containing all the residue specific data."""
 
-    def __init__(self, res_name=None, res_num=None, select=1):
+    def __init__(self, res_name=None, res_num=None, select=True):
         """Set up the default objects of the residue data container."""
 
         # The residue name and number.
@@ -180,13 +180,13 @@
         # Residue data.
         text = text + "%-8s%-8s%-8s%-10s" % ("Index", "Number", "Name", 
"Selected") + "\n"
         for i in xrange(len(self)):
-            text = text + "%-8i%-8s%-8s%-10i" % (i, `self[i].num`, 
self[i].name, self[i].select) + "\n"
+            text = text + "%-8i%-8s%-8s%-10s" % (i, `self[i].num`, 
self[i].name, self[i].select) + "\n"
         text = text + "\nThese can be accessed by typing 'D.mol[i].res[j]', 
where D is the relax data storage object.\n"
 
         return text
 
 
-    def add_item(self, res_name=None, res_num=None, select=1):
+    def add_item(self, res_name=None, res_num=None, select=True):
         """Function for appending an empty container to the list."""
 
         self.append(ResidueContainer(res_name, res_num, select))
@@ -199,7 +199,7 @@
 class MoleculeContainer(Prototype):
     """Class containing all the molecule specific data."""
 
-    def __init__(self, mol_name=None, select=1):
+    def __init__(self, mol_name=None, select=True):
         """Set up the default objects of the molecule data container."""
 
         # The name of the molecule, corresponding to that of the structure 
file if specified.
@@ -252,12 +252,12 @@
         text = "Molecules.\n\n"
         text = text + "%-8s%-8s%-10s" % ("Index", "Name", "Selected") + "\n"
         for i in xrange(len(self)):
-            text = text + "%-8i%-8s%-10i" % (i, self[i].name, 
self[i].select) + "\n"
+            text = text + "%-8i%-8s%-10s" % (i, self[i].name, 
self[i].select) + "\n"
         text = text + "\nThese can be accessed by typing 'D.mol[i]', where D 
is the relax data storage object.\n"
         return text
 
 
-    def add_item(self, mol_name=None, select=1):
+    def add_item(self, mol_name=None, select=True):
         """Function for appending an empty container to the list."""
 
         self.append(MoleculeContainer(mol_name, select))




Related Messages


Powered by MHonArc, Updated Fri Feb 15 12:00:49 2008