Hi all,

I am trying to simulate oil-water-surfactant system using DPD in LAMMPS.

I need to divide the box in 100 equal bins along the z axis so that I can

evaluate a property individually for each bin and use them later for

numerical integration.

As you know, there is a restriction of 32 groups in LAMMPS. After

discovering the inability to define this number of groups, I used a

dynamic group. Since the dynamic group changes its values, I computed the

values of stress/atom, used a formula using the computed values (using c_)

then assigned them to a variable using $ sign for immediate evaluation.

The error occurred is "Compute used in variable between runs is not current."

As given in the LAMMPS Manual, this problem is solved for temp by giving

the command run 0 so that it would evaluate the value of compute for later

use. This worked because LAMMPS automatically evaluates temp in its run.

How do I make the same thing work for me.

Here is that section of my input script

....................................

label loop

variable i loop 100

variable a equal (lz/100)*($i-1)

variable b equal (lz/100)*$i

region r_$i block 0. 11. 0. 11. $a $b

group g dynamic all region r_$i

compute $i g stress/atom thermo_temp

compute c_$i g reduce sum c_$i[1] c_$i[2] c_$i[3]

variable s equal (c_c_$i[3]-(c_c_$i[1]+c_c_$i[2])/2)

variable d_$i equal $s

next i

jump SELF loop

.....................................

In the end, I need the values of all d_$i.

I would really appreciate any help on this problem I've been stuck.

Thank you.

Kalpit Jain