def calc_ionic(site, structure, zval):
    """
    Calculate the ionic dipole moment using ZVAL from pseudopotential

    site: PeriodicSite
    structure: Structure
    zval: Charge value for ion (ZVAL for VASP pseudopotential)

    Returns polarization in electron Angstroms.
    """
    norms = structure.lattice.lengths_and_angles[0]
    return np.multiply(norms, -site.frac_coords * zval)
def calc_ionic ( site , structure , zval ) : norms = structure . lattice . lengths_and_angles [ 0 ] return np . multiply ( norms , - site . frac_coords * zval )
Calculate the ionic dipole moment using ZVAL from pseudopotential

    site: PeriodicSite
    structure: Structure
    zval: Charge value for ion (ZVAL for VASP pseudopotential)

    Returns polarization in electron Angstroms.