import click


def atomic_to_global_desc_options(f):
    """Create common options for global descriptors constructed based on atomic fingerprints """
    f = click.option('--reducer_type', '-r',
                     help='type of operations to get global descriptors from the atomic soap vectors, e.g. \
                          [average], [sum], [moment_avg], [moment_sum].',
                     show_default=True, default='average', type=str)(f)
    f = click.option('--zeta', '-z',
                     help='Moments to take when converting atomic descriptors to global ones.',
                     default=1, type=int)(f)
    f = click.option('--element_wise', '-e',
                     help='element-wise operation to get global descriptors from the atomic soap vectors',
                     show_default=True, default=False, is_flag=True)(f)
    f = click.option('--peratom', '-pa',
                     help='Save the per-atom local descriptors.',
                     show_default=True, default=False, is_flag=True)(f)
    return f