def get_frames(self, frames='<STR_LIT:all>', override=False, **kwargs):
if override is True:<EOL><INDENT>self.frames = {}<EOL><DEDENT>if isinstance(frames, int):<EOL><INDENT>frame = self._get_frame(<EOL>self.trajectory_map[frames], frames, **kwargs)<EOL>if frames not in self.frames.keys():<EOL><INDENT>self.frames[frames] = frame<EOL><DEDENT>return frame<EOL><DEDENT>if isinstance(frames, list):<EOL><INDENT>for frame in frames:<EOL><INDENT>if frame not in self.frames.keys():<EOL><INDENT>self.frames[frame] = self._get_frame(<EOL>self.trajectory_map[frame], frame, **kwargs)<EOL><DEDENT><DEDENT><DEDENT>if isinstance(frames, tuple):<EOL><INDENT>for frame in range(frames[<NUM_LIT:0>], frames[<NUM_LIT:1>]):<EOL><INDENT>if frame not in self.frames.keys():<EOL><INDENT>self.frames[frame] = self._get_frame(<EOL>self.trajectory_map[frame], frame, **kwargs)<EOL><DEDENT><DEDENT><DEDENT>if isinstance(frames, str):<EOL><INDENT>if frames in ['<STR_LIT:all>', '<STR_LIT>']:<EOL><INDENT>for frame in range(<NUM_LIT:0>, self.no_of_frames):<EOL><INDENT>if frame not in self.frames.keys():<EOL><INDENT>self.frames[frame] = self._get_frame(<EOL>self.trajectory_map[frame], frame, **kwargs)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Extract frames from the trajectory file.

Depending on the passed parameters a frame, a list of particular
frames, a range of frames (from, to), or all frames can be extracted
with this function.

Parameters
----------
frames : :class:`int` or :class:`list` or :class:`touple` or :class:`str`
    Specified frame (:class:`int`), or frames (:class:`list`), or
    range (:class:`touple`), or `all`/`everything` (:class:`str`).
    (default=`all`)

override : :class:`bool`
    If True, a frame already storred in :attr:`frames` can be override.
    (default=False)

extract_data : :class:`bool`, optional
    If False, a frame is returned as a :class:`str` block as in the
    trajectory file. Ohterwise, it is extracted and returned as
    :class:`pywindow.molecular.MolecularSystem`. (default=True)

swap_atoms : :class:`dict`, optional
    If this kwarg is passed with an appropriate dictionary a
    :func:`pywindow.molecular.MolecularSystem.swap_atom_keys()` will
    be applied to the extracted frame.

forcefield : :class:`str`, optional
    If this kwarg is passed with appropriate forcefield keyword a
    :func:`pywindow.molecular.MolecularSystem.decipher_atom_keys()`
    will be applied to the extracted frame.

Returns
-------
:class:`pywindow.molecular.MolecularSystem`
    If a single frame is extracted.

None : :class:`NoneType`
    If more than one frame is extracted, the frames are returned to
    :attr:`frames`