Changing the members of a group dynamically

Hi Fubing,
I understand your problem. Actually what I did earlier using “dump_modify …thresh” command is to dump the required info in dump file. I neither changed the members of a group dynamically nor used group. For example if I would require to get some info about those atoms 90.0<x<100.0 region, I would do the following -

variable x_coord atom x
dump 1 all custom 100 COORD_VEL.* id mol type x y z vx vy vz # or might be some other output from

compute or variables

dump_modify 1 sort id thresh v_x_coord > 90.0 thresh v_x_coord <100.0 # Just dumping the required info

In fix langevin command you have to use group. You tried already variable group command which is basically take the members at the beginning of your simulation and does not change the members dynamically. I guess if follow the discussion between Steve and me in those threads, you will see he mentioned “there is nothing like - the group will change members dynamically”. One possible solution could be using jump.

label one

region 1 block 90.0 100.0 EDGE EDGE EDGE EDGE side in units box # or change to your
                                                                # requirements
group particular_atoms region 1 
fix 1 particular_atoms langevin ......................
run 1
group particular_atoms delete    # You have to make sure that you are deleting all the members
                                                    # otherwise in the next step of looping new members will be added to the
                                                    # already defined group "particular_atoms" and its member will keep 
                                                    # increasing which you don't want 
jump SELF one

You could do the same thing by run every options, if you could clear the members of the group (Please see the discussion in the mail list between Steve and me). Without this, there is no other immediate solution on top of my head right now. Thanks.

Mir Karim
ChE, Texas Tech