mailr3155 - /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 March 13, 2007 - 04:34:
Author: bugman
Date: Tue Mar 13 04:34:03 2007
New Revision: 3155

URL: http://svn.gna.org/viewcvs/relax?rev=3155&view=rev
Log:
Fixed the problems with the classes of the 'data.mol_res_spin' module.

The add_item() methods of the list type classes have been modified.  For the 
MoleculeList class the
'mol_name' argument has been added and the MoleculeContainer.__init__() 
method accepts this argument
as well.  The 'res_name', 'res_num', 'spin_name', 'spin_num', and 'select' 
have similarily been
added.

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=3155&r1=3154&r2=3155&view=diff
==============================================================================
--- 1.3/data/mol_res_spin.py (original)
+++ 1.3/data/mol_res_spin.py Tue Mar 13 04:34:03 2007
@@ -36,13 +36,13 @@
 class SpinContainer:
     """Class containing all the spin system specific data."""
 
-    def __init__(self):
+    def __init__(self, spin_name=None, spin_num=None, select=1):
         """Set up the default objects of the spin system data container."""
 
         # The spin system name and number.
-        self.name = None
-        self.num = None
-        self.select = 1
+        self.name = spin_name
+        self.num = spin_num
+        self.select = select
 
 
     def __repr__(self):
@@ -102,10 +102,10 @@
         return text
 
 
-    def add_item(self):
+    def add_item(self, spin_name=None, spin_num=None, select=1):
         """Function for appending an empty container to the list."""
 
-        self.append(SpinContainer())
+        self.append(SpinContainer(spin_name, spin_num, select))
 
 
 
@@ -115,12 +115,12 @@
 class ResidueContainer:
     """Class containing all the residue specific data."""
 
-    def __init__(self):
+    def __init__(self, res_name=None, res_num=None):
         """Set up the default objects of the residue data container."""
 
         # The residue name and number.
-        self.name = None
-        self.num = None
+        self.name = res_name
+        self.num = res_num
 
         # The empty spin system list.
         self.spin = SpinList()
@@ -183,10 +183,10 @@
         return text
 
 
-    def add_item(self):
+    def add_item(self, res_name=None, res_num=None):
         """Function for appending an empty container to the list."""
 
-        self.append(ResidueContainer())
+        self.append(ResidueContainer(res_name, res_num))
 
 
 
@@ -196,11 +196,11 @@
 class MoleculeContainer:
     """Class containing all the molecule specific data."""
 
-    def __init__(self):
+    def __init__(self, mol_name=None):
         """Set up the default objects of the molecule data container."""
 
         # The name of the molecule, corresponding to that of the structure 
file if specified.
-        self.name = None
+        self.name = mol_name
 
         # The empty residue list.
         self.res = ResidueList()
@@ -253,7 +253,7 @@
         return text
 
 
-    def add_item(self):
+    def add_item(self, mol_name=None):
         """Function for appending an empty container to the list."""
 
-        self.append(MoleculeContainer())
+        self.append(MoleculeContainer(mol_name))




Related Messages


Powered by MHonArc, Updated Tue Mar 13 04:40:05 2007