Error in Compute ID during a loop

Good day,

I am trying to monitor the displacement per atom during an energy minimization for each timestep. I am using the compute atom/displace command and a loop in order to determine this each time. My script looks like:

Good day,

I am trying to monitor the displacement per atom during an energy
minimization for each timestep. I am using the compute atom/displace command
and a loop in order to determine this each time. My script looks like:

--------------------------------------------

label loop

variable a loop 1000

min_style cg

min_modify dmax 0.1 line quadratic

minimize 0 0.01 1 1

compute c1 all displace/atom

dump d1 all custom 1 filename.dump id type c_c1

next a

jump filename loop

--------------------------------------------

I am getting an error saying: Resuse of compute ID.

I tried fixing this by adding an uncompute command before the jump command
but the dump no longer works with it.

What is an alternative to determining the displacement of each atom during
every tilmestep of the minimization?

a) you don't need a loop
b) define compute and dump command *before* the minimize command
c) enjoy how simple things can be.

axel.