@staticmethod
def get_dipole_moments(filename='OUTCAR', lines=None):
    '\n        Get the electric dipole moment at every electronic step\n\n        Args:\n            filename (str): Filename of the OUTCAR file to parse\n            lines (list/None): lines read from the file\n\n        Returns:\n            list: A list of dipole moments in (eA) for each electronic step\n\n        '
    moment_trigger = 'dipolmoment'
    istep_trigger = 'FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)'
    dip_moms = list()
    lines = _get_lines_from_file(filename=filename, lines=lines)
    istep_mom = list()
    for (i, line) in enumerate(lines):
        line = line.strip()
        if (istep_trigger in line):
            dip_moms.append(np.array(istep_mom))
            istep_mom = list()
        if (moment_trigger in line):
            line = _clean_line(line)
            mom = np.array([float(val) for val in line.split()[1:4]])
            istep_mom.append(mom)
    return dip_moms
Get the electric dipole moment at every electronic step

Args:
    filename (str): Filename of the OUTCAR file to parse
    lines (list/None): lines read from the file

Returns:
    list: A list of dipole moments in (eA) for each electronic step
@staticmethod
def get_dipole_moments(filename='OUTCAR', lines=None):
    '\n        Get the electric dipole moment at every electronic step\n\n        Args:\n            filename (str): Filename of the OUTCAR file to parse\n            lines (list/None): lines read from the file\n\n        Returns:\n            list: A list of dipole moments in (eA) for each electronic step\n\n        '
    moment_trigger = 'dipolmoment'
    istep_trigger = 'FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)'
    dip_moms = list()
    lines = _get_lines_from_file(filename=filename, lines=lines)
    istep_mom = list()
    for (i, line) in enumerate(lines):
        line = line.strip()
        if (istep_trigger in line):
            dip_moms.append(np.array(istep_mom))
            istep_mom = list()
        if (moment_trigger in line):
            line = _clean_line(line)
            mom = np.array([float(val) for val in line.split()[1:4]])
            istep_mom.append(mom)
    return dip_moms