def ewald_input(dat_file, short_cut, kspace_accuracy, dump_file):
    """Create text for Ewald input file."""
    input_text = (
        """# Ewald input file
units metal
atom_style charge
dimension  3
boundary   p p p
read_data %s

pair_style coul/long %s
pair_coeff * *
kspace_style ewald %s

thermo_style one
dump 1 all custom 1 %s id type x y z fx fy fz
dump_modify 1 sort id
run 0
"""
         % (dat_file, short_cut, kspace_accuracy, dump_file))
    return input_text
