mailr12501 - /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 01, 2011 - 21:34:
Author: bugman
Date: Tue Feb  1 21:34:55 2011
New Revision: 12501

URL: http://svn.gna.org/viewcvs/relax?rev=12501&view=rev
Log:
Brackets are now removed from the molecule name - this kills the spin IDs.


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=12501&r1=12500&r2=12501&view=diff
==============================================================================
--- branches/bmrb/generic_fns/mol_res_spin.py (original)
+++ branches/bmrb/generic_fns/mol_res_spin.py Tue Feb  1 21:34:55 2011
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2003-2004, 2006-2009 Edward d'Auvergne                       
 #
+# Copyright (C) 2003-2004, 2006-2011 Edward d'Auvergne                       
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -38,7 +38,7 @@
 # Python module imports.
 from numpy import array
 from re import split
-from string import count, strip, upper
+from string import count, replace, strip, upper
 from textwrap import fill
 from warnings import warn
 
@@ -504,9 +504,14 @@
 
     # Get the entities.
     for data in star.entity.loop():
+        # Remove brackets from the molecule name.
+        mol_name = data['mol_name']
+        mol_name = replace(mol_name, '(', '')
+        mol_name = replace(mol_name, ')', '')
+
         # Add the residues.
         for i in range(len(data['res_nums'])):
-            create_residue(data['res_nums'][i], data['res_names'][i], 
mol_name=data['mol_name'])
+            create_residue(data['res_nums'][i], data['res_names'][i], 
mol_name=mol_name)
 
 
 def bmrb_write_entity(star, version=None):




Related Messages


Powered by MHonArc, Updated Tue Feb 01 21:40:02 2011