mailr8622 - /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 22, 2009 - 18:49:
Author: bugman
Date: Thu Jan 22 18:49:23 2009
New Revision: 8622

URL: http://svn.gna.org/viewcvs/relax?rev=8622&view=rev
Log:
Fix for the MolContainer.reload_pdb() method.

The molecule number and not index should be checked!


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=8622&r1=8621&r2=8622&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/scientific.py (original)
+++ branches/multi_structure/generic_fns/structure/scientific.py Thu Jan 22 
18:49:23 2009
@@ -647,34 +647,34 @@
         # Print out.
         print "\n" + `model`
 
-        # Index for finding the molecule.
-        mol_index = 0
+        # Counter for finding the molecule.
+        mol_num = 1
 
         # First add the peptide chains.
         if hasattr(model, 'peptide_chains'):
             for mol in model.peptide_chains:
                 # Pack if the molecule index matches.
-                if mol_index == self.file_mol_num:
+                if mol_num == self.file_mol_num:
                     self.data = mol
                     return
 
-                mol_index = mol_index + 1
+                mol_num = mol_num + 1
 
         # Then the nucleotide chains.
         if hasattr(model, 'nucleotide_chains'):
             for mol in model.nucleotide_chains:
                 # Pack if the molecule index matches.
-                if mol_index == self.file_mol_num:
+                if mol_num == self.file_mol_num:
                     self.data = mol
                     return
 
-                mol_index = mol_index + 1
+                mol_num = mol_num + 1
 
         # Finally all other molecules.
         if hasattr(model, 'molecules'):
             for key in model.molecules.keys():
                 # Pack if the molecule index matches.
-                if mol_index == self.file_mol_num:
+                if mol_num == self.file_mol_num:
                     # Loop over the molecules.
                     self.data = []
                     for mol in model.molecules[key]:
@@ -682,7 +682,7 @@
 
                     return
 
-                mol_index = mol_index + 1
+                mol_num = mol_num + 1
 
 
     def to_xml(self, doc, element):




Related Messages


Powered by MHonArc, Updated Thu Jan 22 19:00:04 2009