mailr12492 - in /branches/bmrb: generic_fns/bmrb.py generic_fns/relax_data.py specific_fns/model_free/bmrb.py


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

Header


Content

Posted by edward on February 01, 2011 - 20:04:
Author: bugman
Date: Tue Feb  1 20:04:57 2011
New Revision: 12492

URL: http://svn.gna.org/viewcvs/relax?rev=12492&view=rev
Log:
Fixes for the new generic_fns.bmrb functions molecule_names() and num_spins().


Modified:
    branches/bmrb/generic_fns/bmrb.py
    branches/bmrb/generic_fns/relax_data.py
    branches/bmrb/specific_fns/model_free/bmrb.py

Modified: branches/bmrb/generic_fns/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/bmrb.py?rev=12492&r1=12491&r2=12492&view=diff
==============================================================================
--- branches/bmrb/generic_fns/bmrb.py (original)
+++ branches/bmrb/generic_fns/bmrb.py Tue Feb  1 20:04:57 2011
@@ -115,7 +115,7 @@
         create_spin(spin_num=spin_nums[i], spin_name=spin_names[i], 
res_num=res_nums[i], res_name=res_names[i], mol_name=mol_names[i])
 
 
-def molecule_names(data):
+def molecule_names(data, N=0):
     """Generate the molecule names list.
 
     @param data:    An element of data from bmrblib.
@@ -127,7 +127,7 @@
     # The molecule index and name.
     mol_index = []
     for i in range(N):
-        if 'entity_ids' in keys and data['entity_ids'] != None and 
data['entity_ids'][i] != None:
+        if 'entity_ids' in data.keys() and data['entity_ids'] != None and 
data['entity_ids'][i] != None:
             mol_index.append(int(data['entity_ids'][i]) -1 )
         else:
             mol_index = [0]*N

Modified: branches/bmrb/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/relax_data.py?rev=12492&r1=12491&r2=12492&view=diff
==============================================================================
--- branches/bmrb/generic_fns/relax_data.py (original)
+++ branches/bmrb/generic_fns/relax_data.py Tue Feb  1 20:04:57 2011
@@ -260,7 +260,7 @@
             continue
 
         # The molecule names.
-        mol_names = bmrb.molecule_names(data)
+        mol_names = bmrb.molecule_names(data, N)
 
         # Pack the data.
         pack_data(ri_label, frq_label, frq, data['data'], data['errors'], 
mol_names=mol_names, res_nums=data['res_nums'], res_names=data['res_names'], 
spin_nums=None, spin_names=data['atom_names'], gen_seq=True)

Modified: branches/bmrb/specific_fns/model_free/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=12492&r1=12491&r2=12492&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Tue Feb  1 20:04:57 2011
@@ -140,7 +140,7 @@
                 continue
 
             # The molecule names.
-            mol_names = bmrb.molecule_names(data)
+            mol_names = bmrb.molecule_names(data, N)
 
             # Generate the spin IDs.
             spin_ids = []




Related Messages


Powered by MHonArc, Updated Tue Feb 01 20:20:05 2011