def _read_frame(self):
self._secfile.get_next("<STR_LIT>")<EOL>frame = ATRJFrame()<EOL>energy_lines = self._secfile.get_next("<STR_LIT>")<EOL>energy_words = energy_lines[<NUM_LIT:0>].split()<EOL>frame.time = float(energy_words[<NUM_LIT:0>])*picosecond<EOL>frame.step = int(energy_words[<NUM_LIT:1>])<EOL>frame.total_energy = float(energy_words[<NUM_LIT:2>])*kcalmol<EOL>coord_lines = self._secfile.get_next("<STR_LIT>")<EOL>frame.coordinates = np.zeros((self.num_atoms, <NUM_LIT:3>), float)<EOL>for index, line in enumerate(coord_lines):<EOL><INDENT>words = line.split()<EOL>frame.coordinates[index, <NUM_LIT:0>] = float(words[<NUM_LIT:1>])<EOL>frame.coordinates[index, <NUM_LIT:1>] = float(words[<NUM_LIT:2>])<EOL>frame.coordinates[index, <NUM_LIT:2>] = float(words[<NUM_LIT:3>])<EOL><DEDENT>frame.coordinates *= angstrom<EOL>return frame<EOL>
Read a single frame from the trajectory