def _read_frame(self):
<EOL>line = next(self._f)<EOL>if line != '<STR_LIT>':<EOL><INDENT>raise FileFormatError("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>line = next(self._f)<EOL>step = int(line)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise FileFormatError("<STR_LIT>" % line[:-<NUM_LIT:1>])<EOL><DEDENT>line = next(self._f)<EOL>if line != '<STR_LIT>':<EOL><INDENT>raise FileFormatError("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>line = next(self._f)<EOL>num_atoms = int(line)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise FileFormatError("<STR_LIT>" % line[:-<NUM_LIT:1>])<EOL><DEDENT>if num_atoms != self.num_atoms:<EOL><INDENT>raise FileFormatError("<STR_LIT>")<EOL><DEDENT>for i in range(<NUM_LIT:4>):<EOL><INDENT>next(self._f)<EOL><DEDENT>line = next(self._f)<EOL>if line != '<STR_LIT>':<EOL><INDENT>raise FileFormatError("<STR_LIT>")<EOL><DEDENT>fields = [list() for i in range(len(self.units))]<EOL>for i in range(self.num_atoms):<EOL><INDENT>line = next(self._f)<EOL>words = line.split()[<NUM_LIT:1>:]<EOL>for j in range(len(fields)):<EOL><INDENT>fields[j].append(float(words[j]))<EOL><DEDENT><DEDENT>fields = [step] + [np.array(field)*unit for field, unit in zip(fields, self.units)]<EOL>return fields<EOL>
Read and return the next time frame