Author: bugman
Date: Tue Sep 23 18:21:42 2014
New Revision: 25976
URL: http://svn.gna.org/viewcvs/relax?rev=25976&view=rev
Log:
Fixes for the new structural object Internal_selection object.
The atom indices are not stored via the molecule index.
Modified:
trunk/lib/structure/internal/selection.py
Modified: trunk/lib/structure/internal/selection.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/selection.py?rev=25976&r1=25975&r2=25976&view=diff
==============================================================================
--- trunk/lib/structure/internal/selection.py (original)
+++ trunk/lib/structure/internal/selection.py Tue Sep 23 18:21:42 2014
@@ -24,7 +24,7 @@
class Internal_selection:
- """The fast structural selection object."""
+ """The fast structural selection object."""
def __init__(self):
"""Set up the object."""
@@ -45,8 +45,11 @@
@type atom_index: int
"""
+ # Find the molecule index.
+ index = self._mol_indices.index(mol_index)
+
# Store the index.
- self._atom_indices[mol_index].append(atom_index)
+ self._atom_indices[index].append(atom_index)
def add_mol(self, mol_index=None):
@@ -72,6 +75,9 @@
# Molecule loop.
for mol_index in self._mol_indices:
+ # Find the molecule index.
+ index = self._mol_indices.index(mol_index)
+
# Atom loop.
- for atom_index in self._atom_indices[mol_index]:
+ for atom_index in self._atom_indices[index]:
yield mol_index, atom_index
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits