def get_nuclear_dipole_moment(qc, component='x'):
    """Computes the nuclear part of the dipole moment.
  
  **Parameters:**
  
  qc : class
    QCinfo class. (See :ref:`Central Variables` for details.)
  component : string, {'x','y', 'z'}
    Specifies the compontent of the dipole moment operator which shall be applied.
  
  **Returns:**
  
  nuclear_dipole_moment : float
    Contains the nuclear dipole moment.
  """
    if not isinstance(component, int):
        component = 'xyz'.find(component)
    if component == -1:
        raise ValueError('The selection of the component was not valid!' +
            " (component = 'x' or 'y' or 'z')")
    nuclear_dipole_moment = 0.0
    for i_nuc in range(len(qc.geo_spec)):
        nuclear_dipole_moment += float(qc.geo_info[i_nuc, 2]) * qc.geo_spec[
            i_nuc, component]
    return nuclear_dipole_moment
