def create_sum_movie_v1_0_2_command(motion_frames, file_input, file_output,
    file_shift, file_frc, settings, queue_com, name):
    """
    Create the SumMovie v1.0.2 command.

    motion_frames - Sub frames settings dictionary
    file_input - File to sum.
    file_output - Output file name
    file_shift - Output shift file name
    file_frc - Output frc file name
    settings - TranSPHIRE settings
    queue_com - Queue for communication
    name - Name of the process

    Returns:
    Command for Summovie v1.0.2
    """
    sum_movie_command = []
    sum_movie_command.append('{0}'.format(file_input))
    motion_name = settings['Copy']['Motion']
    if (motion_name == 'MotionCor2 v1.0.0' or motion_name ==
        'MotionCor2 v1.0.5' or motion_name == 'MotionCor2 v1.1.0'):
        sum_movie_command.append('{0}'.format(int(settings['General'][
            'Number of frames']) - int(settings[motion_name]['-Trunc']) -
            int(settings[motion_name]['-Throw'])))
    else:
        message = '\n'.join(['{0}: Motion version not known.'.format(
            motion_name), 'Please contact the TranSPHIRE authors!'])
        queue_com['error'].put(message, name)
        raise IOError(message)
    sum_movie_command.append('{0}'.format(file_output))
    sum_movie_command.append('{0}'.format(file_shift))
    sum_movie_command.append('{0}'.format(file_frc))
    sum_movie_command.append('{0}'.format(motion_frames['first']))
    sum_movie_command.append('{0}'.format(motion_frames['last']))
    if (motion_name == 'MotionCor2 v1.0.0' or motion_name ==
        'MotionCor2 v1.0.5' or motion_name == 'MotionCor2 v1.1.0'):
        sum_movie_command.append('{0}'.format(settings[motion_name][
            '-PixSize']))
    else:
        message = '\n'.join(['{0}: Motion version not known.'.format(
            motion_name), 'Please contact the TranSPHIRE authors!'])
        queue_com['error'].put(message, name)
        raise IOError(message)
    sum_movie_command.append('No')
    command = 'echo "{0}" | {1}'.format('\n'.join(sum_movie_command), '{0}'
        .format(settings['Path']['SumMovie v1.0.2']))
    return command
