mailr8484 - /branches/multi_structure/generic_fns/structure/scientific.py


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

Header


Content

Posted by edward on January 15, 2009 - 18:03:
Author: bugman
Date: Thu Jan 15 18:03:36 2009
New Revision: 8484

URL: http://svn.gna.org/viewcvs/relax?rev=8484&view=rev
Log:
Bug fixes for the non-protein and non-RNA Scientific python molecules.

A new MolContainer list-type class has been added to store the molecules.


Modified:
    branches/multi_structure/generic_fns/structure/scientific.py

Modified: branches/multi_structure/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/scientific.py?rev=8484&r1=8483&r2=8484&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/scientific.py (original)
+++ branches/multi_structure/generic_fns/structure/scientific.py Thu Jan 15 
18:03:36 2009
@@ -202,7 +202,10 @@
         # Other molecules.
         else:
             res_index = -1
+            print mol
+            print "\n"*10
             for res in mol:
+                print res
                 # Residue index.
                 res_index = res_index + 1
 
@@ -638,8 +641,15 @@
             # Finally all other molecules (generating the molecule names and 
incrementing the molecule index).
             if hasattr(model, 'molecules'):
                 for key in model.molecules.keys():
-                    mol_conts[-1].append(model.molecules[key][0])
+                    # Add an empty list-type container.
+                    mol_conts[-1].append(MolContainer())
                     mol_conts[-1][-1].mol_type = 'other'
+
+                    # Loop over the molecules.
+                    for mol in model.molecules[key]:
+                        mol_conts[-1][-1].append(mol)
+
+                    # Update structures.
                     self.target_mol_name(set=set_mol_name, 
target=new_mol_name, index=mol_index, mol_num=mol_index+1, file=file)
                     mol_index = mol_index + 1
 
@@ -651,3 +661,7 @@
 
         # Loading worked.
         return True
+
+
+class MolContainer(list):
+    """The empty list-type container for the non-protein and non-RNA 
molecular information."""




Related Messages


Powered by MHonArc, Updated Thu Jan 15 18:40:02 2009