def proc(ctx, files):
    '''Process calculated structures'''
    def calc_reader(fn, verb):
        if verb:
            echo('Reading: {:<60s}\r'.format(fn), nl=False, err=True)
        return ase.io.read(fn)
    action = ctx.parent.params['action']
    systems = [calc_reader(calc, verbose) for calc in files]
    if verbose :
        echo('', err=True)
    if action == 'cij':
        cij = elastic.get_elastic_tensor(systems[0], systems=systems[1:])
        msv = cij[1][3].max()
        eps = 1e-4
        if verbose:
            echo('Cij solution\n'+30*'-')
            echo(' Solution rank: {:2d}{}'.format(
                    cij[1][2],
                    ' (undetermined)' if cij[1][2] < len(cij[0]) else ''))
            if cij[1][2] == len(cij[0]):
                echo(' Square of residuals: {:7.2g}'.format(cij[1][1]))
            echo(' Relative singular values:')
            for sv in cij[1][3]/msv:
                echo('{:7.4f}{}'.format(
                        sv, '* ' if (sv) < eps else '  '), nl=False)
            echo('\n\nElastic tensor (GPa):')
            for dsc in elastic.elastic.get_cij_order(systems[0]):
                echo('{: >7s}  '.format(dsc), nl=False)
            echo('\n'+30*'-')
        for c, sv in zip(cij[0], cij[1][3]/msv):
            echo('{:7.2f}{}'.format(
                    c/ase.units.GPa, '* ' if sv < eps else '  '), nl=False)
        echo()
    elif action == 'eos':
        eos = elastic.get_BM_EOS(systems[0], systems=systems[1:])
        eos[1] /= ase.units.GPa
        if verbose:
            echo('
        echo('    %7.2f        %7.2f        %7.2f' % tuple(eos))