@staticmethod
def _get_positions_and_forces_parser(lines, trigger_indices, n_atoms, pos_flag=True, force_flag=True):
    '\n        Parser to get the forces and or positions for every ionic step from the OUTCAR file\n\n        Args:\n            lines (list): lines read from the file\n            trigger_indices (list): list of line indices where the trigger was found.\n            n_atoms (int): number of atoms\n            pos_flag (bool): parse position\n            force_flag (bool): parse forces\n\n        Returns:\n            [positions, forces] (sequence)\n            numpy.ndarray: A Nx3xM array of positions in $\\AA$\n            numpy.ndarray: A Nx3xM array of forces in $eV / \\AA$\n\n            where N is the number of atoms and M is the number of time steps\n\n        '
    positions = []
    forces = []
    for j in trigger_indices:
        pos = []
        force = []
        for line in lines[(j + 2):((j + n_atoms) + 2)]:
            line = line.strip()
            line = _clean_line(line)
            if pos_flag:
                pos.append([float(l) for l in line.split()[0:3]])
            if force_flag:
                force.append([float(l) for l in line.split()[3:]])
        forces.append(force)
        positions.append(pos)
    if (pos_flag and force_flag):
        return (np.array(positions), np.array(forces))
    elif pos_flag:
        return np.array(positions)
    elif force_flag:
        return np.array(forces)
Parser to get the forces and or positions for every ionic step from the OUTCAR file

Args:
    lines (list): lines read from the file
    trigger_indices (list): list of line indices where the trigger was found.
    n_atoms (int): number of atoms
    pos_flag (bool): parse position
    force_flag (bool): parse forces

Returns:
    [positions, forces] (sequence)
    numpy.ndarray: A Nx3xM array of positions in $\AA$
    numpy.ndarray: A Nx3xM array of forces in $eV / \AA$

    where N is the number of atoms and M is the number of time steps
@staticmethod
def _get_positions_and_forces_parser(lines, trigger_indices, n_atoms, pos_flag=True, force_flag=True):
    '\n        Parser to get the forces and or positions for every ionic step from the OUTCAR file\n\n        Args:\n            lines (list): lines read from the file\n            trigger_indices (list): list of line indices where the trigger was found.\n            n_atoms (int): number of atoms\n            pos_flag (bool): parse position\n            force_flag (bool): parse forces\n\n        Returns:\n            [positions, forces] (sequence)\n            numpy.ndarray: A Nx3xM array of positions in $\\AA$\n            numpy.ndarray: A Nx3xM array of forces in $eV / \\AA$\n\n            where N is the number of atoms and M is the number of time steps\n\n        '
    positions = []
    forces = []
    for j in trigger_indices:
        pos = []
        force = []
        for line in lines[(j + 2):((j + n_atoms) + 2)]:
            line = line.strip()
            line = _clean_line(line)
            if pos_flag:
                pos.append([float(l) for l in line.split()[0:3]])
            if force_flag:
                force.append([float(l) for l in line.split()[3:]])
        forces.append(force)
        positions.append(pos)
    if (pos_flag and force_flag):
        return (np.array(positions), np.array(forces))
    elif pos_flag:
        return np.array(positions)
    elif force_flag:
        return np.array(forces)