mailr27629 - /trunk/lib/structure/internal/molecules.py


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

Header


Content

Posted by edward on February 11, 2015 - 11:28:
Author: bugman
Date: Wed Feb 11 11:28:15 2015
New Revision: 27629

URL: http://svn.gna.org/viewcvs/relax?rev=27629&view=rev
Log:
Completed the implementation of the sorting of structural data in the 
internal structural object.

The MolContainer._sort() private method now changes the connect atom indices 
in the bonded data
structure to the new sorted indices.


Modified:
    trunk/lib/structure/internal/molecules.py

Modified: trunk/lib/structure/internal/molecules.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/molecules.py?rev=27629&r1=27628&r2=27629&view=diff
==============================================================================
--- trunk/lib/structure/internal/molecules.py   (original)
+++ trunk/lib/structure/internal/molecules.py   Wed Feb 11 11:28:15 2015
@@ -279,6 +279,11 @@
         self.y = [self.y[i] for i in indices]
         self.z = [self.z[i] for i in indices]
 
+        # Change the bonded numbers, as the indices are now different.
+        for i in range(len(self.bonded)):
+            for j in range(len(self.bonded[i])):
+                self.bonded[i][j] = indices.index(self.bonded[i][j])
+
 
     def _sort_key(self, i):
         """Return the information for sorting the sequence data."""




Related Messages


Powered by MHonArc, Updated Wed Feb 11 11:40:02 2015