NDX.write doesn't work
richardjgowers opened this issue · comments
def write(self, filename=None, ncol=ncol, format=format):
"""Write index file to *filename* (or overwrite the file that the index was read from)"""
with open(self.filename(filename, ext='ndx'), 'w') as ndx:
for name in self:
atomnumbers = self._getarray(name) # allows overriding
ndx.write('[ {0!s} ]\n'.format(name))
> for k in xrange(0, len(atomnumbers), ncol):
E NameError: name 'xrange' is not defined
Oh Lord... really, I forgot an xrange?
closed in PR #153