[lammps-users] Fix addforce with region keyword

Hi all:

I am trying to apply a force to atoms belonging to a specified region. My input file is as follows:

#Bicrystal: dynamics

read_restart restart.sigma5

kspace_style ewald 1.0e-4

velocity all create 1500.0 82986 dist gaussian mom no

#Calcula la fuerza sobre cada atomo de itrio

#variable f_x1 atom 3.1*(x-10.26)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-16.2325)(z-16.2325))
#variable f_y1 atom 3.1
(y-12.17)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-16.2325)(z-16.2325))
variable f_z1 atom 2.5
(z-16.2325)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-16.2325)(z-16.2325))
#variable f_x2 atom 3.1
(x-10.26)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-48.6975)(z-48.6975))
#variable f_y2 atom 3.1
(y-12.17)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-48.6975)(z-48.6975))
variable f_z2 atom 2.5
(z-48.6975)/sqrt((x-10.26)(x-10.26)+(y-12.17)(y-12.17)+(z-48.6975)*(z-48.6975))

fix fuerza_1 yttrium_1 addforce 0.0 0.0 v_f_z1 region grain_1
fix fuerza_2 yttrium_2 addforce 0.0 0.0 v_f_z2 region grain_2

Both grain_1 and grain_2 regions where defined in the minimization script which I launched to get the restart file. However, when I launch LAMMPS I get the message:

ERROR: Fix addforce region ID does not exist.

Any help?

Thanks in advance!!

Juanjo

Regions don't get stored in the restart file,
so you need to re-define them in your new script.

Steve

2011/2/15 Juan J. Meléndez <[email protected]...>: