Problem with compute/atom style ID involving variable

Hello everyone

I have a jammed granular arch and I have to find the IDs of atoms in a region enveloping the arch. I use a compute property/atom ,style ID to that effect. subsequently i will have to delete a single particle from that region whose ID is accessed by the compute through a variable.The value of the variable changes each time because I have to delete a different particle from the region before each run. I need to go through the list of IDs incrementally to delete each and every particle in the region once.Thus the number of runs will be equal to the number of particles in the region with only one particle absent each time.
The piece of relevant code is as follows:(With the ERROR in bold)

group jam region jamarea
variable tstep equal step
print ${tstep}
compute jamid jam property/atom id
label loop

read_dump dump.pardel {tstep} x y vx vy box no add yes dump (Fields) dump_modify 3 sort 1 run 3000 variable deljam equal c_jamid[{delnum}]
…(‘delnum’ is loop variable defined elsewhere which goes from 1 to no. of atoms in the region)
group deljamid id ${deljam}
delete_atoms group deljamid compress no
label dellp
dump (Fields)
dump_modify 4 sort 1 append yes
run 100000
if (Some Condition) then “undump 3” “undump 4” “next delnum” &
“reset_timestep 1” “jump (filename) loop”
if (Some Condition) !=0’ then “undump 4” “jump (filename) dellp”

(ERROR: Compute used in variable between runs is not current (…/variable.cpp:933))

I just need to use the compute once as it is a static jammed system.

Is there a way to get around this?

Hi Steve

Thanks for the reply. The condition in the If test is not the issue. If I comment out the lines “variable deljam equal c_jamid[{delnum}] , group deljamid id {deljam} ,
delete_atoms group deljamid compress no” , I can still run the code (Without the intended result,obviously).
I still am not able to figure a way out. The system is already initialized as can be noted from the previous run command.

Alos the simulation run speed is severely decreased after i scan the dump file. what could the reason be?

Regards

Amit

Hi Steve
      Thanks for the reply. The condition in the If test is not the issue.
If I comment out the lines "variable deljam equal c_jamid[\{delnum\}\] , group deljamid id {deljam} ,
delete_atoms group deljamid compress no" , I can still run the code
(Without the intended result,obviously).
I still am not able to figure a way out. The system is already initialized
as can be noted from the previous run command.

nobody can debug a snipped of an input. as has been said here many
times and also is explained in the manual:

if you have a situation where you believe something is wrong and
cannot figure out a way to solve it, then you should create a
*minimal* but *complete* test system input deck, that reproduces the
problem. this means basically redoing your input but on a much smaller
scale (a handful of atoms is often enough) and removing everything
that has no effect on the issue at hand. in the majority of those case
- provided you are a reasonably smart person - this process will tell
you where the issue is and you can recognize the mistake and correct
it. and thus taking away the need to post to the mailing list
altogether. if not, then you have a complete(!) test case that is also
fast(!) and with only the minimal(!) amount of commands and thus
*much* easier to understand and debug for somebody else.

some posting a mockup of a few command that you believe to be the
problem is almost always a waste of everybody's time (yours and ours).

Alos the simulation run speed is severely decreased after i scan the dump
file. what could the reason be?

well, it has to be due to something you do in your input, or due to
having very slow i/o on your machine. any more specific statement
would be speculation and has no place in this context. causes of
slowdown can usually be easily measured through profiling tools and
using a complete(!) test input that highlights the issue.

axel.