mailr8187 - in /1.3/generic_fns: mol_res_spin.py structure/main.py


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

Header


Content

Posted by edward on December 11, 2008 - 10:33:
Author: bugman
Date: Thu Dec 11 10:33:32 2008
New Revision: 8187

URL: http://svn.gna.org/viewcvs/relax?rev=8187&view=rev
Log:
Partial fix for bug #12735 (https://gna.org/bugs/index.php?12735).

The problem fixed here is that of the missing molecule container.  This was 
caused by the weirdness
of the Scientific python PDB reader splitting one modified lactose molecule 
into 2 molecules.  The
lactose part was unnamed, while the modifier was named after the residues 
'UNK'.  The
generic_fns.mol_res_spin.return_molecule() function was having problems with 
this concept of the
first molecule unnamed and the second named.  This is now fixed and the 
unnamed molecule can be
retrieved.


Modified:
    1.3/generic_fns/mol_res_spin.py
    1.3/generic_fns/structure/main.py

Modified: 1.3/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=8187&r1=8186&r2=8187&view=diff
==============================================================================
--- 1.3/generic_fns/mol_res_spin.py (original)
+++ 1.3/generic_fns/mol_res_spin.py Thu Dec 11 10:33:32 2008
@@ -1601,6 +1601,10 @@
     for mol in dp.mol:
         # Skip the molecule if there is no match to the selection.
         if mol not in select_obj:
+            continue
+
+        # Skip named molecules if the selection is None.
+        if selection == None and mol.name != None:
             continue
 
         # Store the molecule container.

Modified: 1.3/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=8187&r1=8186&r2=8187&view=diff
==============================================================================
--- 1.3/generic_fns/structure/main.py (original)
+++ 1.3/generic_fns/structure/main.py Thu Dec 11 10:33:32 2008
@@ -81,9 +81,9 @@
             # The container.
             mol_cont = return_molecule(id)
 
-        # The is only one molecule and it is unnamed.
-        elif cdp.mol[0].name == None and len(cdp.mol) == 1:
-            mol_cont = cdp.mol[0]
+        # Get the unnamed molecule, assuming there is only one.
+        else:
+            mol_cont = return_molecule()
 
         # Add the molecule if it doesn't exist.
         if mol_cont == None:




Related Messages


Powered by MHonArc, Updated Thu Dec 11 11:00:03 2008