def __init__(self, f, sub=slice(None)):
SlicedReader.__init__(self, f, sub)<EOL>s = None<EOL>self.num_atoms = <NUM_LIT:0><EOL>for line in self._f:<EOL><INDENT>if s is None:<EOL><INDENT>s = line[:<NUM_LIT:7>]<EOL><DEDENT>elif s != line[:<NUM_LIT:7>]:<EOL><INDENT>break<EOL><DEDENT>self.num_atoms += <NUM_LIT:1><EOL><DEDENT>self._f.seek(<NUM_LIT:0>)<EOL>
Arguments:
 | ``f``  --  a filename or a file-like object

Optional argument:
 | ``sub``  --  a slice object indicating which time frames to skip/read