def _read_frame(self):
size = self.read_size()<EOL>title = self._f.readline()[:-<NUM_LIT:1>]<EOL>if self.symbols is None:<EOL><INDENT>symbols = []<EOL><DEDENT>coordinates = np.zeros((size, <NUM_LIT:3>), float)<EOL>for counter in range(size):<EOL><INDENT>line = self._f.readline()<EOL>if len(line) == <NUM_LIT:0>:<EOL><INDENT>raise StopIteration<EOL><DEDENT>words = line.split()<EOL>if len(words) < <NUM_LIT:4>:<EOL><INDENT>raise StopIteration<EOL><DEDENT>if self.symbols is None:<EOL><INDENT>symbols.append(words[<NUM_LIT:0>])<EOL><DEDENT>try:<EOL><INDENT>coordinates[counter, <NUM_LIT:0>] = float(words[<NUM_LIT:1>])<EOL>coordinates[counter, <NUM_LIT:1>] = float(words[<NUM_LIT:2>])<EOL>coordinates[counter, <NUM_LIT:2>] = float(words[<NUM_LIT:3>])<EOL><DEDENT>except ValueError:<EOL><INDENT>raise StopIteration<EOL><DEDENT><DEDENT>coordinates *= self.file_unit<EOL>if self.symbols is None:<EOL><INDENT>self.symbols = symbols<EOL><DEDENT>return title, coordinates<EOL>
Read a frame from the XYZ file