mailr8880 - /branches/bmrb/generic_fns/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 27, 2009 - 14:33:
Author: bugman
Date: Fri Feb 27 14:33:43 2009
New Revision: 8880

URL: http://svn.gna.org/viewcvs/relax?rev=8880&view=rev
Log:
The molecules are now looped over in preparation for the molecule assembly.


Modified:
    branches/bmrb/generic_fns/mol_res_spin.py

Modified: branches/bmrb/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/mol_res_spin.py?rev=8880&r1=8879&r2=8880&view=diff
==============================================================================
--- branches/bmrb/generic_fns/mol_res_spin.py (original)
+++ branches/bmrb/generic_fns/mol_res_spin.py Fri Feb 27 14:33:43 2009
@@ -504,8 +504,14 @@
     # Get the molecule names.
     mol_names = get_molecule_names()
 
-    # Add the entity.
-    star.entity.add(mol_names[0])
+    # Loop over the names.
+    for i in range(len(mol_names)):
+        # Test that the molecule has a name!
+        if not mol_names[i]:
+            raise RelaxError, "All molecules must be named."
+
+        # Add the entity.
+        star.entity.add(mol_names[i])
 
 
 def copy_molecule(pipe_from=None, mol_from=None, pipe_to=None, mol_to=None):




Related Messages


Powered by MHonArc, Updated Fri Feb 27 14:40:02 2009